{"action":"created","issue":{"url":"https://api.github.com/repos/NagiosEnterprises/nagioscore/issues/23","repository_url":"https://api.github.com/repos/NagiosEnterprises/nagioscore","labels_url":"https://api.github.com/repos/NagiosEnterprises/nagioscore/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/NagiosEnterprises/nagioscore/issues/23/comments","events_url":"https://api.github.com/repos/NagiosEnterprises/nagioscore/issues/23/events","html_url":"https://github.com/NagiosEnterprises/nagioscore/issues/23","id":57277181,"number":23,"title":"HOST max_check_attempts set to 1 goes SOFT and then HARD, extra check is performed","user":{"login":"box293","id":8356113,"avatar_url":"https://avatars.githubusercontent.com/u/8356113?v=3","gravatar_id":"","url":"https://api.github.com/users/box293","html_url":"https://github.com/box293","followers_url":"https://api.github.com/users/box293/followers","following_url":"https://api.github.com/users/box293/following{/other_user}","gists_url":"https://api.github.com/users/box293/gists{/gist_id}","starred_url":"https://api.github.com/users/box293/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/box293/subscriptions","organizations_url":"https://api.github.com/users/box293/orgs","repos_url":"https://api.github.com/users/box293/repos","events_url":"https://api.github.com/users/box293/events{/privacy}","received_events_url":"https://api.github.com/users/box293/received_events","type":"User","site_admin":false},"labels":[{"id":76252140,"url":"https://api.github.com/repos/NagiosEnterprises/nagioscore/labels/wontfix","name":"wontfix","color":"000000","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2015-02-11T05:05:55Z","updated_at":"2016-11-14T16:08:00Z","closed_at":null,"body":"Originally reported here http://support.nagios.com/forum/viewtopic.php?f=7&t=31262&p=126275#p125754\n\nNagios Core 4.0.8 on CentOS 6.5\n\nWith HOST object definitions, when the max_check_attempts is set to 1, when a host goes down, it enters a SOFT state first and then a HARD state, resulting in two checks performed instead of one.\n\nSERVICE object definitions behave correctly.\n\nHere is an extract from a nagios.debug demonstrating this behaviour:\n\n```\nHOST Up then Down then Up\n\n[1423605101.333215] [016.0] [pid=14074] Scheduling a forced, active check of host 'centos01' @ Wed Feb 11 08:51:38 2015\n[1423605101.333277] [008.0] [pid=14074] ** Timed Event ** Type: EVENT_HOST_CHECK, Run Time: Wed Feb 11 08:51:38 2015\n[1423605101.333279] [008.0] [pid=14074] ** Host Check Event ==> Host: 'centos01', Options: 1, Latency: 0.000050 sec\n[1423605101.338902] [016.1] [pid=14074] HOST: centos01, ATTEMPT=1/1, CHECK TYPE=ACTIVE, STATE TYPE=HARD, OLD STATE=0, NEW STATE=0\n[1423605101.338911] [016.1] [pid=14074] Host was UP.\n[1423605101.338917] [016.1] [pid=14074] Host is still UP.\n[1423605101.338924] [016.1] [pid=14074] Pre-handle_host_state() Host: centos01, Attempt=1/1, Type=HARD, Final State=0 (UP)\n[1423605101.339083] [016.1] [pid=14074] Post-handle_host_state() Host: centos01, Attempt=1/1, Type=HARD, Final State=0 (UP)\n[1423605101.339297] [016.0] [pid=14074] Scheduling a non-forced, active check of host 'centos01' @ Wed Feb 11 08:56:41 2015\n\n[1423605136.947174] [016.0] [pid=14074] Scheduling a forced, active check of host 'centos01' @ Wed Feb 11 08:52:10 2015\n[1423605136.947324] [008.0] [pid=14074] ** Timed Event ** Type: EVENT_HOST_CHECK, Run Time: Wed Feb 11 08:52:10 2015\n[1423605136.947329] [008.0] [pid=14074] ** Host Check Event ==> Host: 'centos01', Options: 1, Latency: 0.000134 sec\n[1423605146.953117] [016.1] [pid=14074] HOST: centos01, ATTEMPT=1/1, CHECK TYPE=ACTIVE, STATE TYPE=HARD, OLD STATE=0, NEW STATE=1\n[1423605146.953121] [016.1] [pid=14074] Host was UP.\n[1423605146.953124] [016.1] [pid=14074] Host is now UP.\n[1423605146.953134] [016.1] [pid=14074] Pre-handle_host_state() Host: centos01, Attempt=1/1, Type=SOFT, Final State=1 (DOWN)\n[1423605146.953417] [016.1] [pid=14074] Post-handle_host_state() Host: centos01, Attempt=1/1, Type=SOFT, Final State=1 (DOWN)\n[1423605146.953462] [016.0] [pid=14074] Scheduling a non-forced, active check of host 'centos01' @ Wed Feb 11 08:53:26 2015\n\n[1423605206.929373] [008.0] [pid=14074] ** Timed Event ** Type: EVENT_HOST_CHECK, Run Time: Wed Feb 11 08:53:26 2015\n[1423605206.929383] [008.0] [pid=14074] ** Host Check Event ==> Host: 'centos01', Options: 0, Latency: 0.000000 sec\n[1423605209.933987] [016.1] [pid=14074] HOST: centos01, ATTEMPT=1/1, CHECK TYPE=ACTIVE, STATE TYPE=SOFT, OLD STATE=1, NEW STATE=1\n[1423605209.934000] [016.1] [pid=14074] Host was DOWN.\n[1423605209.934010] [016.1] [pid=14074] Host is still DOWN.\n[1423605209.934031] [016.1] [pid=14074] Pre-handle_host_state() Host: centos01, Attempt=1/1, Type=HARD, Final State=1 (DOWN)\n[1423605209.938604] [016.1] [pid=14074] Post-handle_host_state() Host: centos01, Attempt=1/1, Type=HARD, Final State=1 (DOWN)\n[1423605209.938683] [016.0] [pid=14074] Scheduling a non-forced, active check of host 'centos01' @ Wed Feb 11 08:58:29 2015\n\n[1423605294.255760] [016.0] [pid=14074] Scheduling a forced, active check of host 'centos01' @ Wed Feb 11 08:54:51 2015\n[1423605294.255831] [008.0] [pid=14074] ** Timed Event ** Type: EVENT_HOST_CHECK, Run Time: Wed Feb 11 08:54:51 2015\n[1423605294.255832] [008.0] [pid=14074] ** Host Check Event ==> Host: 'centos01', Options: 1, Latency: 0.000055 sec\n[1423605294.259083] [016.1] [pid=14074] HOST: centos01, ATTEMPT=1/1, CHECK TYPE=ACTIVE, STATE TYPE=HARD, OLD STATE=1, NEW STATE=0\n[1423605294.259085] [016.1] [pid=14074] Host was DOWN.\n[1423605294.259086] [016.1] [pid=14074] Host experienced a HARD recovery (it's now UP).\n[1423605294.259099] [016.1] [pid=14074] Pre-handle_host_state() Host: centos01, Attempt=1/1, Type=HARD, Final State=0 (UP)\n[1423605294.259394] [016.1] [pid=14074] Post-handle_host_state() Host: centos01, Attempt=1/1, Type=HARD, Final State=0 (UP)\n\n\nService Up then Down then Up\n\n[1423605375.013349] [016.0] [pid=15447] Scheduling a forced, active check of service 'SSH Server' on host 'centos01' @ Wed Feb 11 08:56:12 2015\n[1423605375.042681] [016.1] [pid=15447] Service is OK.\n[1423605375.042683] [016.1] [pid=15447] Service did not change state.\n[1423605375.042711] [016.0] [pid=15447] Scheduling a non-forced, active check of service 'SSH Server' on host 'centos01' @ Wed Feb 11 09:01:15 2015\n\n[1423605389.043332] [016.0] [pid=15447] Scheduling a forced, active check of service 'SSH Server' on host 'centos01' @ Wed Feb 11 08:56:23 2015\n[1423605389.083359] [016.1] [pid=15447] Service is in a non-OK state!\n[1423605389.083361] [016.1] [pid=15447] Host is currently UP, so we'll recheck its state to make sure...\n[1423605389.083366] [001.0] [pid=15447] schedule_host_check()\n[1423605389.083383] [016.0] [pid=15447] Scheduling a non-forced, active check of host 'centos01' @ Wed Feb 11 08:56:29 2015\n[1423605389.083443] [016.1] [pid=15447] Current/Max Attempt(s): 1/1\n[1423605389.083447] [016.1] [pid=15447] Service has reached max number of rechecks, so we'll handle the error...\n[1423605389.083937] [016.0] [pid=15447] Scheduling a non-forced, active check of service 'SSH Server' on host 'centos01' @ Wed Feb 11 09:01:29 2015\n\n[1423605431.622650] [016.0] [pid=15447] Scheduling a forced, active check of service 'SSH Server' on host 'centos01' @ Wed Feb 11 08:57:03 2015\n[1423605431.665858] [016.1] [pid=15447] Service is OK.\n[1423605431.665860] [016.1] [pid=15447] Service experienced a HARD RECOVERY.\n[1423605431.666198] [016.0] [pid=15447] Scheduling a non-forced, active check of service 'SSH Server' on host 'centos01' @ Wed Feb 11 09:02:11 2015\n```\n"},"comment":{"url":"https://api.github.com/repos/NagiosEnterprises/nagioscore/issues/comments/260378358","html_url":"https://github.com/NagiosEnterprises/nagioscore/issues/23#issuecomment-260378358","issue_url":"https://api.github.com/repos/NagiosEnterprises/nagioscore/issues/23","id":260378358,"user":{"login":"Coservit","id":19691092,"avatar_url":"https://avatars.githubusercontent.com/u/19691092?v=3","gravatar_id":"","url":"https://api.github.com/users/Coservit","html_url":"https://github.com/Coservit","followers_url":"https://api.github.com/users/Coservit/followers","following_url":"https://api.github.com/users/Coservit/following{/other_user}","gists_url":"https://api.github.com/users/Coservit/gists{/gist_id}","starred_url":"https://api.github.com/users/Coservit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Coservit/subscriptions","organizations_url":"https://api.github.com/users/Coservit/orgs","repos_url":"https://api.github.com/users/Coservit/repos","events_url":"https://api.github.com/users/Coservit/events{/privacy}","received_events_url":"https://api.github.com/users/Coservit/received_events","type":"User","site_admin":false},"created_at":"2016-11-14T16:08:00Z","updated_at":"2016-11-14T16:08:00Z","body":"@tmcnag if you need any assistance from us for this issue, we are at your disposal."}}
{"actor":{"display_login":"Coservit"}}