Skip to content

Commit

Permalink
fix: set service argparse default to None to respect anyconfig map (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
xoxys authored Jul 25, 2021
1 parent 9301d70 commit c6b1d3b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 4 additions & 4 deletions docs/content/configuration/env.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ PROMETHEUS_PVE_SD_LOG_LEVEL=warning
# supported log formats: console|json|simple
PROMETHEUS_PVE_SD_LOG_FORMAT=console

METRICS_ENABLED=true
METRICS_ADDRESS=127.0.01
METRICS_PORT=8000
PROMETHEUS_PVE_SD_METRICS_ENABLED=true
PROMETHEUS_PVE_SD_METRICS_ADDRESS=127.0.01
PROMETHEUS_PVE_SD_METRICS_PORT=8000

PROMETHEUS_PVE_SD_OUTPUT_FILE=
PROMETHEUS_PVE_SD_LOOP_DELAY=300

# Run pve sd in a loop and discover hosts every n seconds (as defined in PROMETHEUS_PVE_SD_LOOP_DELAY).
# Run PVE SD in a loop and discover hosts every n seconds (as defined in PROMETHEUS_PVE_SD_LOOP_DELAY).
# Can be disabled to run disovery only once.
PROMETHEUS_PVE_SD_SERVICE=true

Expand Down
6 changes: 5 additions & 1 deletion prometheuspvesd/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ def _cli_args(self):
help="delay between discovery runs"
)
parser.add_argument(
"--no-service", dest="service", action="store_false", help="run discovery only once"
"--no-service",
dest="service",
action="store_false",
default=None,
help="run discovery only once"
)
parser.add_argument(
"-f",
Expand Down

0 comments on commit c6b1d3b

Please sign in to comment.