+++
title = 'Graphing Sensor Data with Grafana'
date = 2018-08-06T21:32:00-06:00
+++

To view trending sensor data, I installed collectd (with the "sensors" plugin
enabled), InfluxDB, and Grafana. For some series, Grafana displayed wierd
graphs with what looked like two values for one interval. I worked around this
by changing the Influx query from

    SELECT "value" FROM "sensors_value" WHERE ("type" = 'temperature') AND $timeFilter GROUP BY "type_instance"

to

    SELECT median("value") FROM "sensors_value" WHERE ("type" = 'temperature') AND $timeFilter GROUP BY time(10s), "type_instance"

This seemed to smooth out the line quite a bit.
