mirror of https://github.com/arendst/Tasmota.git
Merge pull request #8786 from mhansen/uptime-prometheus
Add uptime metric to prometheus exporter
This commit is contained in:
commit
169d444532
|
@ -37,6 +37,8 @@ void HandleMetrics(void)
|
|||
|
||||
char parameter[FLOATSZ];
|
||||
|
||||
WSContentSend_P(PSTR("# TYPE tasmota_uptime_seconds gauge\ntasmota_uptime_seconds %d\n"), uptime);
|
||||
|
||||
if (!isnan(global_temperature)) {
|
||||
dtostrfd(global_temperature, Settings.flag2.temperature_resolution, parameter);
|
||||
WSContentSend_P(PSTR("# TYPE global_temperature gauge\nglobal_temperature %s\n"), parameter);
|
||||
|
|
Loading…
Reference in New Issue