Page 1 of 1

Get CPU and Memory data from Nagios

Posted: Mon Mar 13, 2017 7:32 am
by aap
Hello,

An unusual request maybe - Is there a way that I can get the Average, Min and Max counters for CPU and Memory for hosts being monitotred by Nagios for say last 2 weeks?

I know this information is available in the performance graphs but I was looking for a way to do this via the script and get the information on a command line.

Any assistnce is appreciated.

Re: Get CPU and Memory data from Nagios

Posted: Mon Mar 13, 2017 11:19 am
by mcapra
If you have an Enterprise license, you should be able to use the rrdexport API endpoint. Usage can be found in the "Help" section of your Nagios XI GUI. If you don't have enterprise, rrdxport is another option.

As an example, to get the rta for the localhost PING service:

Code: Select all

curl -XGET "http://192.168.67.11/nagiosxi/api/v1/objects/cpexport?apikey=<api_key_here>&pretty=1&host_name=localhost&service_description=PING&track=rta"
Which spits out:

Code: Select all

{
    "emax": 0.08101789294232,
    "eslope": -6.0179736441792e-11,
    "evalue_max": 0.033573631363097,
    "t_start": 1488211200,
    "warn_level": 100,
    "dmean": 0.029692525252525,
    "t_stop": 1490027400,
    "dmax": 0.13476944444444,
    "integrity": 0.40861812778603,
    "unit": "ms",
    "residue": 0.012963440232965,
    "emean": 0.029244522840266,
    "edate": 1490025600,
    "evalue": 0.029181498204823,
    "nd": 672,
    "ne": 336,
    "evalue_min": 0.024789365046549,
    "adjusted_sigma": 0.010748747692794,
    "t_step": 1800,
    "crit_level": 500,
    "f_of_x_on_date": 0.029619731843325,
    "sigma": 0.0043921331582737,
    "data": {
        "historical": {
            "1488211200": 0.029692525252525,
            "1488213000": 0.029692525252525,
            "1488214800": 0.029692525252525,
            "1488216600": 0.029692525252525,
            "1488218400": 0.029692525252525,
            "1488220200": 0.029692525252525,
            "1488222000": 0.029692525252525,
            "1488223800": 0.029692525252525,
            "1488225600": 0.029692525252525,
            "1488227400": 0.029692525252525,
            "1488229200": 0.029692525252525,
            "1488231000": 0.029692525252525,
            "1488232800": 0.029692525252525,
            "1488234600": 0.029692525252525,
            "1488236400": 0.029692525252525,
            "1488238200": 0.029692525252525,
            "1488240000": 0.029692525252525,
            "1488241800": 0.029692525252525,
            "1488243600": 0.029692525252525,
            "1488245400": 0.029692525252525,
            "1488247200": 0.029692525252525,
            "1488249000": 0.029692525252525,
            "1488250800": 0.029692525252525,
            "1488252600": 0.029692525252525,
            "1488254400": 0.029692525252525,
            "1488256200": 0.029692525252525,
            "1488258000": 0.029692525252525,
            "1488259800": 0.029692525252525,
            "1488261600": 0.029692525252525,
            "1488263400": 0.029692525252525,
            "1488265200": 0.029692525252525,
            "1488267000": 0.029692525252525,
            "1488268800": 0.029692525252525,
            "1488270600": 0.029692525252525,
            "1488272400": 0.029692525252525,
            "1488274200": 0.029692525252525,
            "1488276000": 0.029692525252525,
            "1488277800": 0.029692525252525,
            "1488279600": 0.029692525252525,
            "1488281400": 0.029692525252525,
            "1488283200": 0.029692525252525,
            "1488285000": 0.029692525252525,
            "1488286800": 0.029692525252525,
            "1488288600": 0.029692525252525,
            "1488290400": 0.029692525252525,
            "1488292200": 0.029692525252525,
            "1488294000": 0.029692525252525,
            "1488295800": 0.029692525252525,
            "1488297600": 0.029692525252525,
            "1488299400": 0.029692525252525,
            "1488301200": 0.029692525252525,
            "1488303000": 0.029692525252525,
            "1488304800": 0.029692525252525,
            "1488306600": 0.029692525252525,
            "1488308400": 0.029692525252525,
            "1488310200": 0.029692525252525,
            "1488312000": 0.029692525252525,
            "1488313800": 0.029692525252525,
            "1488315600": 0.029692525252525,
            "1488317400": 0.029692525252525,
            "1488319200": 0.029692525252525,
            "1488321000": 0.029692525252525,
            "1488322800": 0.029692525252525,
            "1488324600": 0.029692525252525,
            "1488326400": 0.029692525252525,
            "1488328200": 0.029692525252525,
            "1488330000": 0.029692525252525,
            "1488331800": 0.029692525252525,
            "1488333600": 0.029692525252525,
            "1488335400": 0.029692525252525,
            "1488337200": 0.029692525252525,
            "1488339000": 0.029692525252525,
            "1488340800": 0.029692525252525,
            "1488342600": 0.029692525252525,
            "1488344400": 0.029692525252525,
            "1488346200": 0.029692525252525,
            "1488348000": 0.029692525252525,
            "1488349800": 0.029692525252525,
            "1488351600": 0.029692525252525,
            "1488353400": 0.029692525252525,
            "1488355200": 0.029692525252525,
            "1488357000": 0.029692525252525,
            "1488358800": 0.029692525252525,
            "1488360600": 0.029692525252525,
            "1488362400": 0.029692525252525,
            "1488364200": 0.029692525252525,
            "1488366000": 0.029692525252525,
            "1488367800": 0.029692525252525,
            "1488369600": 0.029692525252525,
            "1488371400": 0.029692525252525,
            "1488373200": 0.029692525252525,
            "1488375000": 0.029692525252525,
            "1488376800": 0.029692525252525,
            "1488378600": 0.029692525252525,
            "1488380400": 0.029692525252525,
            "1488382200": 0.029692525252525,
            "1488384000": 0.029692525252525,
            "1488385800": 0.029692525252525,
            "1488387600": 0.029692525252525,
            "1488389400": 0.029692525252525,
            "1488391200": 0.029692525252525,
            "1488393000": 0.029692525252525,
            "1488394800": 0.029692525252525,
            "1488396600": 0.029692525252525,
            "1488398400": 0.029692525252525,
            "1488400200": 0.029692525252525,
            "1488402000": 0.029692525252525,
            "1488403800": 0.029692525252525,
            "1488405600": 0.029692525252525,
            "1488407400": 0.029692525252525,
            "1488409200": 0.029692525252525,
            "1488411000": 0.029692525252525,
            "1488412800": 0.029692525252525,
            "1488414600": 0.029692525252525,
            "1488416400": 0.029692525252525,
            "1488418200": 0.029692525252525,
            "1488420000": 0.029692525252525,
            "1488421800": 0.029692525252525,
            "1488423600": 0.029692525252525,
            "1488425400": 0.029692525252525,
            "1488427200": 0.029692525252525,
            "1488429000": 0.029692525252525,
            "1488430800": 0.029692525252525,
            "1488432600": 0.029692525252525,
            "1488434400": 0.029692525252525,
            "1488436200": 0.029692525252525,
            "1488438000": 0.029692525252525,
            "1488439800": 0.029692525252525,
            "1488441600": 0.029692525252525,
            "1488443400": 0.029692525252525,
            "1488445200": 0.029692525252525,
            "1488447000": 0.029692525252525,
            "1488448800": 0.029692525252525,
            "1488450600": 0.029692525252525,
            "1488452400": 0.029692525252525,
            "1488454200": 0.029692525252525,
            "1488456000": 0.029692525252525,
            "1488457800": 0.029692525252525,
            "1488459600": 0.029692525252525,
            "1488461400": 0.029692525252525,
            "1488463200": 0.029692525252525,
            "1488465000": 0.029692525252525,
            "1488466800": 0.029692525252525,
            "1488468600": 0.029692525252525,
            "1488470400": 0.029692525252525,
            "1488472200": 0.029692525252525,
            "1488474000": 0.029692525252525,
            "1488475800": 0.029692525252525,
            "1488477600": 0.029692525252525,
            "1488479400": 0.029692525252525,
            "1488481200": 0.029692525252525,
            "1488483000": 0.029692525252525,
            "1488484800": 0.029692525252525,
            "1488486600": 0.029692525252525,
            "1488488400": 0.029692525252525,
            "1488490200": 0.029692525252525,
            "1488492000": 0.029692525252525,
            "1488493800": 0.029692525252525,
            "1488495600": 0.029692525252525,
            "1488497400": 0.029692525252525,
            "1488499200": 0.029692525252525,
            "1488501000": 0.029692525252525,
            "1488502800": 0.029692525252525,
            "1488504600": 0.029692525252525,
            "1488506400": 0.029692525252525,
            "1488508200": 0.029692525252525,
            "1488510000": 0.029692525252525,
            "1488511800": 0.029692525252525,
            "1488513600": 0.029692525252525,
            "1488515400": 0.029692525252525,
            "1488517200": 0.029692525252525,
            "1488519000": 0.029692525252525,
            "1488520800": 0.029692525252525,
            "1488522600": 0.029692525252525,
            "1488524400": 0.029692525252525,
            "1488526200": 0.029692525252525,
            "1488528000": 0.029692525252525,
            "1488529800": 0.029692525252525,
            "1488531600": 0.029692525252525,
            "1488533400": 0.029692525252525,
            "1488535200": 0.029692525252525,
            "1488537000": 0.029692525252525,
            "1488538800": 0.029692525252525,
            "1488540600": 0.029692525252525,
            "1488542400": 0.029692525252525,
            "1488544200": 0.029692525252525,
            "1488546000": 0.029692525252525,
            "1488547800": 0.029692525252525,
            "1488549600": 0.029692525252525,
            "1488551400": 0.029692525252525,
            "1488553200": 0.029692525252525,
            "1488555000": 0.029692525252525,
            "1488556800": 0.029692525252525,
            "1488558600": 0.029692525252525,
            "1488560400": 0.029692525252525,
            "1488562200": 0.029692525252525,
            "1488564000": 0.029692525252525,
            "1488565800": 0.029692525252525,
            "1488567600": 0.029692525252525,
            "1488569400": 0.029692525252525,
            "1488571200": 0.029692525252525,
            "1488573000": 0.029692525252525,
            "1488574800": 0.029692525252525,
            "1488576600": 0.029692525252525,
            "1488578400": 0.029692525252525,
            "1488580200": 0.029692525252525,
            "1488582000": 0.029692525252525,
            "1488583800": 0.029692525252525,
            "1488585600": 0.029692525252525,
            "1488587400": 0.029692525252525,
            "1488589200": 0.029692525252525,
            "1488591000": 0.029692525252525,
            "1488592800": 0.029692525252525,
            "1488594600": 0.029692525252525,
            "1488596400": 0.029692525252525,
            "1488598200": 0.029692525252525,
            "1488600000": 0.029692525252525,
            "1488601800": 0.029692525252525,
            "1488603600": 0.029692525252525,
            "1488605400": 0.029692525252525,
            "1488607200": 0.029692525252525,
            "1488609000": 0.029692525252525,
            "1488610800": 0.029692525252525,
            "1488612600": 0.029692525252525,
            "1488614400": 0.029692525252525,
            "1488616200": 0.029692525252525,
            "1488618000": 0.029692525252525,
            "1488619800": 0.029692525252525,
            "1488621600": 0.029692525252525,
            "1488623400": 0.029692525252525,
            "1488625200": 0.029692525252525,
            "1488627000": 0.029692525252525,
            "1488628800": 0.029692525252525,
            "1488630600": 0.029692525252525,
            "1488632400": 0.029692525252525,
            "1488634200": 0.029692525252525,
            "1488636000": 0.029692525252525,
            "1488637800": 0.029692525252525,
            "1488639600": 0.029692525252525,
            "1488641400": 0.029692525252525,
            "1488643200": 0.029692525252525,
            "1488645000": 0.029692525252525,
            "1488646800": 0.029692525252525,
            "1488648600": 0.029692525252525,
            "1488650400": 0.029692525252525,
            "1488652200": 0.029692525252525,
            "1488654000": 0.029692525252525,
            "1488655800": 0.029692525252525,
            "1488657600": 0.029692525252525,
            "1488659400": 0.029692525252525,
            "1488661200": 0.029692525252525,
            "1488663000": 0.029692525252525,
            "1488664800": 0.029692525252525,
            "1488666600": 0.029692525252525,
            "1488668400": 0.029692525252525,
            "1488670200": 0.029692525252525,
            "1488672000": 0.029692525252525,
            "1488673800": 0.029692525252525,
            "1488675600": 0.029692525252525,
            "1488677400": 0.029692525252525,
            "1488679200": 0.029692525252525,
            "1488681000": 0.029692525252525,
            "1488682800": 0.029692525252525,
            "1488684600": 0.029692525252525,
            "1488686400": 0.029692525252525,
            "1488688200": 0.029692525252525,
            "1488690000": 0.029692525252525,
            "1488691800": 0.029692525252525,
            "1488693600": 0.029692525252525,
            "1488695400": 0.029692525252525,
            "1488697200": 0.029692525252525,
            "1488699000": 0.029692525252525,
            "1488700800": 0.029692525252525,
            "1488702600": 0.029692525252525,
            "1488704400": 0.029692525252525,
            "1488706200": 0.029692525252525,
            "1488708000": 0.029692525252525,
            "1488709800": 0.029692525252525,
            "1488711600": 0.029692525252525,
            "1488713400": 0.029692525252525,
            "1488715200": 0.029692525252525,
            "1488717000": 0.029692525252525,
            "1488718800": 0.029692525252525,
            "1488720600": 0.029692525252525,
            "1488722400": 0.029692525252525,
            "1488724200": 0.029692525252525,
            "1488726000": 0.029692525252525,
            "1488727800": 0.029692525252525,
            "1488729600": 0.029692525252525,
            "1488731400": 0.029692525252525,
            "1488733200": 0.029692525252525,
            "1488735000": 0.029692525252525,
            "1488736800": 0.029692525252525,
            "1488738600": 0.029692525252525,
            "1488740400": 0.029692525252525,
            "1488742200": 0.029692525252525,
            "1488744000": 0.029692525252525,
            "1488745800": 0.029692525252525,
            "1488747600": 0.029692525252525,
            "1488749400": 0.029692525252525,
            "1488751200": 0.029692525252525,
            "1488753000": 0.029692525252525,
            "1488754800": 0.029692525252525,
            "1488756600": 0.029692525252525,
            "1488758400": 0.029692525252525,
            "1488760200": 0.029692525252525,
            "1488762000": 0.029692525252525,
            "1488763800": 0.029692525252525,
            "1488765600": 0.029692525252525,
            "1488767400": 0.029692525252525,
            "1488769200": 0.029692525252525,
            "1488771000": 0.029692525252525,
            "1488772800": 0.029692525252525,
            "1488774600": 0.029692525252525,
            "1488776400": 0.029692525252525,
            "1488778200": 0.029692525252525,
            "1488780000": 0.029692525252525,
            "1488781800": 0.029692525252525,
            "1488783600": 0.029692525252525,
            "1488785400": 0.029692525252525,
            "1488787200": 0.029692525252525,
            "1488789000": 0.029692525252525,
            "1488790800": 0.029692525252525,
            "1488792600": 0.029692525252525,
            "1488794400": 0.029692525252525,
            "1488796200": 0.029692525252525,
            "1488798000": 0.029692525252525,
            "1488799800": 0.029692525252525,
            "1488801600": 0.029692525252525,
            "1488803400": 0.029692525252525,
            "1488805200": 0.029692525252525,
            "1488807000": 0.029692525252525,
            "1488808800": 0.029692525252525,
            "1488810600": 0.029692525252525,
            "1488812400": 0.029692525252525,
            "1488814200": 0.029692525252525,
            "1488816000": 0.029692525252525,
            "1488817800": 0.029692525252525,
            "1488819600": 0.029692525252525,
            "1488821400": 0.029692525252525,
            "1488823200": 0.029692525252525,
            "1488825000": 0.029692525252525,
            "1488826800": 0.029692525252525,
            "1488828600": 0.029692525252525,
            "1488830400": 0.029692525252525,
            "1488832200": 0.029692525252525,
            "1488834000": 0.029692525252525,
            "1488835800": 0.029692525252525,
            "1488837600": 0.029692525252525,
            "1488839400": 0.029692525252525,
            "1488841200": 0.029692525252525,
            "1488843000": 0.029692525252525,
            "1488844800": 0.029692525252525,
            "1488846600": 0.029692525252525,
            "1488848400": 0.029692525252525,
            "1488850200": 0.029692525252525,
            "1488852000": 0.029692525252525,
            "1488853800": 0.029692525252525,
            "1488855600": 0.029692525252525,
            "1488857400": 0.029692525252525,
            "1488859200": 0.029692525252525,
            "1488861000": 0.029692525252525,
            "1488862800": 0.029692525252525,
            "1488864600": 0.029692525252525,
            "1488866400": 0.029692525252525,
            "1488868200": 0.029692525252525,
            "1488870000": 0.029692525252525,
            "1488871800": 0.029692525252525,
            "1488873600": 0.029692525252525,
            "1488875400": 0.029692525252525,
            "1488877200": 0.029692525252525,
            "1488879000": 0.029692525252525,
            "1488880800": 0.029692525252525,
            "1488882600": 0.029692525252525,
            "1488884400": 0.029692525252525,
            "1488886200": 0.029692525252525,
            "1488888000": 0.029692525252525,
            "1488889800": 0.029692525252525,
            "1488891600": 0.029692525252525,
            "1488893400": 0.029692525252525,
            "1488895200": 0.029692525252525,
            "1488897000": 0.029692525252525,
            "1488898800": 0.029692525252525,
            "1488900600": 0.029692525252525,
            "1488902400": 0.029692525252525,
            "1488904200": 0.029692525252525,
            "1488906000": 0.029692525252525,
            "1488907800": 0.029692525252525,
            "1488909600": 0.029692525252525,
            "1488911400": 0.029692525252525,
            "1488913200": 0.029692525252525,
            "1488915000": 0.029692525252525,
            "1488916800": 0.029692525252525,
            "1488918600": 0.029692525252525,
            "1488920400": 0.029692525252525,
            "1488922200": 0.029692525252525,
            "1488924000": 0.029692525252525,
            "1488925800": 0.028199333333333,
            "1488927600": 0.027797333333333,
            "1488929400": 0.028796666666667,
            "1488931200": 0.027705777777778,
            "1488933000": 0.029260888888889,
            "1488934800": 0.027898666666667,
            "1488936600": 0.028567777777778,
            "1488938400": 0.027966666666667,
            "1488940200": 0.031491777777778,
            "1488942000": 0.029932888888889,
            "1488943800": 0.029602444444444,
            "1488945600": 0.028367777777778,
            "1488947400": 0.028203333333333,
            "1488949200": 0.027365333333333,
            "1488951000": 0.029268,
            "1488952800": 0.027168888888889,
            "1488954600": 0.02896,
            "1488956400": 0.028440666666667,
            "1488958200": 0.028768777777778,
            "1488960000": 0.029303111111111,
            "1488961800": 0.028202333333333,
            "1488963600": 0.029497666666667,
            "1488965400": 0.030699,
            "1488967200": 0.029305111111111,
            "1488969000": 0.027466888888889,
            "1488970800": 0.030030666666667,
            "1488972600": 0.028500888888889,
            "1488974400": 0.030634222222222,
            "1488976200": 0.027703777777778,
            "1488978000": 0.027265555555556,
            "1488979800": 0.030334666666667,
            "1488981600": 0.027764888888889,
            "1488983400": 0.030161222222222,
            "1488985200": 0.029103333333333,
            "1488987000": 0.028729444444444,
            "1488988800": 0.027670888888889,
            "1488990600": 0.030333777777778,
            "1488992400": 0.029928777777778,
            "1488994200": 0.028406111111111,
            "1488996000": 0.030063333333333,
            "1488997800": 0.02787,
            "1488999600": 0.029999111111111,
            "1489001400": 0.031957777777778,
            "1489003200": 0.029450888888889,
            "1489005000": 0.027597555555556,
            "1489006800": 0.027634666666667,
            "1489008600": 0.028026888888889,
            "1489010400": 0.02867,
            "1489012200": 0.028735555555556,
            "1489014000": 0.029827111111111,
            "1489015800": 0.028073555555556,
            "1489017600": 0.028666222222222,
            "1489019400": 0.027401111111111,
            "1489021200": 0.028698222222222,
            "1489023000": 0.028060666666667,
            "1489024800": 0.030172777777778,
            "1489026600": 0.030365777777778,
            "1489028400": 0.030165777777778,
            "1489030200": 0.028606555555556,
            "1489032000": 0.030557777777778,
            "1489033800": 0.033890444444444,
            "1489035600": 0.030753555555556,
            "1489037400": 0.046272,
            "1489039200": 0.028306777777778,
            "1489041000": 0.027800888888889,
            "1489042800": 0.028866444444444,
            "1489044600": 0.031033333333333,
            "1489046400": 0.028864888888889,
            "1489048200": 0.027869555555556,
            "1489050000": 0.13476944444444,
            "1489051800": 0.028914666666667,
            "1489053600": 0.03133,
            "1489055400": 0.028462888888889,
            "1489057200": 0.028167555555556,
            "1489059000": 0.028000888888889,
            "1489060800": 0.028130888888889,
            "1489062600": 0.028567333333333,
            "1489064400": 0.029098,
            "1489066200": 0.029865333333333,
            "1489068000": 0.029339111111111,
            "1489069800": 0.028029777777778,
            "1489071600": 0.031127111111111,
            "1489073400": 0.029674,
            "1489075200": 0.029699333333333,
            "1489077000": 0.031598888888889,
            "1489078800": 0.029163777777778,
            "1489080600": 0.028976,
            "1489082400": 0.028831666666667,
            "1489084200": 0.029003333333333,
            "1489086000": 0.029332444444444,
            "1489087800": 0.030934,
            "1489089600": 0.027605444444444,
            "1489091400": 0.028965222222222,
            "1489093200": 0.027467,
            "1489095000": 0.028435444444444,
            "1489096800": 0.028267444444444,
            "1489098600": 0.027433333333333,
            "1489100400": 0.028199666666667,
            "1489102200": 0.028302444444444,
            "1489104000": 0.028000666666667,
            "1489105800": 0.027800666666667,
            "1489107600": 0.029362777777778,
            "1489109400": 0.028475444444444,
            "1489111200": 0.028032888888889,
            "1489113000": 0.028065777777778,
            "1489114800": 0.028405111111111,
            "1489116600": 0.031557444444444,
            "1489118400": 0.028400777777778,
            "1489120200": 0.029508333333333,
            "1489122000": 0.029735111111111,
            "1489123800": 0.029331888888889,
            "1489125600": 0.029399888888889,
            "1489127400": 0.030501,
            "1489129200": 0.028365222222222,
            "1489131000": 0.028034777777778,
            "1489132800": 0.028934666666667,
            "1489134600": 0.028865777777778,
            "1489136400": 0.028899444444444,
            "1489138200": 0.029032666666667,
            "1489140000": 0.029168888888889,
            "1489141800": 0.027865777777778,
            "1489143600": 0.030666666666667,
            "1489145400": 0.027735555555556,
            "1489147200": 0.028865111111111,
            "1489149000": 0.029638333333333,
            "1489150800": 0.032165666666667,
            "1489152600": 0.028504777777778,
            "1489154400": 0.029965222222222,
            "1489156200": 0.027938111111111,
            "1489158000": 0.028469,
            "1489159800": 0.029865111111111,
            "1489161600": 0.028036222222222,
            "1489163400": 0.027766555555556,
            "1489165200": 0.027832,
            "1489167000": 0.028199333333333,
            "1489168800": 0.029065111111111,
            "1489170600": 0.028168777777778,
            "1489172400": 0.028499333333333,
            "1489174200": 0.028567888888889,
            "1489176000": 0.031567333333333,
            "1489177800": 0.028669555555556,
            "1489179600": 0.028500444444444,
            "1489181400": 0.027333777777778,
            "1489183200": 0.026932555555556,
            "1489185000": 0.028600777777778,
            "1489186800": 0.029098555555556,
            "1489188600": 0.028866555555556,
            "1489190400": 0.029436222222222,
            "1489192200": 0.030166444444444,
            "1489194000": 0.029167111111111,
            "1489195800": 0.028267,
            "1489197600": 0.031937333333333,
            "1489199400": 0.029733888888889,
            "1489201200": 0.027932777777778,
            "1489203000": 0.028400333333333,
            "1489204800": 0.028600333333333,
            "1489206600": 0.031499777777778,
            "1489208400": 0.027567888888889,
            "1489210200": 0.027666666666667,
            "1489212000": 0.029467111111111,
            "1489213800": 0.029867777777778,
            "1489215600": 0.028265888888889,
            "1489217400": 0.028666666666667,
            "1489219200": 0.028699333333333,
            "1489221000": 0.027797555555556,
            "1489222800": 0.030151555555556,
            "1489224600": 0.028869222222222,
            "1489226400": 0.029366,
            "1489228200": 0.029230333333333,
            "1489230000": 0.029036222222222,
            "1489231800": 0.027966777777778,
            "1489233600": 0.028232444444444,
            "1489235400": 0.030866555555556,
            "1489237200": 0.028000444444444,
            "1489239000": 0.028202111111111,
            "1489240800": 0.029397777777778,
            "1489242600": 0.029771222222222,
            "1489244400": 0.029533666666667,
            "1489246200": 0.029133666666667,
            "1489248000": 0.030466444444444,
            "1489249800": 0.029201666666667,
            "1489251600": 0.027698222222222,
            "1489253400": 0.028132888888889,
            "1489255200": 0.029198444444444,
            "1489257000": 0.029798777777778,
            "1489258800": 0.028599555555556,
            "1489260600": 0.036400111111111,
            "1489262400": 0.029365444444444,
            "1489264200": 0.030002666666667,
            "1489266000": 0.029434666666667,
            "1489267800": 0.028932777777778,
            "1489269600": 0.029930444444444,
            "1489271400": 0.030068777777778,
            "1489273200": 0.029032888888889,
            "1489275000": 0.029066333333333,
            "1489276800": 0.028103111111111,
            "1489278600": 0.028731333333333,
            "1489280400": 0.029599222222222,
            "1489282200": 0.030667666666667,
            "1489284000": 0.028597222222222,
            "1489285800": 0.028699555555556,
            "1489287600": 0.029395888888889,
            "1489289400": 0.028601777777778,
            "1489291200": 0.028232888888889,
            "1489293000": 0.027800444444444,
            "1489294800": 0.028833111111111,
            "1489296600": 0.028065777777778,
            "1489298400": 0.028310222222222,
            "1489300200": 0.028498888888889,
            "1489302000": 0.030065333333333,
            "1489303800": 0.060234555555556,
            "1489305600": 0.029632888888889,
            "1489307400": 0.027900333333333,
            "1489309200": 0.028566777777778,
            "1489311000": 0.029334,
            "1489312800": 0.028301333333333,
            "1489314600": 0.028969,
            "1489316400": 0.027265666666667,
            "1489318200": 0.031934222222222,
            "1489320000": 0.029164333333333,
            "1489321800": 0.029635111111111,
            "1489323600": 0.032267,
            "1489325400": 0.027837111111111,
            "1489327200": 0.030265,
            "1489329000": 0.028634666666667,
            "1489330800": 0.029632555555556,
            "1489332600": 0.029934222222222,
            "1489334400": 0.02867,
            "1489336200": 0.028730555555556,
            "1489338000": 0.028867,
            "1489339800": 0.029500222222222,
            "1489341600": 0.038871777777778,
            "1489343400": 0.036098222222222,
            "1489345200": 0.029562444444444,
            "1489347000": 0.030782888888889,
            "1489348800": 0.031991444444444,
            "1489350600": 0.031072888888889,
            "1489352400": 0.028930333333333,
            "1489354200": 0.029099222222222,
            "1489356000": 0.029499777777778,
            "1489357800": 0.028033555555556,
            "1489359600": 0.029566333333333,
            "1489361400": 0.028599666666667,
            "1489363200": 0.029232444444444,
            "1489365000": 0.037327333333333,
            "1489366800": 0.028578,
            "1489368600": 0.029467333333333,
            "1489370400": 0.029463222222222,
            "1489372200": 0.028234111111111,
            "1489374000": 0.028800666666667,
            "1489375800": 0.027333777777778,
            "1489377600": 0.028101111111111,
            "1489379400": 0.028501888888889,
            "1489381200": 0.030030111111111,
            "1489383000": 0.028635666666667,
            "1489384800": 0.029068666666667,
            "1489386600": 0.028464444444444,
            "1489388400": 0.027135666666667,
            "1489390200": 0.026500666666667,
            "1489392000": 0.030327333333333,
            "1489393800": 0.028903444444444,
            "1489395600": 0.031364333333333,
            "1489397400": 0.028077222222222,
            "1489399200": 0.028868888888889,
            "1489401000": 0.027903444444444,
            "1489402800": 0.027863444444444,
            "1489404600": 0.028868222222222,
            "1489406400": 0.028195666666667,
            "1489408200": 0.033533222222222,
            "1489410000": 0.030565666666667,
            "1489411800": 0.029096777777778,
            "1489413600": 0.028002555555556,
            "1489415400": 0.027699777777778,
            "1489417200": 0.026467333333333,
            "1489419000": 0.028995888888889,
            "1489420800": 0.029692525252525
        },
        "predicted": {
            "1489422600": 0.029306915797535,
            "1489424400": 0.029306611583729,
            "1489426200": 0.029306299640856,
            "1489428000": 0.029305980781347,
            "1489429800": 0.029305655735246,
            "1489431600": 0.029305325157941,
            "1489433400": 0.029304989637306,
            "1489435200": 0.029304649700256,
            "1489437000": 0.029304305818754,
            "1489438800": 0.029303958415296,
            "1489440600": 0.029303607867888,
            "1489442400": 0.02930325451458,
            "1489444200": 0.029302898657557,
            "1489446000": 0.029302540566849,
            "1489447800": 0.029302180483668,
            "1489449600": 0.029301818623424,
            "1489451400": 0.02930145517843,
            "1489453200": 0.029301090320345,
            "1489455000": 0.029300724202354,
            "1489456800": 0.029300356961133,
            "1489458600": 0.029299988718611,
            "1489460400": 0.029299619583542,
            "1489462200": 0.029299249652914,
            "1489464000": 0.029298879013218,
            "1489465800": 0.029298507741572,
            "1489467600": 0.02929813590673,
            "1489469400": 0.029297763569986,
            "1489471200": 0.029297390785978,
            "1489473000": 0.029297017603409,
            "1489474800": 0.029296644065688,
            "1489476600": 0.029296270211505,
            "1489478400": 0.029295896075338,
            "1489480200": 0.029295521687918,
            "1489482000": 0.029295147076627,
            "1489483800": 0.029294772265867,
            "1489485600": 0.029294397277385,
            "1489487400": 0.029294022130555,
            "1489489200": 0.029293646842644,
            "1489491000": 0.029293271429036,
            "1489492800": 0.029292895903437,
            "1489494600": 0.029292520278061,
            "1489496400": 0.029292144563791,
            "1489498200": 0.029291768770321,
            "1489500000": 0.029291392906292,
            "1489501800": 0.029291016979398,
            "1489503600": 0.029290640996499,
            "1489505400": 0.029290264963702,
            "1489507200": 0.029289888886452,
            "1489509000": 0.029289512769598,
            "1489510800": 0.029289136617461,
            "1489512600": 0.029288760433889,
            "1489514400": 0.029288384222313,
            "1489516200": 0.029288007985788,
            "1489518000": 0.029287631727035,
            "1489519800": 0.029287255448481,
            "1489521600": 0.029286879152284,
            "1489523400": 0.029286502840371,
            "1489525200": 0.029286126514457,
            "1489527000": 0.029285750176068,
            "1489528800": 0.028549005604982,
            "1489530600": 0.028350386018975,
            "1489532400": 0.028842838225074,
            "1489534200": 0.028304500047645,
            "1489536000": 0.029071024435861,
            "1489537800": 0.028398890865458,
            "1489539600": 0.028728486742521,
            "1489541400": 0.028431692903988,
            "1489543200": 0.030169614737333,
            "1489545000": 0.029400520614005,
            "1489546800": 0.029237199238203,
            "1489548600": 0.028628019010466,
            "1489550400": 0.028546564630431,
            "1489552200": 0.028132986823312,
            "1489554000": 0.029070801467211,
            "1489555800": 0.0280353973678,
            "1489557600": 0.028918194322905,
            "1489559400": 0.028661754967811,
            "1489561200": 0.028823166588468,
            "1489563000": 0.029086250409671,
            "1489564800": 0.02854313803763,
            "1489566600": 0.029181425579304,
            "1489568400": 0.029773333345012,
            "1489570200": 0.029085728685267,
            "1489572000": 0.028179077107742,
            "1489573800": 0.029442690026567,
            "1489575600": 0.028688123382762,
            "1489577400": 0.029739474677213,
            "1489579200": 0.028294414472927,
            "1489581000": 0.028078008136176,
            "1489582800": 0.029590666933866,
            "1489584600": 0.028323448089779,
            "1489586400": 0.029504401970315,
            "1489588200": 0.02898252267158,
            "1489590000": 0.02879784001901,
            "1489591800": 0.028275653443319,
            "1489593600": 0.029587943317333,
            "1489595400": 0.029387917377288,
            "1489597200": 0.02863697720243,
            "1489599000": 0.02945348418823,
            "1489600800": 0.028371982533724,
            "1489602600": 0.02942107264672,
            "1489604400": 0.030386087792176,
            "1489606200": 0.02915009207013,
            "1489608000": 0.028236243350154,
            "1489609800": 0.028254166784263,
            "1489611600": 0.02844712049868,
            "1489613400": 0.028763728603158,
            "1489615200": 0.028795669391974,
            "1489617000": 0.029333280662413,
            "1489618800": 0.028468656947833,
            "1489620600": 0.02876038765809,
            "1489622400": 0.028136511503629,
            "1489624200": 0.02877542396548,
            "1489626000": 0.028460843228315,
            "1489627800": 0.029501383251514,
            "1489629600": 0.029596103978678,
            "1489631400": 0.029497152504276,
            "1489633200": 0.028728390412016,
            "1489635000": 0.029689560411185,
            "1489636800": 0.031331379444506,
            "1489638600": 0.02978523939309,
            "1489640400": 0.037430874045086,
            "1489642200": 0.028578931809251,
            "1489644000": 0.028329269342634,
            "1489645800": 0.028853897372059,
            "1489647600": 0.029921164881846,
            "1489649400": 0.028852382516016,
            "1489651200": 0.028361591739034,
            "1489653000": 0.08101789294232,
            "1489654800": 0.028876344836291,
            "1489656600": 0.030065658562049,
            "1489658400": 0.028652865572429,
            "1489660200": 0.028506903007262,
            "1489662000": 0.028424341149196,
            "1489663800": 0.02848794459965,
            "1489665600": 0.028702533095049,
            "1489667400": 0.028963555414317,
            "1489669200": 0.029341174502492,
            "1489671000": 0.029081563217306,
            "1489672800": 0.028436170623605,
            "1489674600": 0.029961588018335,
            "1489676400": 0.029245392477241,
            "1489678200": 0.029257492958003,
            "1489680000": 0.030192824672476,
            "1489681800": 0.028992931755904,
            "1489683600": 0.028900055255794,
            "1489685400": 0.028828580728667,
            "1489687200": 0.028912765378377,
            "1489689000": 0.029074504411429,
            "1489690800": 0.029863006873063,
            "1489692600": 0.028223086086501,
            "1489694400": 0.028892498580576,
            "1489696200": 0.028154148982389,
            "1489698000": 0.02863080387536,
            "1489699800": 0.028547684195713,
            "1489701600": 0.028136464297493,
            "1489703400": 0.028513565048153,
            "1489705200": 0.028563822358348,
            "1489707000": 0.028414815077371,
            "1489708800": 0.028315940953191,
            "1489710600": 0.029084978095707,
            "1489712400": 0.028647562674992,
            "1489714200": 0.028429224025229,
            "1489716000": 0.028445058056105,
            "1489717800": 0.028611820986938,
            "1489719600": 0.030163977590784,
            "1489721400": 0.028608941823344,
            "1489723200": 0.029154031597351,
            "1489725000": 0.029265334991779,
            "1489726800": 0.029066380388718,
            "1489728600": 0.029099492200478,
            "1489730400": 0.029641357477036,
            "1489732200": 0.028589219805418,
            "1489734000": 0.028426125588625,
            "1489735800": 0.028868901931854,
            "1489737600": 0.028834607328315,
            "1489739400": 0.028850814774319,
            "1489741200": 0.028916044786945,
            "1489743000": 0.028982749806918,
            "1489744800": 0.028340711947533,
            "1489746600": 0.029719507940927,
            "1489748400": 0.028275861064645,
            "1489750200": 0.028831682412529,
            "1489752000": 0.029212031364467,
            "1489753800": 0.030456015695455,
            "1489755600": 0.028653148152954,
            "1489757400": 0.029371835387555,
            "1489759200": 0.028373410311466,
            "1489761000": 0.028634426369706,
            "1489762800": 0.029321418683411,
            "1489764600": 0.028420616360363,
            "1489766400": 0.028287483146246,
            "1489768200": 0.028319338913151,
            "1489770000": 0.028499823803703,
            "1489771800": 0.02892569800228,
            "1489773600": 0.028484047229754,
            "1489775400": 0.028646417605994,
            "1489777200": 0.028679799430953,
            "1489779000": 0.030156018021786,
            "1489780800": 0.028729102267739,
            "1489782600": 0.028645483396934,
            "1489784400": 0.028070792415806,
            "1489786200": 0.02787291617048,
            "1489788000": 0.028693779514769,
            "1489789800": 0.028938445777228,
            "1489791600": 0.028823867382325,
            "1489793400": 0.029103909357479,
            "1489795200": 0.02946296722405,
            "1489797000": 0.02897068449124,
            "1489798800": 0.028527257285839,
            "1489800600": 0.030333453363802,
            "1489802400": 0.029248522920732,
            "1489804200": 0.028361650499419,
            "1489806000": 0.02859141220191,
            "1489807800": 0.028689482092818,
            "1489809600": 0.030116138801142,
            "1489811400": 0.028180600529095,
            "1489813200": 0.028228850254395,
            "1489815000": 0.029114600642742,
            "1489816800": 0.029311410810371,
            "1489818600": 0.028522667990176,
            "1489820400": 0.028719541656312,
            "1489822200": 0.028735248834742,
            "1489824000": 0.028291083282466,
            "1489825800": 0.029449184568454,
            "1489827600": 0.028817743676168,
            "1489829400": 0.029061841473348,
            "1489831200": 0.028994703713399,
            "1489833000": 0.028898808330913,
            "1489834800": 0.028372170607774,
            "1489836600": 0.02850253770877,
            "1489838400": 0.029798357616318,
            "1489840200": 0.028387640688947,
            "1489842000": 0.028486509637081,
            "1489843800": 0.029074486348364,
            "1489845600": 0.029257862362642,
            "1489847400": 0.029140594121545,
            "1489849200": 0.028943402698308,
            "1489851000": 0.029598789724404,
            "1489852800": 0.028976110987196,
            "1489854600": 0.028236016221722,
            "1489856400": 0.028449514498587,
            "1489858200": 0.028973412563644,
            "1489860000": 0.029268400904115,
            "1489861800": 0.028678013286133,
            "1489863600": 0.032515255399675,
            "1489865400": 0.029054068210014,
            "1489867200": 0.029367177614268,
            "1489869000": 0.029087373458967,
            "1489870800": 0.028840097255411,
            "1489872600": 0.029330515130321,
            "1489874400": 0.029398186795324,
            "1489876200": 0.028888229891932,
            "1489878000": 0.028904309003041,
            "1489879800": 0.028430108053203,
            "1489881600": 0.028738772177001,
            "1489883400": 0.029165323939896,
            "1489885200": 0.029690510481848,
            "1489887000": 0.028671693069991,
            "1489888800": 0.028721659576145,
            "1489890600": 0.029063804761456,
            "1489892400": 0.028672824123453,
            "1489894200": 0.028491006299847,
            "1489896000": 0.028277929155321,
            "1489897800": 0.028785503380259,
            "1489899600": 0.028407708119001,
            "1489901400": 0.028527575764677,
            "1489903200": 0.028620006031387,
            "1489905000": 0.029390086380118,
            "1489906800": 0.044225914627099,
            "1489908600": 0.029176671034231,
            "1489910400": 0.02832425079676,
            "1489912200": 0.02865159785101,
            "1489914000": 0.029028514941893,
            "1489915800": 0.028520297382902,
            "1489917600": 0.028848258462205,
            "1489919400": 0.028010227588816,
            "1489921200": 0.030305680832228,
            "1489923000": 0.028943193818775,
            "1489924800": 0.029174324181181,
            "1489926600": 0.030468137693194,
            "1489928400": 0.028289433290903,
            "1489930200": 0.029482929708954,
            "1489932000": 0.02868087642918,
            "1489933800": 0.029171187165987,
            "1489935600": 0.029319144166052,
            "1489937400": 0.0286971378313,
            "1489939200": 0.028726541203765,
            "1489941000": 0.028793259834456,
            "1489942800": 0.029104241403579,
            "1489944600": 0.033711498629012,
            "1489946400": 0.032347352685595,
            "1489948200": 0.029133746238486,
            "1489950000": 0.029733374847351,
            "1489951800": 0.030327142913666,
            "1489953600": 0.029875180865974,
            "1489955400": 0.02882148666564,
            "1489957200": 0.028904128395552,
            "1489959000": 0.029100664450484,
            "1489960800": 0.028379469221456,
            "1489962600": 0.029132620267343,
            "1489964400": 0.028657023515856,
            "1489966200": 0.028967724573009,
            "1489968000": 0.032946592758614,
            "1489969800": 0.028645290493769,
            "1489971600": 0.029082082104202,
            "1489973400": 0.029079682985907,
            "1489975200": 0.028475113534682,
            "1489977000": 0.028753236895516,
            "1489978800": 0.028031785787829,
            "1489980600": 0.028408609041222,
            "1489982400": 0.028605247344417,
            "1489984200": 0.029356081896843,
            "1489986000": 0.028670267767906,
            "1489987800": 0.028882736456396,
            "1489989600": 0.028585365317841,
            "1489991400": 0.02793184700623,
            "1489993200": 0.027619348194683,
            "1489995000": 0.029499933697548,
            "1489996800": 0.028799673080953,
            "1489998600": 0.030008848932727,
            "1490000400": 0.028392830104379,
            "1490002200": 0.028781570283398,
            "1490004000": 0.028306685699076,
            "1490005800": 0.028286660869456,
            "1490007600": 0.028780135750586,
            "1490009400": 0.028449214440611,
            "1490011200": 0.031072061703657,
            "1490013000": 0.029613224057543,
            "1490014800": 0.028890962521189,
            "1490016600": 0.028352841074942,
            "1490018400": 0.028203674547531,
            "1490020200": 0.027597624714202,
            "1490022000": 0.028839907334769,
            "1490023800": 0.029181880113194,
            "1490025600": 0.029181498204823
        }
    },
    "name": "localhost_PING_rta"
}
Which could then be narrowed to the last 2 weeks down based on the timestamps in the historical object.

Re: Get CPU and Memory data from Nagios

Posted: Wed Mar 22, 2017 3:47 am
by aap
Thanks.

Still no joy.

I have the enterprise version and what I would like is the export of CPU data collected for the last 2 weeks for all my hosts preferably from a report. It would be so time consuming to do this individually.

Please any assistance is appreciated.

Re: Get CPU and Memory data from Nagios

Posted: Wed Mar 22, 2017 11:37 am
by avandemore
The rrd files are usually located in /usr/local/nagios/share/perfdata/. You'd need to create a script that parses those files for the data you want, there is nothing Nagios that will natively do what you want.

Here is an example of plugins that may be of use to you:
https://exchange.nagios.org/directory/P ... on/details
https://exchange.nagios.org/directory/P ... rd/details