mirror of
https://github.com/thegeeklab/prometheus-pve-sd.git
synced 2024-11-22 01:10:39 +00:00
fix: convert list items to strings before exclude check is performed (#9)
This commit is contained in:
parent
75cfc01e80
commit
5892717729
@ -75,7 +75,7 @@ class Config():
|
||||
},
|
||||
"exclude_vmid": {
|
||||
"default": [],
|
||||
"env": "EXCLUDE_STATE",
|
||||
"env": "EXCLUDE_VMID",
|
||||
"file": True,
|
||||
"type": environs.Env().list
|
||||
},
|
||||
|
@ -124,10 +124,10 @@ class Discovery():
|
||||
if obj["template"] == 1:
|
||||
continue
|
||||
|
||||
if obj["status"] in self.config.config["exclude_state"]:
|
||||
if obj["status"] in map(str, self.config.config["exclude_state"]):
|
||||
continue
|
||||
|
||||
if obj["vmid"] in self.config.config["exclude_vmid"]:
|
||||
if obj["vmid"] in map(str, self.config.config["exclude_vmid"]):
|
||||
continue
|
||||
|
||||
filtered.append(item.copy())
|
||||
|
Loading…
Reference in New Issue
Block a user