Nagios service in Warning state

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.
Locked
Pratapa
Posts: 144
Joined: Tue Oct 01, 2019 1:33 am

Nagios service in Warning state

Post by Pratapa »

Hi,

One of the service "Print jobs in the queue" on a server is in warning state.

Following is the message

"WARNING: Nagios has not received an update from <hostname> for atleast 5 minutes"

Following are the service definition.


define service {
service_description print jobs in the queue
use wms-service-passive-template
host_name host1,host2,host3,host4
max_check_attempts 5
freshness_threshold 600 ; Service deemed stale after 5 minutes
check_command check_passive_warning!"Nagios has not received an update from $HOSTNAME$ for at least 5 minutes"
servicegroups +app-wms-vp
}




define service {
name wms-service-passive-template
use master-passive-service-template,wms-service-template
contact_groups warehouse-app-admins
register 0
}


define service {
name wms-service-template
use master-service-template
_resolver_group Platform Team
notes Resolver Group: $_SERVICERESOLVER_GROUP$
contact_groups warehouse-app-admins
register 0
}


define service {
name master-service-template ; The 'name' of this service template
active_checks_enabled 1 ; Active service checks are enabled
passive_checks_enabled 0 ; Passive service checks are disabled
parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
obsess_over_service 0 ; We are not obsessing over this service (if necessary)
check_freshness 0 ; Default is to NOT check service 'freshness'
notifications_enabled 1 ; Service notifications are enabled
event_handler_enabled 0 ; Service event handler is NOT enabled
flap_detection_enabled 0 ; Flap detection is NOT enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
notification_interval 0 ; Nagios will not re-notify contacts about problems - only one notification will be sent out
contact_groups nagios-admin
;notes_url https://wiki.ce.corp/bin/view/NagiosNot ... ISPLAYNAME$
check_period 24x7
notification_period 24x7
notification_options w,c,r
max_check_attempts 3
check_interval 5
retry_interval 1
servicegroups cat-default
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}



define service {
name master-passive-service-template
use master-service-template
active_checks_enabled 0
passive_checks_enabled 1 ; Passive service checks are enabled/accepted
max_check_attempts 1
check_freshness 1 ; Service freshness is being checked
freshness_threshold 300 ; Number of seconds before a service result is deemed stale
check_command check_passive_warning!"Nagios has not received an update from $HOSTNAME$ for at least 5 minutes"
servicegroups cat-process
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}

define service {
name master-passive-nofreshness-service-template
use master-passive-service-template
check_freshness 0 ; Service freshness is NOT being checked
servicegroups cat-process
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}


Folloiwng is the command definition.

define command {
command_name check_passive_warning
command_line $USER1$/check_dummy 1 $ARG1$
}


Same service is Showing OK status on other server.

I am not supposed to change any parameters in service definition or command definition because the same service is showing "OK" status on other server.

We are using Nagios core.

Remote server is an AIX server.

Please help me in fixing this issue.


Regards,
Pratapa
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Nagios service in Warning state

Post by mbellerue »

Code: Select all

define service {
service_description print jobs in the queue
use wms-service-passive-template
host_name host1,host2,host3,host4
max_check_attempts 5
freshness_threshold 600 ; Service deemed stale after 5 minutes
check_command check_passive_warning!"Nagios has not received an update from $HOSTNAME$ for at least 5 minutes"
servicegroups +app-wms-vp
}
So it looks like you have host1 through host4 that can send their status to this passive service.
Same service is Showing OK status on other server.
When you say the same service is showing OK on another server, do you mean that the service is showing WARNING on host2, for example, and OK on host1, host3, and host4? Or do you mean that host2 is showing WARNING on Nagios, and showing OK on another monitoring server?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Pratapa
Posts: 144
Joined: Tue Oct 01, 2019 1:33 am

Re: Nagios service in Warning state

Post by Pratapa »

Yes, showing OK on host1 and Warning message on host2,host3,host4.
Pratapa
Posts: 144
Joined: Tue Oct 01, 2019 1:33 am

Re: Nagios service in Warning state

Post by Pratapa »

This is resolved.

After executing the script manually, the issue got resolved.

Now it is showing OK status.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios service in Warning state

Post by scottwilkerson »

Pratapa wrote:This is resolved.

After executing the script manually, the issue got resolved.

Now it is showing OK status.
Great!

Locking thread
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked