Hi
I am setting up a redundant passive(notification is disabled) Nagios server but I found the downtime type of info is not propagated.
Can you advise what files need to be rysnced over from master to slave ?
Thanks
tj
how to sync downtime info from Master to Slave Nagios server
Re: how to sync downtime info from Master to Slave Nagios se
Scheduled downtime is considered runtime-state data (as well as acknowledgements). It is located in the /usr/local/nagios/var/retention.dat and the /usr/local/nagios/var/status.dat files.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: how to sync downtime info from Master to Slave Nagios se
Can runtime-state data file be copied directly over the a Slave server also doing checks but with notification disabled ?
Looks like the content is machine specific, it should not be a direct file to file overwritten,right ?
Looks like the content is machine specific, it should not be a direct file to file overwritten,right ?
Code: Select all
nagios@nagios1:~$ sudo head -20 /var/log/nagios/retention.dat
########################################
# NAGIOS STATE RETENTION FILE
#
# THIS FILE IS AUTOMATICALLY GENERATED
# BY NAGIOS. DO NOT MODIFY THIS FILE!
########################################
info {
created=1427299561
version=3.5.1
last_update_check=1427222686
update_available=1
update_uid=1375217352
last_version=3.5.1
new_version=4.0.8
}
program {
modified_host_attributes=0
modified_service_attributes=0
enable_notifications=1
active_service_checks_enabled=1
nagios@nagios1:~$
Re: how to sync downtime info from Master to Slave Nagios se
Yeah, that is a caveat of allowing the second machine to run checks. If it was a pure failover situation, you could just sync the retention/status files.nagmoto wrote:Looks like the content is machine specific, it should not be a direct file to file overwritten,right ?
What type of checks are you running on the slave? If they are just checks to verify if the master is up (and subsequently run an event handler enabling all the slave checks when the master is down), move those checks/logic to a cron job instead, which will allow you to sync the runtime data.
If you are actually running all the checks from the slave (for historical redundancy, etc), then your options are a bit more limited.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: how to sync downtime info from Master to Slave Nagios se
After reading following two articles,
https://allmybase.com/2010/10/04/settin ... s-servers/
http://www.slideshare.net/nagiosinc/nag ... -solutions
I need to do more home work on understanding the challenge and do put in more lab testing effort.
https://allmybase.com/2010/10/04/settin ... s-servers/
http://www.slideshare.net/nagiosinc/nag ... -solutions
I need to do more home work on understanding the challenge and do put in more lab testing effort.
Re: how to sync downtime info from Master to Slave Nagios se
Did you have any additional questions related to this or can we mark it as resolved and lock the topic?
Re: how to sync downtime info from Master to Slave Nagios se
pls mark it as resolved.