]> mj.ucw.cz Git - home-hw.git/commitdiff
Prometheus: Temporarily disabled sending of timestamps
authorMartin Mares <mj@ucw.cz>
Tue, 14 Aug 2018 10:16:59 +0000 (12:16 +0200)
committerMartin Mares <mj@ucw.cz>
Tue, 14 Aug 2018 10:16:59 +0000 (12:16 +0200)
prometheus/burrow-prometheus.c

index 1c6826d080aaa1adb82ccff0ac401be6e0b8a9cf..188af4525915dc0e1e48eaeac24e312fb6cc240c 100644 (file)
@@ -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');
        }
 }