[GH-ISSUE #13] Improve start-up logs #9

Closed
opened 2026-10-13 21:12:25 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @tiaga on GitHub (Aug 13, 2024).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-exporter/issues/13

During start the following line can be found on logs:

2024-08-13 03:19:39,224 Main INFO: --> metrics_file: /tmp/prometheus/awg.prom

If AWG_EXPORTER_OPS_MODE isn't set to metricsfile it can be confusing.

I propose print that line only if AWG_EXPORTER_OPS_MODE is set to metricsfile. For that, we can simple modify the code to something like that:

    for key, value in exporter_config.items():
        if exporter_config['ops_mode'] != 'metricsfile' and key == 'metrics_file':
            continue
        log.info(f"--> {key}: {value}")
Originally created by @tiaga on GitHub (Aug 13, 2024). Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-exporter/issues/13 During start the following line can be found on logs: ``` 2024-08-13 03:19:39,224 Main INFO: --> metrics_file: /tmp/prometheus/awg.prom ``` If `AWG_EXPORTER_OPS_MODE` isn't set to `metricsfile` it can be confusing. I propose print that line only if `AWG_EXPORTER_OPS_MODE` is set to `metricsfile`. For that, we can simple modify the code to something like that: ``` for key, value in exporter_config.items(): if exporter_config['ops_mode'] != 'metricsfile' and key == 'metrics_file': continue log.info(f"--> {key}: {value}") ```
bsakaguchi 2026-10-13 21:12:25 +00:00
  • closed this issue
  • added the
    minor
    label
Sign in to join this conversation.
No labels
bug
minor
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amneziawg-exporter#9
No description provided.