diff --git a/arrisparser/__main__.py b/arrisparser/__main__.py index 70a1cea..faf0b26 100644 --- a/arrisparser/__main__.py +++ b/arrisparser/__main__.py @@ -9,6 +9,10 @@ app = Flask(__name__) +def clean_address(address): + return address.replace('.', '_') + + @app.route('//
') def prometheus(prefix, address): url = f'http://{address}/cgi-bin/status' @@ -18,6 +22,9 @@ def prometheus(prefix, address): data = from_html_string(doc_contents) response = [] + # Clean up the address so Prometheus can parse it + address = clean_address(address) + for ch in data['DownstreamBondedChannels']: for numeric in [ 'ChannelID',