Openwrt Collecting Metrics - CPU / Memory

Hi,

I am looking for some help collecting metrics for an Openwrt router (19.07.2 ). Ideally would like to send metrics (CPU / memory / interface utilization etc) out as logs (if possible) so I can reuse then the logging pipeline which ends up on Elastic (as dont want to maintain a separate pipeline / infra for metrics). To simplify, goal is to get the real time graphs functionality exported to a centralized system.

Been looking at several angles and would like to get others opinion in case missing something.

Started looking at collectd but the write syslog plugin (https://github.com/collectd/collectd/pull/3019) is not currently available on the list of packages (https://openwrt.org/docs/guide-user/perf_and_log/statistic.collectd#available_packages). Dont see any other ways to send metrics as logs.

On the other hand, also looked at Elastic beats to use metricbeats. The idea of the beats is to be a lightweight agent. First thing I noticed is, there is no release build for ARM for beats so had to manually compile the Go code. Doing as an example a build for filebeat, got me a 55 Mb agent which kind of put me off as that doesnt seem lightweight.

Has anyone came to the same situation? Is there any other package I could use to collect this info as logs?

You could write a custom script loop logging to local syslog and use the builtin log shipping functionality or setup syslog-ng for more fine grained log filtering and shipping

You might want to look at netdata if you want real time utilization etc

SNMP (snmpd) won't work?

SNMP ( snmpd ) won't work?

It probably would. Thing is, I want to keep it as simple as possible and reuse what I already have in place (logging pipeline), and adding a new protocol will complicate it considerably.

You might want to look at netdata if you want real time utilization etc

Thanks I will check it check it out more in detail.

You could write a custom script loop logging to local syslog and use the builtin log shipping functionality or setup syslog-ng for more fine grained log filtering and shipping

This is my prefer option. I have seen a couple of open source Go projects that they do so.