mirror of https://github.com/arendst/Tasmota.git
Merge pull request #8800 from mhansen/metadata
Add tasmota_info prometheus psuedo-metric.
This commit is contained in:
commit
cd22dbf638
|
@ -35,6 +35,9 @@ void HandleMetrics(void)
|
|||
|
||||
char parameter[FLOATSZ];
|
||||
|
||||
// Pseudo-metric providing metadata about the running firmware version.
|
||||
WSContentSend_P(PSTR("# TYPE tasmota_info gauge\ntasmota_info{version=\"%s\",image=\"%s\",build_timestamp=\"%s\"} 1\n"),
|
||||
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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue