From e2f8b7bea3f1f2b7cb769c580c9a59f4e84b19dd Mon Sep 17 00:00:00 2001 From: Tobias Wolf Date: Sat, 25 Mar 2023 21:35:55 +0100 Subject: [PATCH] Also add RSSI metric --- src/web/web.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/web/web.h b/src/web/web.h index a7e455b3..0d780007 100644 --- a/src/web/web.h +++ b/src/web/web.h @@ -689,6 +689,10 @@ class Web { snprintf(topic,sizeof(topic),"ahoy_solar_uptime{devicename=\"%s\"} %u\n", mConfig->sys.deviceName, mApp->getUptime()); metrics += String(type) + String(topic); + snprintf(type,sizeof(type),"# TYPE ahoy_solar_wifi_rssi_db gauge\n"); + snprintf(topic,sizeof(topic),"ahoy_solar_wifi_rssi_db{devicename=\"%s\"} %d\n", mConfig->sys.deviceName, WiFi.RSSI()); + metrics += String(type) + String(topic); + // NRF Statistics stat = mApp->getStatistics(); metrics += radioStatistic(F("rx_success"), stat->rxSuccess);