Live data from Hacker News

Monitoring Raspberry Pi Devices Using Telegraf, InfluxDB and Grafana

blog.thecloudside.com

21–30 of 31 posts

Re: Monitoring Raspberry Pi Devices Using Telegraf, InfluxDB and Grafana

#21
post #20

Earlier quoted context omitted.

I looked into TimescaleDB, but didn't find a lot of support for monitoring agents that push data into Postgres. TimescaleDB is built on Postgres and uses the same mechanisms for ingesting data. There's a plugin for Telegraf that looks promising, but it hasn't been merged yet. Is anyone else using TimescaleDB? If so, what do you use to push monitoring data to it?

I recently built a janky system which runs nmon (plus a few custom rpi stats) every two minutes or so and pushes the output file to a watch folder. Another service uploads to server if network available. The server then ingests into timescale. Have been running it on two rpis and a few aws servers for the past few months. Edit: I’m using grafana but was considering checking out apache superset.

How is the data sent into timescale? Do you run psql to load the data?

Re: Monitoring Raspberry Pi Devices Using Telegraf, InfluxDB and Grafana

#22
post #20

Earlier quoted context omitted.

I recently built a janky system which runs nmon (plus a few custom rpi stats) every two minutes or so and pushes the output file to a watch folder. Another service uploads to server if network available. The server then ingests into timescale. Have been running it on two rpis and a few aws servers for the past few months. Edit: I’m using grafana but was considering checking out apache superset.

How is the data sent into timescale? Do you run psql to load the data?

python

Re: Monitoring Raspberry Pi Devices Using Telegraf, InfluxDB and Grafana

#23
post #6

If I have a regret in my observability stack I think it’s got to be influxdb. I bought in to the TICK stack and planned on using an enterprise support contract when going to production, but every interaction with InfluxData the company has felt a bit sleazy. Trying to push very hard to the cloud offering for example. That’s bad enough, but the documentation and observability of the database is quite poor, and it’s tr…

I looked into TimescaleDB, but didn't find a lot of support for monitoring agents that push data into Postgres. TimescaleDB is built on Postgres and uses the same mechanisms for ingesting data. There's a plugin for Telegraf that looks promising, but it hasn't been merged yet. Is anyone else using TimescaleDB? If so, what do you use to push monitoring data to it?

The solution I came up with but haven’t implemented yet is to use the collectd mqtt output plugin to get the data onto my broker (I use mqtt for other purposes, many of which should also end up in timescale) and then an mqtt to Postgres/Timescale bridge.

Re: Monitoring Raspberry Pi Devices Using Telegraf, InfluxDB and Grafana

#24
post #10

Earlier quoted context omitted.

Yes, agreed. This is basically what we do at my work: plot stuff from PLCs onto Grafana, while coping with intermittent connectivity. I'd love to buy a ready-made product that could do it, but there's literally nothing out there that quite comes close. As well as the things you identified, I suspect that there's just a lot of mistrust of open source in the industrial world - there's that whole thing of perceived valu…

A roll your own open source method works if you have a good low level understanding of what you are listening to and can organize your own alarm thresholds and groupings etc. Dealing with a large number of modbus/BACnet endpoints with vendor specific device profiles and PLC logic means the vendors backend systems will handle events and trend paterns better than what most facility teams can put together. However, the…

There are open source projects like EdgeX and Fledge that can do this also

Re: Monitoring Raspberry Pi Devices Using Telegraf, InfluxDB and Grafana

#25
post #10

Earlier quoted context omitted.

Yes, agreed. This is basically what we do at my work: plot stuff from PLCs onto Grafana, while coping with intermittent connectivity. I'd love to buy a ready-made product that could do it, but there's literally nothing out there that quite comes close. As well as the things you identified, I suspect that there's just a lot of mistrust of open source in the industrial world - there's that whole thing of perceived valu…

Wonderware historian, inductive automation ignition, and osi pi all can buffer data at a collection or edge node that it collects from a Plc and then forward it on to the central database historian when connectivity is present. Grafana might have a better web ui but they all offer some client for plotting. I am curious in what regard nothing comes close to grafana? I am Currently paying a lot for citect and wonderwar…

Telegraf can do this too, in a more limited capacity. It keeps an in-memory buffer of collected data points so if a write to an output fails it'll try again on the next interval without losing the data it has already collected.

