Fixed prometheus mac address when running in ethernet mode

This commit is contained in:
Thomas Basler 2022-12-14 21:12:56 +01:00
parent 674ead1c38
commit 36477eab49

View File

@ -28,7 +28,7 @@ void WebApiPrometheusClass::onPrometheusMetricsGet(AsyncWebServerRequest* reques
stream->print(F("# HELP opendtu_platform Platform info\n"));
stream->print(F("# TYPE opendtu_platform gauge\n"));
stream->printf("opendtu_platform{arch=\"%s\",mac=\"%s\"} 1\n", ESP.getChipModel(), WiFi.macAddress().c_str());
stream->printf("opendtu_platform{arch=\"%s\",mac=\"%s\"} 1\n", ESP.getChipModel(), NetworkSettings.macAddress().c_str());
stream->print(F("# HELP opendtu_uptime Uptime in seconds\n"));
stream->print(F("# TYPE opendtu_uptime counter\n"));