Page 1 of 1

Service State Type is not changed

Posted: Sat Apr 27, 2019 2:31 am
by parisa
Hello
I have defined some hosts and service in Nagios XI and I use passive check (SNMP Trap), the service has been defined as below:

define service {
host_name host_1,host_2,host_3,...
service_description ETH_LOS
use xiwizard_passive_service
max_check_attempts 2
retry_interval 1
active_checks_enabled 0
passive_checks_enabled 1
check_period 24x7
event_handler TRS_ETH_LOSS_Alarm
event_handler_enabled 1
notification_options w,c,u,r,f,
register 1
}

but I have faced with problem, I got some traps from one of the hosts, according to the traps and service configuration, when service goes to soft state after a minute it will go to hard state if alarm is not recovered.
but according to attached log, the service didn't go to hard state even after 2:25 seconds.
would you please guide me about the case?

Re: Service State Type is not changed

Posted: Mon Apr 29, 2019 6:48 am
by scottwilkerson
Being this service only receives traps, it will only update the non-OK state if it receives another trap because you have the max_check_attempts set to 2.

It would need to receive a second non-OK trap to go into a hard state.

Re: Service State Type is not changed

Posted: Mon Apr 29, 2019 7:59 am
by parisa
@scottwilkerson Thanks for your answer.

I receive traps from a third party server, the traps are related to 2000 nodes, and I have limitation for access to the third party server.
based on you post, I need 2 non-ok traps that the state goes to hard. but my devices for any event send just a trap, and I'm not able to change their configuration
Is there any solution to combine passive and active check, at first it works as passive check but when is send a non-ok trap, if state of service didn't change to ok, this state change to hard state based on "max_check_attempts" and "retry_interval"?

Re: Service State Type is not changed

Posted: Mon Apr 29, 2019 8:18 am
by scottwilkerson
I would change the following

Code: Select all

max_check_attempts 1

Re: Service State Type is not changed

Posted: Mon Apr 29, 2019 8:40 am
by parisa
Ok, thanks for your support

Re: Service State Type is not changed

Posted: Mon Apr 29, 2019 8:43 am
by scottwilkerson
parisa wrote:Ok, thanks for your support
No problem!