Re: Monitoring Raspberry Pi Devices Using Telegraf, InfluxDB and Grafana

#26
post #19

Earlier quoted context omitted.

Wonderware historian, inductive automation ignition, and osi pi all can buffer data at a collection or edge node that it collects from a Plc and then forward it on to the central database historian when connectivity is present. Grafana might have a better web ui but they all offer some client for plotting. I am curious in what regard nothing comes close to grafana? I am Currently paying a lot for citect and wonderwar…

We're a bit of a weird case in that we log data at 20Hz and 100Hz for prototypes, so we need custom queries and/or aggregation to reduce that down for display. We had a good chat with Inductive earlier this year, but even they said that might be a bit much for them. Other than that, though, Ignition is literally everything we want in a single product.

You are logging data in to grafana at 100 Hz from a Plc? That’s pretty quick for a plc, I’d definitely have either a tiny program or a fast periodic task to be generating new samples every 10 ms, although I’m sure there are faster PLCs out there than m340

Re: Monitoring Raspberry Pi Devices Using Telegraf, InfluxDB and Grafana

#27
post #19

Earlier quoted context omitted.

We're a bit of a weird case in that we log data at 20Hz and 100Hz for prototypes, so we need custom queries and/or aggregation to reduce that down for display. We had a good chat with Inductive earlier this year, but even they said that might be a bit much for them. Other than that, though, Ignition is literally everything we want in a single product.

You are logging data in to grafana at 100 Hz from a Plc? That’s pretty quick for a plc, I’d definitely have either a tiny program or a fast periodic task to be generating new samples every 10 ms, although I’m sure there are faster PLCs out there than m340

Hehe, yeah. We run B&R PLCs which are fairly beefy Atom processors under the hood.

Re: Monitoring Raspberry Pi Devices Using Telegraf, InfluxDB and Grafana

#28
post #23

Earlier quoted context omitted.

I looked into TimescaleDB, but didn't find a lot of support for monitoring agents that push data into Postgres. TimescaleDB is built on Postgres and uses the same mechanisms for ingesting data. There's a plugin for Telegraf that looks promising, but it hasn't been merged yet. Is anyone else using TimescaleDB? If so, what do you use to push monitoring data to it?

The solution I came up with but haven’t implemented yet is to use the collectd mqtt output plugin to get the data onto my broker (I use mqtt for other purposes, many of which should also end up in timescale) and then an mqtt to Postgres/Timescale bridge.

Yes, I can see how that could work. I may do something similar where I send my data to one system that can then forward it into Postgres/TimescaleDB.

Re: Monitoring Raspberry Pi Devices Using Telegraf, InfluxDB and Grafana

#29
post #9

Telegraf is an awesome agent, and also pairs really nicely with Prometheus as a TSDB, then you can put Grafana on top. Maybe not in this specific case, but in general Prometheus my preferred TSDB sitting between Telegraf and Grafana If you need further scale-out there are options for federating Prometheus instances as well.

Telegraf really is a swiss army tool for metrics. It has an insane number of plugins: inputs, outputs, aggregators, etc. I used it heavily at a previous company, before Prometheus was an option.

Trying to get a change merged into the codebase is a nightmare though. Especially if it's in a plug-in that isn't a money earner for InfluxDB.

Re: Monitoring Raspberry Pi Devices Using Telegraf, InfluxDB and Grafana

#30
post #6

If I have a regret in my observability stack I think it’s got to be influxdb. I bought in to the TICK stack and planned on using an enterprise support contract when going to production, but every interaction with InfluxData the company has felt a bit sleazy. Trying to push very hard to the cloud offering for example. That’s bad enough, but the documentation and observability of the database is quite poor, and it’s tr…

I looked into TimescaleDB, but didn't find a lot of support for monitoring agents that push data into Postgres. TimescaleDB is built on Postgres and uses the same mechanisms for ingesting data. There's a plugin for Telegraf that looks promising, but it hasn't been merged yet. Is anyone else using TimescaleDB? If so, what do you use to push monitoring data to it?

Good luck waiting for the telegraf merge! I was watching a PR for another tsdb for 2 years before I switched jobs and stopped caring. I believe the PR is still open.
Post reply on HN