added more positional indexes in format() (all of them? 0_o)
Evgeniy Kostenko committed
Aug 3, 2018 at 08:21 UTC
2b1427a26657bf760f9da9f48bd1528ec9915b5b
1 file changed
+2
-2
python.d/monit.chart.py
+2
-2
@@ -85,7 +85,7 @@ class Service(UrlService):
85
try:
86
xml = ET.fromstring(data)
87
except ET.ParseError:
88
- self.debug('{} is not a vaild XML page. Please add "_status?format=xml&level=full" to monit URL.'.format(self.url))
88
+ self.debug('{0} is not a vaild XML page. Please add "_status?format=xml&level=full" to monit URL.'.format(self.url))
89
return None
90
return xml
91
@@ -142,7 +142,7 @@ class Service(UrlService):
142
subnode_value = service_node.find('./icmp/responsetime')
143
if subnode_value == None:
144
continue
145
- dimension_key = 'host_latency_{}'.format(service_name)
145
+ dimension_key = 'host_latency_{0}'.format(service_name)
146
if dimension_key not in self.charts['host_latency']:
147
self.charts['host_latency'].add_dimension([dimension_key, service_name, 'absolute', 1000, 1000000])
148
data[dimension_key] = float(subnode_value.text) * 1000000