From: Martin Mares Date: Tue, 14 Aug 2018 10:16:59 +0000 (+0200) Subject: Prometheus: Temporarily disabled sending of timestamps X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=8c79ea9c3317620363b1d7928d7958c129988ec0;p=home-hw.git Prometheus: Temporarily disabled sending of timestamps --- diff --git a/prometheus/burrow-prometheus.c b/prometheus/burrow-prometheus.c index 1c6826d..188af45 100644 --- a/prometheus/burrow-prometheus.c +++ b/prometheus/burrow-prometheus.c @@ -85,6 +85,18 @@ static const struct attr attr_table[] = { .type = "gauge", .topic = "burrow/temp/garage-rh" }, + { + .metric = "temp_catarium_clock", + .help = "Temperature on Catarium clock [degC]", + .type = "gauge", + .topic = "burrow/temp/clock" + }, + { + .metric = "press_catarium_clock", + .help = "Pressure on Catarium clock [Pa]", + .type = "gauge", + .topic = "burrow/pressure/clock" + }, }; static char *attr_values[ARRAY_SIZE(attr_table)]; @@ -262,8 +274,11 @@ static void http_answer(struct fastbuf *fb) if (a->type) bprintf(fb, "# TYPE %s %s\n", a->metric, a->type); bprintf(fb, "%s %s", a->metric, val); +#if 0 + // Prometheus does not like our timestamps -- why? if (fields >= 2) bprintf(fb, " %s", w[1]); +#endif bputc(fb, '\n'); } }