Generate csv report of peak cpu and ram for all host

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
monit_burb
Posts: 52
Joined: Fri Sep 23, 2016 3:00 am

Generate csv report of peak cpu and ram for all host

Post by monit_burb »

Hi,

Is it possible to generate a report in csv format for peak cpu and ram for all nagios hosts? I'll that data for the longest time period available. I've been looking around the reporting section but I don't see anything that fits what I need.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Generate csv report of peak cpu and ram for all host

Post by rkennedy »

Currently the CSV output isn't going to be possible. You can take a look at Home -> Metrics though - is this similar to what you're looking for?

I filed a FR to have CSV output for the Metrics component, and to turn it into an actual report that could be scheduled. The ID is #10221
Former Nagios Employee
monit_burb
Posts: 52
Joined: Fri Sep 23, 2016 3:00 am

Re: Generate csv report of peak cpu and ram for all host

Post by monit_burb »

rkennedy wrote:Currently the CSV output isn't going to be possible. You can take a look at Home -> Metrics though - is this similar to what you're looking for?

I filed a FR to have CSV output for the Metrics component, and to turn it into an actual report that could be scheduled. The ID is #10221
Than you for the reply but as you said, this is not what I'm looking for. I've used a hand script a college of mine made that reads the rrd files of the hosts and generates statistical data in csv format. It takes like 10 minutes for each host but at least I get what I need.

It will be nice to include something like this in Nagiosxi to create capacity plans of the whole monitored infrastructure and not of just one host.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Generate csv report of peak cpu and ram for all host

Post by ssax »

Feel free to post your script here so that we can see exactly the type of information that you're looking for (and also so the developers will be able to see what you want when looking at the feature request).

I've created a separate feature request for adding this to the API as well:

Code: Select all

NEW TASK ID 10274 created - Nagios XI Feature Request: API - rrdexport/cpexport add the ability to query all hosts and to limit by multiple hosts, hostgroups, servicegroups, etc
Thank you

EDIT: I also noted in the feature request "adjustable Home > Metrics component" functionality.
monit_burb
Posts: 52
Joined: Fri Sep 23, 2016 3:00 am

Re: Generate csv report of peak cpu and ram for all host

Post by monit_burb »

ssax wrote:Feel free to post your script here so that we can see exactly the type of information that you're looking for (and also so the developers will be able to see what you want when looking at the feature request).

I've created a separate feature request for adding this to the API as well:

Code: Select all

NEW TASK ID 10274 created - Nagios XI Feature Request: API - rrdexport/cpexport add the ability to query all hosts and to limit by multiple hosts, hostgroups, servicegroups, etc
Thank you

EDIT: I also noted in the feature request "adjustable Home > Metrics component" functionality.
We have more than 1 script do to the job but basically we use the "rrdtool dump" to create an xml file for each host for the check of the RAM, CPU and Storage for a specific period of time like 1 year. With the xml generated, we parse that date to get the following for each host:

host,type,check,min,max,mean,median,stdDev,percentile95,skewness,kurtosis,datasize,total,units,nMax,nMin,nMean,nMedian,nTotal (this lasts with n is just the values normalized to GB)
SERVERWINDC1,ram,RAM_Memory,1077.8236167,6067.8144667,3593.317138451722,3851.4493533,532.0202634573701,3964.0597333,-1.9909422063222877,8.447896993958144,31038,10235.85,MB,5.925600065136718,1.0525621256835938,3.5090987680192596,3.7611810090820312,9.995947265625

This is a very specific need for us but the idea is use all the data stored on the rrd files to create capacity plans for the whole infrastructure cheeking CPU, RAM and Storage. The reporting and capacity plan capabilities at least in the version we are using (Nagios XI 2014R1.2) only focus on a per host basis and don't have a lot of exporting options.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Generate csv report of peak cpu and ram for all host

Post by ssax »

Thanks for that info!

The later versions of capacity planning allow you to select by host, hostgroup, and servicegroup but each graph is still based per host, there is no consolidated view of it at this time.
Locked