Services issues

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.
imran_khan
Posts: 196
Joined: Mon May 27, 2013 3:16 pm

Services issues

Post 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.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Services issues

Post by Box293 »

Can you post example commands showing this behaviour.

What plugins are you using?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
imran_khan
Posts: 196
Joined: Mon May 27, 2013 3:16 pm

Re: Services issues

Post 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.
imran_khan
Posts: 196
Joined: Mon May 27, 2013 3:16 pm

Re: Services issues

Post by imran_khan »

Hello,

Any help?

Thanks,
Imran Khan.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Services issues

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
imran_khan
Posts: 196
Joined: Mon May 27, 2013 3:16 pm

Re: Services issues

Post 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.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Services issues

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
imran_khan
Posts: 196
Joined: Mon May 27, 2013 3:16 pm

Re: Services issues

Post 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,
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Services issues

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
imran_khan
Posts: 196
Joined: Mon May 27, 2013 3:16 pm

Re: Services issues

Post 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.
Locked