Page 1 of 5

Services issues

Posted: Thu Feb 05, 2015 1:24 pm
by imran_khan
Hello,

We have observed that services of all the servers are going in “UNKNOWN” section instead of “CRITICAL” when server go down.
It should show in “CRITICAL” section not in “UNKNOWN”. I am monitoring some services from using SNMP.

Thanks,
Imran Khan.

Re: Services issues

Posted: Thu Feb 05, 2015 7:57 pm
by Box293
Can you post example commands showing this behaviour.

What plugins are you using?

Re: Services issues

Posted: Fri Feb 06, 2015 12:16 pm
by imran_khan
Hello,

I am using check_snmp plugin. Here is the example.

Command:-
define command{
command_name space
command_line /usr/local/nagios/libexec/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o 1.3.6.1.4.1.2021.9.1.9.8 -w $ARG2$ -c $ARG3$
}

Service:-
define service{
use generic-service,srv-pnp ; Name of service template to use
host_name Example.com
service_description space
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 60
retry_check_interval 1
contact_groups windowsadm
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command space! Community_name!80!90
}

Thanks,
Imran Khan.

Re: Services issues

Posted: Fri Feb 06, 2015 4:44 pm
by imran_khan
Hello,

Any help?

Thanks,
Imran Khan.

Re: Services issues

Posted: Sun Feb 08, 2015 7:01 pm
by Box293
This can be defined in the next release of the Nagios Plugins.

Code: Select all

/usr/local/nagios/libexec/check_snmp -H win2008r2-01 -C box293 -o 1.3.6.1.2.1.1.1.0 -w 80 -c 90 -t 30:CRITICAL
CRITICAL - Plugin timed out while executing system call

echo $?
2
Specifically this is the new feature:

Code: Select all

-t 30:CRITICAL
You can deploy the current beta of the these plugins, check out this thread:
http://support.nagios.com/forum/viewtop ... 10#p124807

It would be great if you did deploy the beta plugins as this will help find any bugs before the next version gets released.

Re: Services issues

Posted: Mon Feb 09, 2015 3:03 pm
by imran_khan
Hello,

Mentioned command did not wrok.

/usr/local/nagios/libexec/check_snmp -H win2008r2-01 -C box293 -o 1.3.6.1.2.1.1.1.0 -w 80 -c 90 -t 30:CRITICAL

Thanks,
Imran Khan.

Re: Services issues

Posted: Mon Feb 09, 2015 6:03 pm
by Box293
Box293 wrote:This can be defined in the next release of the Nagios Plugins.
Box293 wrote:You can deploy the current beta of the these plugins, check out this thread:
http://support.nagios.com/forum/viewtop ... 10#p124807
Did you deploy the beta release of Nagios Plugins?

-t 30:CRITCAL will only work in the beta version of the Nagios Plugins.

Alternatively you could also change your nagios.cfg:

Code: Select all

# SERVICE CHECK TIMEOUT STATE
# This setting determines the state Nagios will report when a
# service check times out - that is does not respond within
# service_check_timeout seconds.  This can be useful if a
# machine is running at too high a load and you do not want
# to consider a failed service check to be critical (the default).
# Valid settings are:
# c - Critical (default)
# u - Unknown
# w - Warning
# o - OK

service_check_timeout_state=u

Re: Services issues

Posted: Mon Feb 09, 2015 6:40 pm
by imran_khan
Hello,

Is there any alternative solution?

What are the impact if I will add service_check_timeout_state=u paramter in Nagios configuration file (/usr/local/nagios/etc/nagios.cfg) as my Nagios server is in production and 400+ server are configured on it.

Thanks,
Imran Khan,

Re: Services issues

Posted: Mon Feb 09, 2015 6:45 pm
by Box293
You could also use negate.

This guide was written for XI but it holds true to core as well:

http://assets.nagios.com/downloads/nagi ... ios-XI.pdf
imran_khan wrote:What are the impact if I will add service_check_timeout_state=u paramter in Nagios configuration file (/usr/local/nagios/etc/nagios.cfg) as my Nagios server is in production and 400+ server are configured on it.
Any services that timeout will display an unknown state instead of critical. There is no extra load placed on the system.

Re: Services issues

Posted: Tue Feb 10, 2015 1:13 pm
by imran_khan
Hello,

By using Netgate plugin I cannot solve this issue. Negates the status of a plugin (returns OK for CRITICAL and vice-versa).
When my server goes down then all the services should list in CRITICAL section not in UNKNOWN.

Thanks,
Imran Khan.