Page 1 of 2

acknowledgement/notification vanishes after service restart

Posted: Fri May 26, 2017 8:07 am
by ericssonvietnam
I have done all the configuration in remotehost.cfg and declared the same in nagios.cfg
Below is the sample configuration if have acknowledge/notification some of the host problems but the acknowledgement disappears after the service restart.

define service{
use generic-service
hostgroup_name Bharti_SOUTH
service_description Service ping
check_command check_ping!3000.0,80%!5000.0,100%
max_check_attempts 5
check_interval 5
retry_interval 5
check_period 24x7
notification_interval 5
notification_period 24x7
retain_nonstatus_information 1
notification_options w,c,r
contact_groups admins
}

Secondly i want to know that every time i add a new node in remotehost.cfg i have to restart the nagios service to make it node visible on front end.

Re: acknowledgement/notification vanishes after service rest

Posted: Fri May 26, 2017 9:15 am
by avandemore
Did you set the persist on the acknowledgement?
http://old.nagios.org/developerinfo/ext ... mand_id=40

Re: acknowledgement/notification vanishes after service rest

Posted: Fri May 26, 2017 12:52 pm
by ericssonvietnam
avandemore wrote:Did you set the persist on the acknowledgement?
http://old.nagios.org/developerinfo/ext ... mand_id=40

Attached are the screenshot for the steps i followed :

let me know if i need to add something in configuration file

Re: acknowledgement/notification vanishes after service rest

Posted: Fri May 26, 2017 1:01 pm
by avandemore
Please attach the files status.dat and nagios.cfg.

Re: acknowledgement/notification vanishes after service rest

Posted: Fri May 26, 2017 1:21 pm
by ericssonvietnam
avandemore wrote:Please attach the files status.dat and nagios.cfg.
PFA required files

Re: acknowledgement/notification vanishes after service rest

Posted: Fri May 26, 2017 1:35 pm
by avandemore
You have this defined in your nagios.cfg(which is not the default):

Code: Select all

retain_state_information=0
You can find the meaning of it here:
https://assets.nagios.com/downloads/nag ... gmain.html

Re: acknowledgement/notification vanishes after service rest

Posted: Fri May 26, 2017 1:59 pm
by ericssonvietnam
avandemore wrote:You have this defined in your nagios.cfg(which is not the default):

Code: Select all

retain_state_information=0
You can find the meaning of it here:
https://assets.nagios.com/downloads/nag ... gmain.html

Its already there can you check.

[root@localhost var]# grep -i retain_state_information=0 ../etc/nagios.cfg
retain_state_information=0

Re: acknowledgement/notification vanishes after service rest

Posted: Fri May 26, 2017 2:04 pm
by ericssonvietnam
ericssonvietnam wrote:
avandemore wrote:You have this defined in your nagios.cfg(which is not the default):

Code: Select all

retain_state_information=0
You can find the meaning of it here:
https://assets.nagios.com/downloads/nag ... gmain.html

Its already there can you check.

[root@localhost var]# grep -i retain_state_information=0 ../etc/nagios.cfg
retain_state_information=0
problem still persist after changing as below

[root@localhost var]# grep -i retain_state_information ../etc/nagios.cfg
retain_state_information=1

Re: acknowledgement/notification vanishes after service rest

Posted: Fri May 26, 2017 2:05 pm
by avandemore
I don't under your question. Your complaint seems to be that state isn't retained after a restart, but you have explicitly defined a configuration to not retain the state. Can you explain your issue?

Re: acknowledgement/notification vanishes after service rest

Posted: Fri May 26, 2017 2:05 pm
by dwhitfield
Did you restart nagios after making the config change?