Skip to content

Commit 85b3658

Browse files
author
Igor Živković
committed
rename metrics according to naming convention
1 parent 54b0f6b commit 85b3658

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tinyproxy_exporter

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ class TinyproxyCollector(object):
2020
urllib.request.install_opener(opener)
2121
response = urllib.request.urlopen('http://{0}'.format(self.stathost))
2222
values = [float(x) for x in re.findall(b'>(\d+).+td', response.read())]
23-
yield GaugeMetricFamily('tinyproxy_open_connections', 'Number of open connections', values[0])
24-
yield CounterMetricFamily('tinyproxy_requests', 'Number of requests', values[1])
25-
yield CounterMetricFamily('tinyproxy_bad_connections', 'Number of bad connections', values[2])
26-
yield CounterMetricFamily('tinyproxy_denied_connections', 'Number of denied connections', values[3])
27-
yield CounterMetricFamily('tinyproxy_refused_connections', 'Number of refused connections due to high load', values[4])
23+
yield GaugeMetricFamily('tinyproxy_connections_open', 'Number of open connections', values[0])
24+
yield CounterMetricFamily('tinyproxy_requests_total', 'Number of requests', values[1])
25+
yield CounterMetricFamily('tinyproxy_connections_bad_total', 'Number of bad connections', values[2])
26+
yield CounterMetricFamily('tinyproxy_connections_denied_total', 'Number of denied connections', values[3])
27+
yield CounterMetricFamily('tinyproxy_connections_refused_total', 'Number of refused connections due to high load', values[4])
2828

2929
def parse_args():
3030
parser = argparse.ArgumentParser(description='Prometheus exporter for Tinyproxy.')

0 commit comments

Comments
 (0)