From c9f3a2d563c4e443669d06765e683fdc8db78c8a Mon Sep 17 00:00:00 2001 From: Mark Hansen Date: Mon, 29 Jun 2020 10:35:27 +1000 Subject: [PATCH] Add tasmota_flash_writes_total to Prometheus Follows prometheus naming best practices for unitless accumulating counts: https://prometheus.io/docs/practices/naming/#metric-names (cf http_requests_total). --- tasmota/xsns_75_prometheus.ino | 1 + 1 file changed, 1 insertion(+) diff --git a/tasmota/xsns_75_prometheus.ino b/tasmota/xsns_75_prometheus.ino index fd4396a75..934c01dd8 100644 --- a/tasmota/xsns_75_prometheus.ino +++ b/tasmota/xsns_75_prometheus.ino @@ -40,6 +40,7 @@ void HandleMetrics(void) my_version, my_image, GetBuildDateAndTime().c_str()); WSContentSend_P(PSTR("# TYPE tasmota_uptime_seconds gauge\ntasmota_uptime_seconds %d\n"), uptime); WSContentSend_P(PSTR("# TYPE tasmota_boot_count counter\ntasmota_boot_count %d\n"), Settings.bootcount); + WSContentSend_P(PSTR("# TYPE tasmota_flash_writes_total counter\ntasmota_flash_writes_total %d\n"), Settings.save_flag); // Pseudo-metric providing metadata about the WiFi station.