How Uptime monitor works?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
lpereira
Posts: 143
Joined: Thu Jul 27, 2017 4:23 pm

How Uptime monitor works?

Post by lpereira »

Hello All... i wanted to know how the uptime monitor works.

We have a few virtual servers loaded SSD Datastores, and the reboot for those boxes, took literally 4 or 5 seconds. So, there are no alerts for host unreacheable, it only looses 3 or 4 ping Packets. And no service alerts because the box "back to live" faster than the check periods.


In those scenarios, Should Uptime send an alert, indicating that the uptime for the server has been changed (for instance) from 566666 to 0?... If no, is there a way to configure the check in order to do it?

Thanks in advance.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: How Uptime monitor works?

Post by lmiltchev »

Are you using the check_uptime plugin? It doesn't take under consideration any lost packets... If you are using check_ping, that's a different story. What are the thresholds that you are using? Can you show us the actual command that you are using, run from the command line, along with the output of it?
Be sure to check out our Knowledgebase for helpful articles and solutions!
lpereira
Posts: 143
Joined: Thu Jul 27, 2017 4:23 pm

Re: How Uptime monitor works?

Post by lpereira »

lmiltchev wrote:Are you using the check_uptime plugin? It doesn't take under consideration any lost packets... If you are using check_ping, that's a different story. What are the thresholds that you are using? Can you show us the actual command that you are using, run from the command line, along with the output of it?
i'm using the UPTIME plugin that is loaded along with the Windows Server Wizard

This is the output i got for the plugin

Code: Select all

[[email protected] ~]$ /usr/local/nagios/libexec/check_nt -H 172.30.XXXX -s "" -p 12489 -v UPTIME  
System Uptime - 13 day(s) 10 hour(s) 37 minute(s) |uptime=19357
Attached is the CCM configuration for the service.
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: How Uptime monitor works?

Post by lmiltchev »

You don't have any thresholds set on this check, so it is always going to return OK...

Try running something like this from the command line:

Code: Select all

# this should give you OK (exit code 0)
/usr/local/nagios/libexec/check_nt -H 172.30.XXXX -s "" -p 12489 -v UPTIME -l days -w 10 -c 5
echo $?

# this should give you WARNING (exit code 1)
/usr/local/nagios/libexec/check_nt -H 172.30.XXXX -s "" -p 12489 -v UPTIME -l days -w 15 -c 10
echo $?

# this should give you CRITICAL (exit code 2)
/usr/local/nagios/libexec/check_nt -H 172.30.XXXX -s "" -p 12489 -v UPTIME -l days -w 20 -c 15
echo $?
Note: This is an example with using "days" in thresholds. You could also use seconds, minutes or hours if you wish.

From the plugin's usage (help menu):
UPTIME =
Get the uptime of the machine.
-l <unit>
<unit> = seconds, minutes, hours, or days. (default: minutes)
Thresholds will use the unit specified above.
I would recommend that you add thresholds to your check, whatever makes sense in your environment.
Be sure to check out our Knowledgebase for helpful articles and solutions!
lpereira
Posts: 143
Joined: Thu Jul 27, 2017 4:23 pm

Re: How Uptime monitor works?

Post by lpereira »

lmiltchev wrote:You don't have any thresholds set on this check, so it is always going to return OK...

Try running something like this from the command line:

Code: Select all

# this should give you OK (exit code 0)
/usr/local/nagios/libexec/check_nt -H 172.30.XXXX -s "" -p 12489 -v UPTIME -l days -w 10 -c 5
echo $?

# this should give you WARNING (exit code 1)
/usr/local/nagios/libexec/check_nt -H 172.30.XXXX -s "" -p 12489 -v UPTIME -l days -w 15 -c 10
echo $?

# this should give you CRITICAL (exit code 2)
/usr/local/nagios/libexec/check_nt -H 172.30.XXXX -s "" -p 12489 -v UPTIME -l days -w 20 -c 15
echo $?
Note: This is an example with using "days" in thresholds. You could also use seconds, minutes or hours if you wish.

From the plugin's usage (help menu):
UPTIME =
Get the uptime of the machine.
-l <unit>
<unit> = seconds, minutes, hours, or days. (default: minutes)
Thresholds will use the unit specified above.
I would recommend that you add thresholds to your check, whatever makes sense in your environment.
Excellent i would definetly do that...

so the Wizard plugin has not any option to configure the days for the uptime? or is something i miss when i add the box into monitoring
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: How Uptime monitor works?

Post by lmiltchev »

No, you didn't miss it. There is no option to add thresholds in the wizard. You can always do it later though in the CCM.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked