diff --git a/docs/content/configuration/defaults.md b/docs/content/configuration/defaults.md index 4b8c7a9..32561c0 100644 --- a/docs/content/configuration/defaults.md +++ b/docs/content/configuration/defaults.md @@ -5,9 +5,9 @@ title: Default settings ```Shell --- logging: - # supported log levels: debug|info|warning|error|critical + # Supported log levels: debug|info|warning|error|critical level: warning - # supported log formats: console|json|simple + # Supported log formats: console|json|simple format: console metrics: @@ -24,11 +24,14 @@ loop_delay: 300 service: true exclude_state: [] -# needs to be a list of strings + +# Needs to be a list of strings. exclude_vmid: [] include_vmid: [] -# can be used to exclude vms by tags (proxmox 6+) +# Can be used to exclude vms by tags (proxmox 6+) - needs to be a list of strings. +# If `include_tags` and `exclude_tags` are set at the same time, the `exclude_tags` option takes precedence. +# If `include_tags` is set, and your VM don't have any tags set, they will not show up! exclude_tags: [] include_tags: [] @@ -47,7 +50,3 @@ pve: # auth_timeout: 5 # verify_ssl: true ``` - -If `include_tags` and `exclude_tags` are set at the same time, the `exclude_tags` option takes precedence. - -If `include_tags` is set, and your VM don't have any tags set, they will not show up! diff --git a/docs/content/configuration/env.md b/docs/content/configuration/env.md index b384771..7d9396c 100644 --- a/docs/content/configuration/env.md +++ b/docs/content/configuration/env.md @@ -24,10 +24,15 @@ PROMETHEUS_PVE_SD_LOOP_DELAY=300 PROMETHEUS_PVE_SD_SERVICE=true PROMETHEUS_PVE_SD_EXCLUDE_STATE= -PROMETHEUS_PVE_SD_EXCLUDE_VMID= +# comma-separated list +PROMETHEUS_PVE_SD_EXCLUDE_VMID= PROMETHEUS_PVE_SD_INCLUDE_VMID= +# comma-separated list +PROMETHEUS_PVE_SD_EXCLUDE_TAGS= +PROMETHEUS_PVE_SD_INCLUDE_TAGS= + PROMETHEUS_PVE_SD_PVE_SERVER= PROMETHEUS_PVE_SD_PVE_USER= PROMETHEUS_PVE_SD_PVE_PASSWORD= diff --git a/prometheuspvesd/config.py b/prometheuspvesd/config.py index 088fc70..21540f9 100644 --- a/prometheuspvesd/config.py +++ b/prometheuspvesd/config.py @@ -100,18 +100,18 @@ class Config(): "file": True, "type": environs.Env().list }, - "exclude_tags": { - "default": [], - "env": "EXCLUDE_TAGS", - "file": True, - "type": environs.Env().list - }, "include_vmid": { "default": [], "env": "INCLUDE_VMID", "file": True, "type": environs.Env().list }, + "exclude_tags": { + "default": [], + "env": "EXCLUDE_TAGS", + "file": True, + "type": environs.Env().list + }, "include_tags": { "default": [], "env": "INCLUDE_TAGS", diff --git a/prometheuspvesd/pve.json b/prometheuspvesd/pve.json deleted file mode 100644 index 6e4212e..0000000 --- a/prometheuspvesd/pve.json +++ /dev/null @@ -1,66 +0,0 @@ -[ - { - "targets": [ - "fhnw-syspr01" - ], - "labels": { - "__meta_pve_ipv4": "10.112.153.88", - "__meta_pve_ipv6": null, - "__meta_pve_name": "fhnw-syspr01", - "__meta_pve_type": "qemu", - "__meta_pve_vmid": "103", - "__meta_pve_cpu": "1", - "__meta_pve_cores": "2", - "__meta_pve_memory": "2048", - "__meta_pve_status": "running" - } - }, - { - "targets": [ - "admin03" - ], - "labels": { - "__meta_pve_ipv4": "10.112.153.83", - "__meta_pve_ipv6": null, - "__meta_pve_name": "admin03", - "__meta_pve_type": "qemu", - "__meta_pve_vmid": "102", - "__meta_pve_cpu": "1", - "__meta_pve_cores": "1", - "__meta_pve_memory": "1024", - "__meta_pve_status": "running" - } - }, - { - "targets": [ - "psql02" - ], - "labels": { - "__meta_pve_ipv4": "10.112.153.91", - "__meta_pve_ipv6": null, - "__meta_pve_name": "psql02", - "__meta_pve_type": "qemu", - "__meta_pve_vmid": "100", - "__meta_pve_cpu": "1", - "__meta_pve_cores": "4", - "__meta_pve_memory": "4096", - "__meta_pve_status": "running" - } - }, - { - "targets": [ - "fhnw-gitlab01" - ], - "labels": { - "__meta_pve_ipv4": "10.112.153.92", - "__meta_pve_ipv6": null, - "__meta_pve_name": "fhnw-gitlab01", - "__meta_pve_type": "qemu", - "__meta_pve_vmid": "104", - "__meta_pve_cpu": "1", - "__meta_pve_cores": "2", - "__meta_pve_memory": "2048", - "__meta_pve_status": "running" - } - } -] \ No newline at end of file