team, please help me understand state_type value. when I executing API to check on host status I'm looking for last_hard_state and if its = 1, fire alert excluding 2 which mean host unreachable. But state_type is always = 1 regardless as far as I can see.
Please advise.
last_hard_state vs state_type
Re: last_hard_state vs state_type
This is what "state_type" means:
in the REST API?
Are you saying that your host is in a SOFT state, but you see:state_type = 0 is SOFT
state_type = 1 is HARD
Code: Select all
state_type = 1Be sure to check out our Knowledgebase for helpful articles and solutions!
-
nagwindmon
- Posts: 92
- Joined: Mon Dec 01, 2014 3:39 pm
Re: last_hard_state vs state_type
what state_type value suppose to be when a new host being added and it is up running to start with?
yes, running REST API
yes, running REST API
Re: last_hard_state vs state_type
It should be:
provided the newly added host is in a HARD state.
Code: Select all
state_type = 1Be sure to check out our Knowledgebase for helpful articles and solutions!
-
nagwindmon
- Posts: 92
- Joined: Mon Dec 01, 2014 3:39 pm
Re: last_hard_state vs state_type
ok, got it. its still a bit confusing since it starts with 1 (hard state) then once issue has been detected it changes to 0 (soft) after x number of retires it goes back to 1 (hard) and stays so till another host state change occurs.
Re: last_hard_state vs state_type
This is by design. Let us know if you have any further questions or it's ok to close this topic. Thanks!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
nagwindmon
- Posts: 92
- Joined: Mon Dec 01, 2014 3:39 pm
Re: last_hard_state vs state_type
I'm good, thank you, go ahead lock it.
Re: last_hard_state vs state_type
Good to get that cleared up. Locking thread.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!