mirror of
https://github.com/thegeeklab/prometheus-pve-sd.git
synced 2024-06-01 23:49:40 +02:00
fix host string method
This commit is contained in:
parent
ff489210f3
commit
e8cab8db15
|
@ -19,8 +19,10 @@ class Host:
|
||||||
self.add_label("vmid", vmid)
|
self.add_label("vmid", vmid)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f"{self.hostname}({self.vmid}): {self.pve_type} \
|
return (
|
||||||
{self.ipv4_address} {self.ipv6_address}"
|
f"{self.hostname}({self.vmid}): "
|
||||||
|
f"{self.pve_type} {self.ipv4_address} {self.ipv6_address}"
|
||||||
|
)
|
||||||
|
|
||||||
def add_label(self, key, value):
|
def add_label(self, key, value):
|
||||||
key = key.replace("-", "_").replace(" ", "_")
|
key = key.replace("-", "_").replace(" ", "_")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user