Page 1 of 1

Weekly reporting on Nagios Engine

Posted: Tue Jan 23, 2018 3:21 pm
by krutaw
What is the best way to export Monitoring Engine stats? I'm looking to start reporting (automatically, not manually) on things such as:
  • Total checks performed (per hour / per minute / etc.)
    Event queue saturation
    Check execution time
    Check latency
I realize that I can view all of this in the GUI, but I have multiple servers that I need to roll up into a single report and need to be able to export the information in order to do so. Ideas?

Re: Weekly reporting on Nagios Engine

Posted: Wed Jan 24, 2018 11:51 am
by tmcdonald
There's not a built-in way to export that, much less on a weekly basis, but some of that information can be gleaned from the PHP scripts in the /usr/local/nagiosxi/cron directory, particularly the sysstat.php script. It will output the data using PHP's print_r() function, but do note that when invoked it runs continuously on a loop for 59 seconds (long story, it's a cron thing) so you will want to either wait out the 59 seconds or set a limit on the runtime some other way.

You could also look into the /usr/local/nagios/bin/nagiostats binary which executes and exits immediately, but does not report in a very machine-parseable way.

Both of these are essentially point-in-time reports, so if you are looking to get the aggregate over a week it will need to involve periodic polling and recording of this data.