mirror of
https://github.com/thegeeklab/prometheus-pve-sd.git
synced 2024-11-25 10:50: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": {
|
"exclude_vmid": {
|
||||||
"default": [],
|
"default": [],
|
||||||
"env": "EXCLUDE_STATE",
|
"env": "EXCLUDE_VMID",
|
||||||
"file": True,
|
"file": True,
|
||||||
"type": environs.Env().list
|
"type": environs.Env().list
|
||||||
},
|
},
|
||||||
|
@ -124,10 +124,10 @@ class Discovery():
|
|||||||
if obj["template"] == 1:
|
if obj["template"] == 1:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if obj["status"] in self.config.config["exclude_state"]:
|
if obj["status"] in map(str, self.config.config["exclude_state"]):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if obj["vmid"] in self.config.config["exclude_vmid"]:
|
if obj["vmid"] in map(str, self.config.config["exclude_vmid"]):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
filtered.append(item.copy())
|
filtered.append(item.copy())
|
||||||
|
Loading…
Reference in New Issue
Block a user