How can i maintain the duration after a reboot of nagios server.
Example: I have a host which is down for 3d4h32m. If i restart the nagios server, after reboot this host will still be down but in duration i will see 0d0h1m etc.
retain_state_information
state_retention_file
retention_update_interval
retain_state_information =1
state_retention_file=/usr/local/nagios/var/retention.dat
retention_update_interval=60
orani wrote:How can i maintain the duration after a reboot of nagios server.
Example: I have a host which is down for 3d4h32m. If i restart the nagios server, after reboot this host will still be down but in duration i will see 0d0h1m etc.
define host{
host_name Infra1
address 10.0.6.11
use host-pnp
contacts nagiosadmin,systemadmin
check_command check-host-alive
max_check_attempts 5
check_interval 1
retry_interval 1
parents SMCSW
check_period 24x7
hostgroups KDS PHYSICAL SERVERS
statusmap_image rack-server.gd2
notification_interval 0
notification_options d,u,r,s
notification_period 24x7
}
define service{
host_name Infra1
use service-pnp
check_command check_nt!CPULOAD! -l 5,80,90 -s nagios
contacts nagiosadmin,systemadmin
max_check_attempts 5
service_description CPU Load
check_interval 1
retry_interval 1
check_period 24x7
servicegroups CPU Load
notification_interval 0
notification_options w,u,c,r,s
}
grep reta /usr/local/nagios/etc/nagios.cfg
ls -al /usr/local/nagios/var/retention.dat
[root@nagios ~]# ls -al /usr/local/nagios/var/retention.dat
-rw------- 1 nagios nagios 2857104 Sep 9 19:06 /usr/local/nagios/var/retention.dat
service nagios restart
Users browsing this forum: maynou2000 and 22 guests