Merge pull request #8800 from mhansen/metadata

Add tasmota_info prometheus psuedo-metric.
This commit is contained in:
Theo Arends 2020-06-27 14:32:23 +02:00 committed by GitHub
commit cd22dbf638
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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);