From c9fed32eeadab79b85b581b12bacc1d014f3dcb5 Mon Sep 17 00:00:00 2001 From: VG Date: Fri, 27 Sep 2024 10:14:19 +0300 Subject: [PATCH] rollback infos --- zte_exporter.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/zte_exporter.py b/zte_exporter.py index c01cd1a..ea05502 100644 --- a/zte_exporter.py +++ b/zte_exporter.py @@ -108,17 +108,11 @@ class serveInfos(BaseHTTPRequestHandler): #self.wfile.write(bytes("\n\n%s\n\n" % json.dumps(gatheredJson, indent=4), "utf-8")) # for reference for now - #self.wfile.write(bytes("# HELP zte_modem_info Modem general information\n# TYPE zte_modem_info untyped\n", "utf-8")) - #self.wfile.write(bytes("zte_modem_info{firmware=\"%s\",ip_addr=\"" % gatheredJson["wa_inner_version"], "utf-8")) - #self.wfile.write(bytes("%s\",apn=\"" % gatheredJson["wan_ipaddr"], "utf-8")) - #self.wfile.write(bytes("%s\",cell_id=\"" % gatheredJson["wan_apn"], "utf-8")) - #self.wfile.write(bytes("%s\"} 1\n\n" % gatheredJson["cell_id"], "utf-8")) - - self.wfile.write(bytes("# HELP zte_modem_wan_ip WAN IP\n# TYPE zte_modem_wan_ip untyped\n", "utf-8")) - self.wfile.write(bytes("zte_modem_wan_ip %s\n\n" % gatheredJson["wan_ipaddr"], "utf-8")) - - self.wfile.write(bytes("# HELP zte_modem_firmware Firmware\n# TYPE zte_modem_firmware untyped\n", "utf-8")) - self.wfile.write(bytes("zte_modem_firmware %s\n\n" % gatheredJson["wa_inner_version"], "utf-8")) + self.wfile.write(bytes("# HELP zte_modem_info Modem general information\n# TYPE zte_modem_info untyped\n", "utf-8")) + self.wfile.write(bytes("zte_modem_info{firmware=\"%s\",ip_addr=\"" % gatheredJson["wa_inner_version"], "utf-8")) + self.wfile.write(bytes("%s\",apn=\"" % gatheredJson["wan_ipaddr"], "utf-8")) + self.wfile.write(bytes("%s\",cell_id=\"" % gatheredJson["wan_apn"], "utf-8")) + self.wfile.write(bytes("%s\"} 1\n\n" % gatheredJson["cell_id"], "utf-8")) self.wfile.write(bytes("# HELP zte_rsrq Reference Signal Received Quality\n# TYPE zte_rsrq gauge\n", "utf-8")) if gatheredJson["lte_rsrq"]: