Skip to content

Commit

Permalink
Fix: Prometheus syntax error with wifi_bssid
Browse files Browse the repository at this point in the history
Fixes #1021
  • Loading branch information
tbnobody committed Jun 11, 2023
1 parent 170978c commit 08f47c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/WebApi_prometheus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ void WebApiPrometheusClass::onPrometheusMetricsGet(AsyncWebServerRequest* reques
stream->print("# TYPE wifi_rssi gauge\n");
stream->printf("wifi_rssi %d\n", WiFi.RSSI());

stream->print("# HELP wifi_bssid WiFi BSSID\n");
stream->print("# TYPE wifi_bssid gauge\n");
stream->printf("wifi_bssid %s\n", WiFi.BSSIDstr().c_str());
stream->print("# HELP wifi_station WiFi Station info\n");
stream->print("# TYPE wifi_station label\n");
stream->printf("wifi_station{bssid=\"%s\"} 1\n", WiFi.BSSIDstr().c_str());

for (uint8_t i = 0; i < Hoymiles.getNumInverters(); i++) {
auto inv = Hoymiles.getInverterByPos(i);
Expand Down

0 comments on commit 08f47c2

Please sign in to comment.