Prometheus, InfluxDB, ... on OpenWrt Router?

Is there a database implementation that I can use on an OpenWrt Router to query periodically prometheus node exporters and save it to a timeseries database? (I would use the RAM as storage)
The only database I know that runs on embedded devices is collectd because it is very minimal. But collectd is not that easy and can not query those lua node exporters.

1 Like

It's not point and click yet, but with openwisp-monitoring and it's set of scripts lua-monitoring you can obtain something like the screenshots below:

It works with influxdb right now.

It also has alerts if needed.

We're just working now on adding support for monitoring RAM, CPU usage (load average) and flash space usage.
As well as adding support for more timeseries databases.

1 Like

Is infuxdb okay on a router?

After looking at it, it seems a bit resource heavy?

1 Like

Sorry, I didn't take the time to explain that OpenWISP it's an application designed to run on a server (eg: debian).
The influxdb database should run on the server, because as you rightly doubted, it's not a great idea to put it on a router.

Are you doing this for a single router or for multiple routers? A solution like OpenWISP would make sense only for multiple routers, otherwise I'd look for a simpler solution.

Maybe collectd, statsd and grafana can help.

PS: whatever solution you use, unless you have an external drive, I don't suggest writing statistics information to the flash storage of the device itself because that should have a negative impact on it in the long run.

1 Like

I want multiple routers without extra server. I want to write in the ram, so I do not have the Problem of storage corruption. :wink:

I would like to collect stats via Prometheus exporter, but collectd can not fetch them?

I want to write in the ram, so I do not have the Problem of storage corruption

Iā€™d be interested what you come up with if you get a cluster/distribution thing working. But that said, if all the routers use the same power source then a power failure could knock out your history.

I'm not sure I understand very well.

You want to have one influxdb instance running on each router?
If you write in RAM, wouldn't you lose the data on a reboot and wouldn't the RAM be filled?

What kind of routers do you have? Do they have enough RAM to run a timeseries DB?

That is not problematic for me. I would like to have a ringbuffer that buffers for 1 minute or something like this. :slight_smile:

I improvized an offline metrics collection setup here:

Probably won't work for you out of the box, but maybe it gives you some ideas.

1 Like

Thank u! That is somehow close to what I want. Instead of reading from debugfs I want to query the prometheus node exporter. But I can fork your c implementation. :slight_smile:

Or is it already querying prometheus? ("600 Prometheus metrics"?)