Page 1 of 1
how to monitor uptime service when using nrpe wizard
Posted: Thu Sep 20, 2018 3:14 pm
by ganeshsambandam
how to monitor uptime service when using nrpe wizard
Re: how to monitor uptime service when using nrpe wizard
Posted: Thu Sep 20, 2018 3:32 pm
by swolf
Can you be more specific about what system or server you're trying to monitor? NRPE is a way for you to run nagios plugins on a remote host, so in a very general sense, you'll want to find or create a plugin that measures uptime on the system you're monitoring, install NRPE on that system, place the plugin in /usr/local/nagios/libexec, add a command for the plugin in nrpe.cfg, and then run through the NRPE wizard, adding the command where it asks for "Remote NRPE Command" and the relevant plugin arguments next to that.
Here's a link to some documentation for configuring NRPE on a Linux server
Re: how to monitor uptime service when using nrpe wizard
Posted: Thu Sep 20, 2018 3:35 pm
by jforcier
Add check_uptime in the NRPE Commands during step 2 of the NRPE wizard.
More information on uptime checks here:
https://support.nagios.com/kb/article/u ... s-784.html
Re: how to monitor uptime service when using nrpe wizard
Posted: Fri Sep 21, 2018 1:16 pm
by ganeshsambandam
https://support.nagios.com/kb/article/u ... s-784.html
above link doesn't have an option to monitor uptime using nrpe.
We are trying to monitor uptime for solaris version 10 servers.
Re: how to monitor uptime service when using nrpe wizard
Posted: Fri Sep 21, 2018 1:30 pm
by jforcier
The first plugin in that link, check_uptime, will work with NRPE.
Follow this document and add check_uptime in step 2:
https://assets.nagios.com/downloads/nag ... g_NRPE.pdf
To test the plugin, you could set up a command in the nrpe.cfg file on the remote machine as such:
Code: Select all
command[check_uptime]=/usr/local/nagios/libexec/check_uptime $ARG1$
and restart nrpe so that changes take place.
Then, you can test your check from the command line on the Nagios XI server:
Code: Select all
# /usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c check_uptime -a '-u days -c 1'
Uptime CRITICAL: 2 day(s) 3 hour(s) 39 minute(s) | uptime=2.000000;;1.000000;
Re: how to monitor uptime service when using nrpe wizard
Posted: Mon Sep 24, 2018 8:49 am
by ganeshsambandam
Thanks, can you please provide me the command which can be used to check in minutes.
For ex:- i need to see an alert if uptime is less than 10 minutes.
Re: how to monitor uptime service when using nrpe wizard
Posted: Mon Sep 24, 2018 9:10 am
by jforcier
Run your check like this:
Code: Select all
./check_uptime -u minutes -c 10: -w 20:
Here is an articale that explains how to use thresholds and ranges in your checks.
https://nagios-plugins.org/doc/guidelin ... HOLDFORMAT