Host availability fetching

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
mini87
Posts: 2
Joined: Mon Jan 28, 2013 7:38 am

Host availability fetching

Post by mini87 »

Hello all. My question is actually simple, but i cannot find the answer (maybe i'm not searching deeply enough). I have users that run experiments in my topology consisting of the localhost and several nodes connected to it. Of course the localhost runs the Nagios core where i monitor given services from the web interface. The users run experiments for specific time periods e.g. a user ran an experiment today from 10 a.m to 11 a.m. I want somehow manually (not from the web interface) to fetch the uptime percentage for the specific time period (this 1 hour) of the nodes that the user used.

Is there a command line way that can fetch the uptime for specific hosts and for specific time period?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Host availability fetching

Post by abrist »

You could use one of the uptime checkers on the exchange like http://exchange.nagios.org/directory/Pl ... me/details.

You will then need to build a script to run it against the remote host (through nrpe) and then cron job it.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
mini87
Posts: 2
Joined: Mon Jan 28, 2013 7:38 am

Re: Host availability fetching

Post by mini87 »

First of all, thank you for looking at my problem. Maybe i was not very clear about the question i have. I have installed Nagios and NDOUtils. I want somehow, either with a command or a query to the database, to fetch for a specific time period the check_ping service. Say for example, for a specific host (HostA) i want you to tell me for the 25th January 2013 between 12.00pm and 16.00pm what the check_ping service produced. The output i want to be something like 91%. A percentage for specific host and specific time. The time will not be the always the same so the crontab solution is not viable.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Host availability fetching

Post by abrist »

You would have to parse the checkdata from the nagios.log file. The actual performance data (if you are using pnp4nagios), is stored in rdds - these files get less granular with time. This functionality does not exist by default and will have to be added by installing pnp4nagios. Unfortunately, this will still not give you all the information you are after, but wit will get you closer.

http://www.pnp4nagios.org/
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked