From 36477eab4916673035a4d902a017525fde24f8ca Mon Sep 17 00:00:00 2001 From: Thomas Basler Date: Wed, 14 Dec 2022 21:12:56 +0100 Subject: [PATCH] Fixed prometheus mac address when running in ethernet mode --- src/WebApi_prometheus.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WebApi_prometheus.cpp b/src/WebApi_prometheus.cpp index e5346e2d..2896fa1a 100644 --- a/src/WebApi_prometheus.cpp +++ b/src/WebApi_prometheus.cpp @@ -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"));