Logging emoncms host performance statistics

Is there a standard way to log the performance statistics (load average, CPU speed, maybe power consumption, network usage, disk space, and so on) of the Pi hosting the emoncms?

I found a few python scripts and shell scripts in forum posts but it seems a bit like everyone is doing their own thing so far. Wouldn’t this be a cool thing to include in some default setup, or the Guide? Who wouldn’t want to see that the hosting device is performing OK?

It’s possibly over-engineered for your needs, but there’s a monitoring tool called nagios that does a lot of this stuff. It has a server side that collects all the data (potentially from multiple remote hosts) and records it, producing graphs of data if configured to do so, and clients that can be installed on each of the target machines to actually generate the data.

If you want to record the data in emoncms itself, you could probably just use the clients and use a wrapper script (from cron, perhaps) on the RPi that runs each of them in turn, pushing the results back into emoncms via the API.

James

Yes, I know nagios from work. We now use the icinga fork. Definitely overkill unless I want alerting.

I could wrap the clients. I am not sure that would gain much over just wrapping the system commands and file reads. What do you do?

I’m not worrying about it for the moment, I have to admit. I may actually end up going with something like nagios though as I have a few bits of kit at home that I’d like to keep track of and prod me when there are issues that need looking at, and it’s generally much easier not to reinvent the wheel. To be fair however, I’ve not really given it a lot of thought. After my last job ended in circumstances that strained credulity to say the least (though it wouldn’t be unreasonable to suggest I’d had more than enough anyhow), I fairly seriously lost my programming/sysadmin mojo and playing with emoncms, weewx and similar stuff is my way of starting to get back into it all.

The one advantage of using the nagios clients that I can see is that they already provide the data in a fixed format so it just saves some coding time. Otherwise I’d agree it’s probably just easier to code something up yourself, which kind of brings you back to your original question :slight_smile:

James

Hello @mjr @JasF good question, yes I think it is a case of people doing their own thing at the moment. There’s nothing standard other than what is shown on the info page. I have my own scripts on the emoncms.org server but it’s nothing special and uses a whole load of hard coded feedid’s so not particularly portable at the moment…