UPTIME Threshold

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

UPTIME Threshold

Postby amitgupta19 » Tue Mar 06, 2018 7:14 am

i am using the plugin check_nt with the NSCliet++ .

i tried to define the threshold for UPTIME of the server as follows:

check_nt ! UPTIME -l hours -c 5

But it is not generating the alert.

i have attached the screenshot from the file services.cfg

kindly refer to it and suggest where i am wrong.
Attachments
UPTime.JPG
UPTime Definition
amitgupta19
 
Posts: 122
Joined: Fri Sep 08, 2017 5:53 am

Re: UPTIME Threshold

Postby scottwilkerson » Tue Mar 06, 2018 4:32 pm

In order to assist further, can you post the command you are trying to configure running it from the command line, and can you also show the configuration you have for the check_nt check command

Thanks
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 12594
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: UPTIME Threshold

Postby amitgupta19 » Wed Mar 07, 2018 5:22 am

Please refer to the following URL:

https://www.monitoring-plugins.org/doc/ ... ck_nt.html

I am using the plugin mentioned in the URL.

Please refer to the command UPTIME in the above URL.

I am not able to find the command in my Nagios for the UPTIME.

Please suggest.
amitgupta19
 
Posts: 122
Joined: Fri Sep 08, 2017 5:53 am

Re: UPTIME Threshold

Postby scottwilkerson » Wed Mar 07, 2018 10:03 am

I'm looking for the command definition for check_nt in you setup.

Commands are defined like this
Code: Select all
define command {
    command_name    check_pop
    command_line    /usr/local/nagios/libexec/check_pop -H $HOSTADDRESS$
}

https://assets.nagios.com/downloads/nag ... ml#command
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 12594
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: UPTIME Threshold

Postby amitgupta19 » Wed Mar 07, 2018 12:24 pm

@ scottwilkerson : But where can i find this command definition?

Can you guide?
amitgupta19
 
Posts: 122
Joined: Fri Sep 08, 2017 5:53 am

Re: UPTIME Threshold

Postby scottwilkerson » Wed Mar 07, 2018 1:06 pm

every nagios setup is different, but in most they are configured in a file called commands.cfg
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 12594
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: UPTIME Threshold

Postby amitgupta19 » Wed Mar 14, 2018 9:45 am

UPTIME-Command definition.JPG
Command Definition
i searched in the server and found the file name as checkcommands.cfg

But UPTIME was not defined there.

I defined it in the file as per the screenshot attached.
amitgupta19
 
Posts: 122
Joined: Fri Sep 08, 2017 5:53 am

Re: UPTIME Threshold

Postby scottwilkerson » Wed Mar 14, 2018 11:04 am

Your picture in the first post is calling a command called check_nt This picture is check_nt_uptime

we need to see check_nt
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 12594
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: UPTIME Threshold

Postby amitgupta19 » Wed Mar 14, 2018 12:15 pm

Even i was also wondering the same.

But same is working for memory usage and USED Disk Space.

i am uploading the service.cfg and commands.cfg file.

Please refer to the USEDDISKSPACE and MEMUSE.
Attachments
services.cfg
(90.58 KiB) Downloaded 141 times
checkcommands.cfg
(26.06 KiB) Downloaded 135 times
amitgupta19
 
Posts: 122
Joined: Fri Sep 08, 2017 5:53 am

Re: UPTIME Threshold

Postby scottwilkerson » Wed Mar 14, 2018 1:30 pm

it's in there
define command{
command_name check_nt
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -s secret-password760 -v $ARG1$ $ARG2$
}


The check_command line in your OP should be
Code: Select all
check_nt!UPTIME!-l hours -c 5


You are missing 1 !

So you should be able to test this from the command line running (replacing IP_ADDRESS with a real IP
Code: Select all
./check_nt -H IP_ADDRESS -p 12489 -s secret-password760 -v UPTIME -l hours -c 5
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 12594
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Next

Return to Nagios Core

Who is online

Users browsing this forum: Fess [Nagios Bot], istsupervision, shekharalle and 18 guests