Github Mirror / telegraf-plugins: 81766c6e




Report errors back

Report errors back

Commit 81766c6e.

Authored 2022-03-13T12:57:41.000+00:00 by B Tasker in project Github Mirror / telegraf-plugins

+22 lines -3 lines

Commit Signature

Changes

diff --git a/i2pd-statistics/i2pd-statistics.py b/i2pd-statistics/i2pd-statistics.py
--- a/i2pd-statistics/i2pd-statistics.py
+++ b/i2pd-statistics/i2pd-statistics.py
# @@ -5,6 +5,7 @@
# import os
# import re
# import requests
# +import sys
#
# HOST = os.getenv('I2PD_CONSOLE', 'http://localhost:7070')
# MEASUREMENT = os.getenv('MEASUREMENT', 'i2pd')
# @@ -131,11 +132,29 @@ def split_counter_row(inp):
# return routers, floodfills, leasesets, clienttunnels, transittunnels
#
#
# +
# +
# +stats_status = "available"
# +
# # We grab pages to begin with - we don't want too much delay between page reads
# # otherwise stats might diverge
# -homepage = getPage("/", HOST)
# -tunnels_page = getPage("/?page=tunnels", HOST)
# -
# +try:
# + homepage = getPage("/", HOST)
# + tunnels_page = getPage("/?page=tunnels", HOST)
# +except:
# + stats_status = "unavailable"
# +
# + tags = "url={url},statspage_status={stats_status}".format(
# + url = HOST,
# + stats_status = stats_status
# + )
# +
# + lp = "{measurement},{tags} failed=1".format(
# + measurement = MEASUREMENT,
# + tags = tags
# + )
# + print(lp)
# + sys.exit()
#
#
# bold_fields = getMatches(homepage, "<b>(.+)<br>")
#