no Host duration : N/A (no Host Uptime)
no Host duration : N/A (no Host Uptime)
Dear Expert
Yesterday we added some Hosts (without any services), showing correct status UP/DOWN but there is no uptime (no duration) as below, what could be reason?
Status Details
Host State: Up
Duration: N/A
Host Stability: Unchanging (stable)
Last Check: 16/02/2015 09:10:07
Next Check: 16/02/2015 09:15:07
I tried with Ping This Host ,, Immediate Check ,, but still no duration (no uptime).
define host {
host_name myhostname
use xiwizard_switch_host
alias myhost alias
display_name myhost displayname (192.168.55.66) myref
address 192.168.55.66
max_check_attempts 1
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
contact_groups alert_group
notification_period xi_timeperiod_24x7
notification_options d,r,f,
notifications_enabled 1
icon_image switch.png
statusmap_image switch.png
_xiwizard switch
register 1
}
Regards
Yesterday we added some Hosts (without any services), showing correct status UP/DOWN but there is no uptime (no duration) as below, what could be reason?
Status Details
Host State: Up
Duration: N/A
Host Stability: Unchanging (stable)
Last Check: 16/02/2015 09:10:07
Next Check: 16/02/2015 09:15:07
I tried with Ping This Host ,, Immediate Check ,, but still no duration (no uptime).
define host {
host_name myhostname
use xiwizard_switch_host
alias myhost alias
display_name myhost displayname (192.168.55.66) myref
address 192.168.55.66
max_check_attempts 1
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
contact_groups alert_group
notification_period xi_timeperiod_24x7
notification_options d,r,f,
notifications_enabled 1
icon_image switch.png
statusmap_image switch.png
_xiwizard switch
register 1
}
Regards
Zajil NMS
Re: no Host duration : N/A (no Host Uptime)
Do you see a duration if you log in Nagios Core?
Try restarting services:
If this doesn't help, post the nagios.cfg.
Code: Select all
http://ip address/nagiosCode: Select all
service nagios stop
killall nagios
service ndo2db stop
service ndo2db start
service nagios startBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: no Host duration : N/A (no Host Uptime)
Dear lmiltchev
Yes, I can see duration from /nagios
Host Status:
UP
(for 0d 7h 41m 40s+)
If its well known bug, please fix it.
You have suggested to restart the services but I will not do as me afraid for something goes wrong (will try later)
However please let me know to stop/start services, killall nagios, how safe? Yes, sure, there will be some interruptions for some seconds but it cause any database corruption? This me asking as whenever we found Nagios hung, we do this, how long its safe? Any adverse affect other than some seconds interruption?
Regards
Yes, I can see duration from /nagios
Host Status:
UP
(for 0d 7h 41m 40s+)
If its well known bug, please fix it.
You have suggested to restart the services but I will not do as me afraid for something goes wrong (will try later)
However please let me know to stop/start services, killall nagios, how safe? Yes, sure, there will be some interruptions for some seconds but it cause any database corruption? This me asking as whenever we found Nagios hung, we do this, how long its safe? Any adverse affect other than some seconds interruption?
Regards
Zajil NMS
Re: no Host duration : N/A (no Host Uptime)
Well, the issue must be on the XI/NDO side.
Check the system date for good measure:
Check /var/log/messages for failed queries:
Any db errors?
Check the system date for good measure:
Code: Select all
date
grep timezone /etc/php.iniCode: Select all
grep query /var/log/messages | tailCode: Select all
tail -25 /var/log/mysqld.logFormer 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: no Host duration : N/A (no Host Uptime)
Dear abrist
Please note UP Time showing for all the Host, except very few, DATE is correct, all performance graph, alert, notification date/time is okay.
[root@nagoisxi-Cust2 zops]# grep timezone /etc/php.ini
; Defines the default timezone used by the date functions
; http://www.php.net/manual/en/datetime.c ... e.timezone
date.timezone = ((((our continent/our country is okay)))
Feb 16 14:35:14 nagoisxi-Cust2 nagios: qh: core query handler registered
Feb 16 14:35:14 nagoisxi-Cust2 nagios: wproc: Successfully registered manager as @wproc with query handler
Feb 16 14:51:50 nagoisxi-Cust2 nagios: qh: core query handler registered
Feb 16 14:51:50 nagoisxi-Cust2 nagios: wproc: Successfully registered manager as @wproc with query handler
[root@nagoisxi-Cust2 zops]# tail -25 /var/log/mysqld.log
141229 16:07:45 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
141229 16:08:08 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
141229 16:08:08 InnoDB: Initializing buffer pool, size = 8.0M
141229 16:08:08 InnoDB: Completed initialization of buffer pool
141229 16:08:08 InnoDB: Started; log sequence number 0 44233
141229 16:08:08 [Note] Event Scheduler: Loaded 0 events
141229 16:08:08 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
141229 16:08:17 [Note] /usr/libexec/mysqld: Normal shutdown
141229 16:08:17 [Note] Event Scheduler: Purging the queue. 0 events
141229 16:08:19 InnoDB: Starting shutdown...
141229 16:08:23 InnoDB: Shutdown completed; log sequence number 0 44233
141229 16:08:23 [Note] /usr/libexec/mysqld: Shutdown complete
141229 16:08:23 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
141229 16:08:26 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
141229 16:08:26 InnoDB: Initializing buffer pool, size = 8.0M
141229 16:08:26 InnoDB: Completed initialization of buffer pool
141229 16:08:26 InnoDB: Started; log sequence number 0 44233
141229 16:08:26 [Note] Event Scheduler: Loaded 0 events
141229 16:08:26 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
141229 16:08:44 [Note] Found 5409 of 0 rows when repairing './nagios/nagios_customvariablestatus'
After your answer to my problem, Can you explain what is 141229 above line?
Regards
Please note UP Time showing for all the Host, except very few, DATE is correct, all performance graph, alert, notification date/time is okay.
[root@nagoisxi-Cust2 zops]# grep timezone /etc/php.ini
; Defines the default timezone used by the date functions
; http://www.php.net/manual/en/datetime.c ... e.timezone
date.timezone = ((((our continent/our country is okay)))
Feb 16 14:35:14 nagoisxi-Cust2 nagios: qh: core query handler registered
Feb 16 14:35:14 nagoisxi-Cust2 nagios: wproc: Successfully registered manager as @wproc with query handler
Feb 16 14:51:50 nagoisxi-Cust2 nagios: qh: core query handler registered
Feb 16 14:51:50 nagoisxi-Cust2 nagios: wproc: Successfully registered manager as @wproc with query handler
[root@nagoisxi-Cust2 zops]# tail -25 /var/log/mysqld.log
141229 16:07:45 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
141229 16:08:08 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
141229 16:08:08 InnoDB: Initializing buffer pool, size = 8.0M
141229 16:08:08 InnoDB: Completed initialization of buffer pool
141229 16:08:08 InnoDB: Started; log sequence number 0 44233
141229 16:08:08 [Note] Event Scheduler: Loaded 0 events
141229 16:08:08 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
141229 16:08:17 [Note] /usr/libexec/mysqld: Normal shutdown
141229 16:08:17 [Note] Event Scheduler: Purging the queue. 0 events
141229 16:08:19 InnoDB: Starting shutdown...
141229 16:08:23 InnoDB: Shutdown completed; log sequence number 0 44233
141229 16:08:23 [Note] /usr/libexec/mysqld: Shutdown complete
141229 16:08:23 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
141229 16:08:26 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
141229 16:08:26 InnoDB: Initializing buffer pool, size = 8.0M
141229 16:08:26 InnoDB: Completed initialization of buffer pool
141229 16:08:26 InnoDB: Started; log sequence number 0 44233
141229 16:08:26 [Note] Event Scheduler: Loaded 0 events
141229 16:08:26 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
141229 16:08:44 [Note] Found 5409 of 0 rows when repairing './nagios/nagios_customvariablestatus'
After your answer to my problem, Can you explain what is 141229 above line?
Regards
Zajil NMS
Re: no Host duration : N/A (no Host Uptime)
The date of the log entry. (YYMMDD)zaji_nms wrote: After your answer to my problem, Can you explain what is 141229 above line?
What was the output of the queery grep:
Code: Select all
grep query /var/log/messages | tailCode: Select all
service mysqld restartCode: Select all
tail -20 /usr/local/nagios/var/ndo2db.debugFormer 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: no Host duration : N/A (no Host Uptime)
Hello
I have the same situation.
Here is log from ndo2db regarding to that host:
tail -F /usr/local/nagios/var/ndo2db.debug | grep SQ1VPLRSA001
[1424353946.326735] [002.0] [pid=8777] INSERT INTO nagios_externalcommands SET instance_id='1', command_type='98', entry_time=FROM_UNIXTIME(1424353946), command_name='SCHEDULE_FORCED_HOST_CHECK', command_args='SQ1VPLRSA001;1424353941'
[1424353946.327482] [002.0] [pid=8777] INSERT INTO nagios_hoststatus SET instance_id='1', host_object_id='120471', status_update_time=FROM_UNIXTIME(1424353946), output='OK - SQ1VPLRSA001\.TOR\.QUEST\.COM: rta 24\.467ms, lost 0%', long_output='', perfdata='rta=24\.467ms;3000\.000;5000\.000;0; pl=0%;80;100;; rtmax=24\.678ms;;;; rtmin=24\.301ms;;;;', current_state='0', has_been_checked='1', should_be_scheduled='1', current_check_attempt='1', max_check_attempts='3', last_check=FROM_UNIXTIME(1424353874), next_check=FROM_UNIXTIME(1424353941), check_type='0', last_state_change=FROM_UNIXTIME(0), last_hard_state_change=FROM_UNIXTIME(0), last_hard_state='0', last_time_up=FROM_UNIXTIME(1424353874), last_time_down=FROM_UNIXTIME(0), last_time_unreachable=FROM_UNIXTIME(0), state_type='1', last_notification=FROM_UNIXTIME(0), next_notification=FROM_UNIXTIME(0), no_more_notifications='0', notifications_enabled='1', problem_has_been_acknowledged='0', acknowledgement_type='0', current_notification_number='0', passive_checks_enabled='1', active_checks_enabled='1', event_handler_enabled='0', flap_detection_enabled='1', is_flapping='0', percent_state_change='0.000000', latency='0.000100', execution_time='0.125890', scheduled_downtime_depth='0', failure_prediction_enabled='0', process_performance_data='1', obsess_over_host='1', modified_host_attributes='0', event_handler='xi_host_notification_handler', check_command='check_xi_host_ping!3000\.0!80%!5000\.0!100%!!!!', normal_check_interval='2.000000', retry_check_interval='1.000000', check_timeperiod_object_id='122' ON DUPLICATE KEY UPDATE instance_id='1', host_object_id='120471', status_update_time=FROM_UNIXTIME(1424353946), output='OK - SQ1VPLRSA001\.TOR\.QUEST\.COM: rta 24\.467ms, lost 0%', long_output='', perfdata='rta=24\.467ms;3000\.000;5000\.000;0; pl=0%;80;100;; rtmax=24\.678ms;;;; rtmin=24\.301ms;;;;', current_state='0', has_been_checked='1', should_be_scheduled='1', current_check_attempt='1', max_check_attempts='3', last_check=FROM_UNIXTIME(1424353874), next_check=FROM_UNIXTIME(1424353941), check_type='0', last_state_change=FROM_UNIXTIME(0), last_hard_state_change=FROM_UNIXTIME(0), last_hard_state='0', last_time_up=FROM_UNIXTIME(1424353874), last_time_down=FROM_UNIXTIME(0), last_time_unreachable=FROM_UNIXTIME(0), state_type='1', last_notification=FROM_UNIXTIME(0), next_notification=FROM_UNIXTIME(0), no_more_notifications='0', notifications_enabled='1', problem_has_been_acknowledged='0', acknowledgement_type='0', current_notification_number='0', passive_checks_enabled='1', active_checks_enabled='1', event_handler_enabled='0', flap_detection_enabled='1', is_flapping='0', percent_state_change='0.000000', latency='0.000100', execution_time='0.125890', scheduled_downtime_depth='0', failure_prediction_enabled='0', process_performance_data='1', obsess_over_host='1', modified_host_attributes='0', event_handler='xi_host_notification_handler', check_command='check_xi_host_ping!3000\.0!80%!5000\.0!100%!!!!', normal_check_interval='2.000000', retry_check_interval='1.000000', check_timeperiod_object_id='122'
[1424353946.455953] [002.0] [pid=8777] INSERT INTO nagios_hoststatus SET instance_id='1', host_object_id='120471', status_update_time=FROM_UNIXTIME(1424353946), output='OK - SQ1VPLRSA001\.TOR\.QUEST\.COM: rta 24\.375ms, lost 0%', long_output='', perfdata='rta=24\.375ms;3000\.000;5000\.000;0; pl=0%;80;100;; rtmax=24\.584ms;;;; rtmin=24\.192ms;;;;', current_state='0', has_been_checked='1', should_be_scheduled='1', current_check_attempt='1', max_check_attempts='3', last_check=FROM_UNIXTIME(1424353946), next_check=FROM_UNIXTIME(1424354066), check_type='0', last_state_change=FROM_UNIXTIME(0), last_hard_state_change=FROM_UNIXTIME(0), last_hard_state='0', last_time_up=FROM_UNIXTIME(1424353946), last_time_down=FROM_UNIXTIME(0), last_time_unreachable=FROM_UNIXTIME(0), state_type='1', last_notification=FROM_UNIXTIME(0), next_notification=FROM_UNIXTIME(0), no_more_notifications='0', notifications_enabled='1', problem_has_been_acknowledged='0', acknowledgement_type='0', current_notification_number='0', passive_checks_enabled='1', active_checks_enabled='1', event_handler_enabled='0', flap_detection_enabled='1', is_flapping='0', percent_state_change='0.000000', latency='0.000230', execution_time='0.128340', scheduled_downtime_depth='0', failure_prediction_enabled='0', process_performance_data='1', obsess_over_host='1', modified_host_attributes='0', event_handler='xi_host_notification_handler', check_command='check_xi_host_ping!3000\.0!80%!5000\.0!100%!!!!', normal_check_interval='2.000000', retry_check_interval='1.000000', check_timeperiod_object_id='122' ON DUPLICATE KEY UPDATE instance_id='1', host_object_id='120471', status_update_time=FROM_UNIXTIME(1424353946), output='OK - SQ1VPLRSA001\.TOR\.QUEST\.COM: rta 24\.375ms, lost 0%', long_output='', perfdata='rta=24\.375ms;3000\.000;5000\.000;0; pl=0%;80;100;; rtmax=24\.584ms;;;; rtmin=24\.192ms;;;;', current_state='0', has_been_checked='1', should_be_scheduled='1', current_check_attempt='1', max_check_attempts='3', last_check=FROM_UNIXTIME(1424353946), next_check=FROM_UNIXTIME(1424354066), check_type='0', last_state_change=FROM_UNIXTIME(0), last_hard_state_change=FROM_UNIXTIME(0), last_hard_state='0', last_time_up=FROM_UNIXTIME(1424353946), last_time_down=FROM_UNIXTIME(0), last_time_unreachable=FROM_UNIXTIME(0), state_type='1', last_notification=FROM_UNIXTIME(0), next_notification=FROM_UNIXTIME(0), no_more_notifications='0', notifications_enabled='1', problem_has_been_acknowledged='0', acknowledgement_type='0', current_notification_number='0', passive_checks_enabled='1', active_checks_enabled='1', event_handler_enabled='0', flap_detection_enabled='1', is_flapping='0', percent_state_change='0.000000', latency='0.000230', execution_time='0.128340', scheduled_downtime_depth='0', failure_prediction_enabled='0', process_performance_data='1', obsess_over_host='1', modified_host_attributes='0', event_handler='xi_host_notification_handler', check_command='check_xi_host_ping!3000\.0!80%!5000\.0!100%!!!!', normal_check_interval='2.000000', retry_check_interval='1.000000', check_timeperiod_object_id='122'
[1424353946.457205] [002.0] [pid=8777] INSERT INTO nagios_hoststatus SET instance_id='1', host_object_id='120471', status_update_time=FROM_UNIXTIME(1424353946), output='OK - SQ1VPLRSA001\.TOR\.QUEST\.COM: rta 24\.375ms, lost 0%', long_output='', perfdata='rta=24\.375ms;3000\.000;5000\.000;0; pl=0%;80;100;; rtmax=24\.584ms;;;; rtmin=24\.192ms;;;;', current_state='0', has_been_checked='1', should_be_scheduled='1', current_check_attempt='1', max_check_attempts='3', last_check=FROM_UNIXTIME(1424353946), next_check=FROM_UNIXTIME(1424354066), check_type='0', last_state_change=FROM_UNIXTIME(0), last_hard_state_change=FROM_UNIXTIME(0), last_hard_state='0', last_time_up=FROM_UNIXTIME(1424353946), last_time_down=FROM_UNIXTIME(0), last_time_unreachable=FROM_UNIXTIME(0), state_type='1', last_notification=FROM_UNIXTIME(0), next_notification=FROM_UNIXTIME(0), no_more_notifications='0', notifications_enabled='1', problem_has_been_acknowledged='0', acknowledgement_type='0', current_notification_number='0', passive_checks_enabled='1', active_checks_enabled='1', event_handler_enabled='0', flap_detection_enabled='1', is_flapping='0', percent_state_change='0.000000', latency='0.000230', execution_time='0.128340', scheduled_downtime_depth='0', failure_prediction_enabled='0', process_performance_data='1', obsess_over_host='1', modified_host_attributes='0', event_handler='xi_host_notification_handler', check_command='check_xi_host_ping!3000\.0!80%!5000\.0!100%!!!!', normal_check_interval='2.000000', retry_check_interval='1.000000', check_timeperiod_object_id='122' ON DUPLICATE KEY UPDATE instance_id='1', host_object_id='120471', status_update_time=FROM_UNIXTIME(1424353946), output='OK - SQ1VPLRSA001\.TOR\.QUEST\.COM: rta 24\.375ms, lost 0%', long_output='', perfdata='rta=24\.375ms;3000\.000;5000\.000;0; pl=0%;80;100;; rtmax=24\.584ms;;;; rtmin=24\.192ms;;;;', current_state='0', has_been_checked='1', should_be_scheduled='1', current_check_attempt='1', max_check_attempts='3', last_check=FROM_UNIXTIME(1424353946), next_check=FROM_UNIXTIME(1424354066), check_type='0', last_state_change=FROM_UNIXTIME(0), last_hard_state_change=FROM_UNIXTIME(0), last_hard_state='0', last_time_up=FROM_UNIXTIME(1424353946), last_time_down=FROM_UNIXTIME(0), last_time_unreachable=FROM_UNIXTIME(0), state_type='1', last_notification=FROM_UNIXTIME(0), next_notification=FROM_UNIXTIME(0), no_more_notifications='0', notifications_enabled='1', problem_has_been_acknowledged='0', acknowledgement_type='0', current_notification_number='0', passive_checks_enabled='1', active_checks_enabled='1', event_handler_enabled='0', flap_detection_enabled='1', is_flapping='0', percent_state_change='0.000000', latency='0.000230', execution_time='0.128340', scheduled_downtime_depth='0', failure_prediction_enabled='0', process_performance_data='1', obsess_over_host='1', modified_host_attributes='0', event_handler='xi_host_notification_handler', check_command='check_xi_host_ping!3000\.0!80%!5000\.0!100%!!!!', normal_check_interval='2.000000', retry_check_interval='1.000000', check_timeperiod_object_id='122'
I have the same situation.
Here is log from ndo2db regarding to that host:
tail -F /usr/local/nagios/var/ndo2db.debug | grep SQ1VPLRSA001
[1424353946.326735] [002.0] [pid=8777] INSERT INTO nagios_externalcommands SET instance_id='1', command_type='98', entry_time=FROM_UNIXTIME(1424353946), command_name='SCHEDULE_FORCED_HOST_CHECK', command_args='SQ1VPLRSA001;1424353941'
[1424353946.327482] [002.0] [pid=8777] INSERT INTO nagios_hoststatus SET instance_id='1', host_object_id='120471', status_update_time=FROM_UNIXTIME(1424353946), output='OK - SQ1VPLRSA001\.TOR\.QUEST\.COM: rta 24\.467ms, lost 0%', long_output='', perfdata='rta=24\.467ms;3000\.000;5000\.000;0; pl=0%;80;100;; rtmax=24\.678ms;;;; rtmin=24\.301ms;;;;', current_state='0', has_been_checked='1', should_be_scheduled='1', current_check_attempt='1', max_check_attempts='3', last_check=FROM_UNIXTIME(1424353874), next_check=FROM_UNIXTIME(1424353941), check_type='0', last_state_change=FROM_UNIXTIME(0), last_hard_state_change=FROM_UNIXTIME(0), last_hard_state='0', last_time_up=FROM_UNIXTIME(1424353874), last_time_down=FROM_UNIXTIME(0), last_time_unreachable=FROM_UNIXTIME(0), state_type='1', last_notification=FROM_UNIXTIME(0), next_notification=FROM_UNIXTIME(0), no_more_notifications='0', notifications_enabled='1', problem_has_been_acknowledged='0', acknowledgement_type='0', current_notification_number='0', passive_checks_enabled='1', active_checks_enabled='1', event_handler_enabled='0', flap_detection_enabled='1', is_flapping='0', percent_state_change='0.000000', latency='0.000100', execution_time='0.125890', scheduled_downtime_depth='0', failure_prediction_enabled='0', process_performance_data='1', obsess_over_host='1', modified_host_attributes='0', event_handler='xi_host_notification_handler', check_command='check_xi_host_ping!3000\.0!80%!5000\.0!100%!!!!', normal_check_interval='2.000000', retry_check_interval='1.000000', check_timeperiod_object_id='122' ON DUPLICATE KEY UPDATE instance_id='1', host_object_id='120471', status_update_time=FROM_UNIXTIME(1424353946), output='OK - SQ1VPLRSA001\.TOR\.QUEST\.COM: rta 24\.467ms, lost 0%', long_output='', perfdata='rta=24\.467ms;3000\.000;5000\.000;0; pl=0%;80;100;; rtmax=24\.678ms;;;; rtmin=24\.301ms;;;;', current_state='0', has_been_checked='1', should_be_scheduled='1', current_check_attempt='1', max_check_attempts='3', last_check=FROM_UNIXTIME(1424353874), next_check=FROM_UNIXTIME(1424353941), check_type='0', last_state_change=FROM_UNIXTIME(0), last_hard_state_change=FROM_UNIXTIME(0), last_hard_state='0', last_time_up=FROM_UNIXTIME(1424353874), last_time_down=FROM_UNIXTIME(0), last_time_unreachable=FROM_UNIXTIME(0), state_type='1', last_notification=FROM_UNIXTIME(0), next_notification=FROM_UNIXTIME(0), no_more_notifications='0', notifications_enabled='1', problem_has_been_acknowledged='0', acknowledgement_type='0', current_notification_number='0', passive_checks_enabled='1', active_checks_enabled='1', event_handler_enabled='0', flap_detection_enabled='1', is_flapping='0', percent_state_change='0.000000', latency='0.000100', execution_time='0.125890', scheduled_downtime_depth='0', failure_prediction_enabled='0', process_performance_data='1', obsess_over_host='1', modified_host_attributes='0', event_handler='xi_host_notification_handler', check_command='check_xi_host_ping!3000\.0!80%!5000\.0!100%!!!!', normal_check_interval='2.000000', retry_check_interval='1.000000', check_timeperiod_object_id='122'
[1424353946.455953] [002.0] [pid=8777] INSERT INTO nagios_hoststatus SET instance_id='1', host_object_id='120471', status_update_time=FROM_UNIXTIME(1424353946), output='OK - SQ1VPLRSA001\.TOR\.QUEST\.COM: rta 24\.375ms, lost 0%', long_output='', perfdata='rta=24\.375ms;3000\.000;5000\.000;0; pl=0%;80;100;; rtmax=24\.584ms;;;; rtmin=24\.192ms;;;;', current_state='0', has_been_checked='1', should_be_scheduled='1', current_check_attempt='1', max_check_attempts='3', last_check=FROM_UNIXTIME(1424353946), next_check=FROM_UNIXTIME(1424354066), check_type='0', last_state_change=FROM_UNIXTIME(0), last_hard_state_change=FROM_UNIXTIME(0), last_hard_state='0', last_time_up=FROM_UNIXTIME(1424353946), last_time_down=FROM_UNIXTIME(0), last_time_unreachable=FROM_UNIXTIME(0), state_type='1', last_notification=FROM_UNIXTIME(0), next_notification=FROM_UNIXTIME(0), no_more_notifications='0', notifications_enabled='1', problem_has_been_acknowledged='0', acknowledgement_type='0', current_notification_number='0', passive_checks_enabled='1', active_checks_enabled='1', event_handler_enabled='0', flap_detection_enabled='1', is_flapping='0', percent_state_change='0.000000', latency='0.000230', execution_time='0.128340', scheduled_downtime_depth='0', failure_prediction_enabled='0', process_performance_data='1', obsess_over_host='1', modified_host_attributes='0', event_handler='xi_host_notification_handler', check_command='check_xi_host_ping!3000\.0!80%!5000\.0!100%!!!!', normal_check_interval='2.000000', retry_check_interval='1.000000', check_timeperiod_object_id='122' ON DUPLICATE KEY UPDATE instance_id='1', host_object_id='120471', status_update_time=FROM_UNIXTIME(1424353946), output='OK - SQ1VPLRSA001\.TOR\.QUEST\.COM: rta 24\.375ms, lost 0%', long_output='', perfdata='rta=24\.375ms;3000\.000;5000\.000;0; pl=0%;80;100;; rtmax=24\.584ms;;;; rtmin=24\.192ms;;;;', current_state='0', has_been_checked='1', should_be_scheduled='1', current_check_attempt='1', max_check_attempts='3', last_check=FROM_UNIXTIME(1424353946), next_check=FROM_UNIXTIME(1424354066), check_type='0', last_state_change=FROM_UNIXTIME(0), last_hard_state_change=FROM_UNIXTIME(0), last_hard_state='0', last_time_up=FROM_UNIXTIME(1424353946), last_time_down=FROM_UNIXTIME(0), last_time_unreachable=FROM_UNIXTIME(0), state_type='1', last_notification=FROM_UNIXTIME(0), next_notification=FROM_UNIXTIME(0), no_more_notifications='0', notifications_enabled='1', problem_has_been_acknowledged='0', acknowledgement_type='0', current_notification_number='0', passive_checks_enabled='1', active_checks_enabled='1', event_handler_enabled='0', flap_detection_enabled='1', is_flapping='0', percent_state_change='0.000000', latency='0.000230', execution_time='0.128340', scheduled_downtime_depth='0', failure_prediction_enabled='0', process_performance_data='1', obsess_over_host='1', modified_host_attributes='0', event_handler='xi_host_notification_handler', check_command='check_xi_host_ping!3000\.0!80%!5000\.0!100%!!!!', normal_check_interval='2.000000', retry_check_interval='1.000000', check_timeperiod_object_id='122'
[1424353946.457205] [002.0] [pid=8777] INSERT INTO nagios_hoststatus SET instance_id='1', host_object_id='120471', status_update_time=FROM_UNIXTIME(1424353946), output='OK - SQ1VPLRSA001\.TOR\.QUEST\.COM: rta 24\.375ms, lost 0%', long_output='', perfdata='rta=24\.375ms;3000\.000;5000\.000;0; pl=0%;80;100;; rtmax=24\.584ms;;;; rtmin=24\.192ms;;;;', current_state='0', has_been_checked='1', should_be_scheduled='1', current_check_attempt='1', max_check_attempts='3', last_check=FROM_UNIXTIME(1424353946), next_check=FROM_UNIXTIME(1424354066), check_type='0', last_state_change=FROM_UNIXTIME(0), last_hard_state_change=FROM_UNIXTIME(0), last_hard_state='0', last_time_up=FROM_UNIXTIME(1424353946), last_time_down=FROM_UNIXTIME(0), last_time_unreachable=FROM_UNIXTIME(0), state_type='1', last_notification=FROM_UNIXTIME(0), next_notification=FROM_UNIXTIME(0), no_more_notifications='0', notifications_enabled='1', problem_has_been_acknowledged='0', acknowledgement_type='0', current_notification_number='0', passive_checks_enabled='1', active_checks_enabled='1', event_handler_enabled='0', flap_detection_enabled='1', is_flapping='0', percent_state_change='0.000000', latency='0.000230', execution_time='0.128340', scheduled_downtime_depth='0', failure_prediction_enabled='0', process_performance_data='1', obsess_over_host='1', modified_host_attributes='0', event_handler='xi_host_notification_handler', check_command='check_xi_host_ping!3000\.0!80%!5000\.0!100%!!!!', normal_check_interval='2.000000', retry_check_interval='1.000000', check_timeperiod_object_id='122' ON DUPLICATE KEY UPDATE instance_id='1', host_object_id='120471', status_update_time=FROM_UNIXTIME(1424353946), output='OK - SQ1VPLRSA001\.TOR\.QUEST\.COM: rta 24\.375ms, lost 0%', long_output='', perfdata='rta=24\.375ms;3000\.000;5000\.000;0; pl=0%;80;100;; rtmax=24\.584ms;;;; rtmin=24\.192ms;;;;', current_state='0', has_been_checked='1', should_be_scheduled='1', current_check_attempt='1', max_check_attempts='3', last_check=FROM_UNIXTIME(1424353946), next_check=FROM_UNIXTIME(1424354066), check_type='0', last_state_change=FROM_UNIXTIME(0), last_hard_state_change=FROM_UNIXTIME(0), last_hard_state='0', last_time_up=FROM_UNIXTIME(1424353946), last_time_down=FROM_UNIXTIME(0), last_time_unreachable=FROM_UNIXTIME(0), state_type='1', last_notification=FROM_UNIXTIME(0), next_notification=FROM_UNIXTIME(0), no_more_notifications='0', notifications_enabled='1', problem_has_been_acknowledged='0', acknowledgement_type='0', current_notification_number='0', passive_checks_enabled='1', active_checks_enabled='1', event_handler_enabled='0', flap_detection_enabled='1', is_flapping='0', percent_state_change='0.000000', latency='0.000230', execution_time='0.128340', scheduled_downtime_depth='0', failure_prediction_enabled='0', process_performance_data='1', obsess_over_host='1', modified_host_attributes='0', event_handler='xi_host_notification_handler', check_command='check_xi_host_ping!3000\.0!80%!5000\.0!100%!!!!', normal_check_interval='2.000000', retry_check_interval='1.000000', check_timeperiod_object_id='122'
Re: no Host duration : N/A (no Host Uptime)
I have two servers with pretty same name.
I did compare those two servers in nagios_hostatus table and found following difference:
last_check next_check check_type last_state_change last_hard_state_change last_hard_state last_time_up last_time_down
2/19/2015 8:58 2/19/2015 9:00 0 12/15/2014 0:30 12/07/2014 9:45 0 2/19/2015 8:58 12/15/2014 0:30
2/19/2015 8:58 2/19/2015 9:00 0 12/31/1969 19:00 12/31/1969 19:00 0 2/19/2015 8:58 12/31/1969 19:00
As you can see following fields are not going update:
last_state_change last_hard_state_change last_hard_state last_time_up last_time_down
But I submitted custom passive check result with host state DOWN.
On the scheduled check it come UP with normal status of UP but starting from time of submitted passive check with DOWN state.
Looks like is some bug some where.
It is happened first time with me.
I did compare those two servers in nagios_hostatus table and found following difference:
last_check next_check check_type last_state_change last_hard_state_change last_hard_state last_time_up last_time_down
2/19/2015 8:58 2/19/2015 9:00 0 12/15/2014 0:30 12/07/2014 9:45 0 2/19/2015 8:58 12/15/2014 0:30
2/19/2015 8:58 2/19/2015 9:00 0 12/31/1969 19:00 12/31/1969 19:00 0 2/19/2015 8:58 12/31/1969 19:00
As you can see following fields are not going update:
last_state_change last_hard_state_change last_hard_state last_time_up last_time_down
But I submitted custom passive check result with host state DOWN.
On the scheduled check it come UP with normal status of UP but starting from time of submitted passive check with DOWN state.
Looks like is some bug some where.
It is happened first time with me.
Last edited by questrad on Thu Feb 19, 2015 9:10 am, edited 1 time in total.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: no Host duration : N/A (no Host Uptime)
In your nagios.cfg what is the following set to
If it is set to 1, I believe it will resolve the issue when adding new hosts. This may not affect previously created hosts
Code: Select all
log_initial_statesRe: no Host duration : N/A (no Host Uptime)
It has 0 value
Question.
I make some test:
I changed to have initial state in host = "d" instead of "o" and added new host - everything goes perfect and I get uptime duration right away.
Can you please confirm that my steps can resolve this issue?
Thanks
Question.
I make some test:
I changed to have initial state in host = "d" instead of "o" and added new host - everything goes perfect and I get uptime duration right away.
Can you please confirm that my steps can resolve this issue?
Thanks