REST service and host status + downtime and acknowledgements
Posted: Wed Feb 22, 2017 8:19 am
Hi,
I'm writing a Little feature request for my organisation now, which is basically utilizing the Nagios XI BPI idea, but spiced up with our specific requirements.
what I'm working on:
I have a central java application which will run on the nagios Xi server - as a service/daemon (using apache common daemon)
the application pulls the BPI configuration, and then aligns BPI's in a matrix. This matrix splits environments in the same way BPI grouping would Work, but in a slightly different way.
since this is intended for our OPS, i need to include scheduled downtime and alert acks into the BPI logical Groups. (as in it shouldnt go "red" if its acknowledged)
(another reason as to why i wanted to backend proces this, is the REST calls the BPI dashboard is actually straining the nagios server quite alot when multiple dashboards are up and running, hence centralizing it with a single proces that polls the REST interface and exposes a result table, for a nagios dashboard to pull, (alot less data processed) - Means less strain on the nagios server)
I have the service and host REST calls working as i want it to - but i need some clarification on a few Things just to get it right - I've been unable to find meaningful information anywhere.
the REST call to /downtime:
As the service and host REST calls doesnt contain information whether or not the service/host is in a downtime state - i understand that i need to pull the /downtime information.
These registrations contain links (object_id) to the respective service_id/host_id - check.
but is the actual downtime status of a check done by nagios through the start_time and end_time?, or is there a flag ? "=1" somewhere i could pull?, i could simply check if time is between start and end.. but would be rather silly if Theres an attribute somewhere I've missed.
or are you checking up against the service/host calls last_check time ?
also please confirm for the /downtime json:
downtime_type ---> what are these values representing?
objecttype_id is 1 for host checks, 2 for service checks ?
object_id is either service_id (for service checks) or host_id (for host checks) depending on objecttype_ids value for host/service ?
the REST call to /*status (host/service):
acknowledgement_type is ---> what are these values representing ?
problem_acknowledged is ---> what are these values representing ? (im guessing 0 is "null" and 1 is "acknowledged" - any more states?)
I'm writing a Little feature request for my organisation now, which is basically utilizing the Nagios XI BPI idea, but spiced up with our specific requirements.
what I'm working on:
I have a central java application which will run on the nagios Xi server - as a service/daemon (using apache common daemon)
the application pulls the BPI configuration, and then aligns BPI's in a matrix. This matrix splits environments in the same way BPI grouping would Work, but in a slightly different way.
since this is intended for our OPS, i need to include scheduled downtime and alert acks into the BPI logical Groups. (as in it shouldnt go "red" if its acknowledged)
(another reason as to why i wanted to backend proces this, is the REST calls the BPI dashboard is actually straining the nagios server quite alot when multiple dashboards are up and running, hence centralizing it with a single proces that polls the REST interface and exposes a result table, for a nagios dashboard to pull, (alot less data processed) - Means less strain on the nagios server)
I have the service and host REST calls working as i want it to - but i need some clarification on a few Things just to get it right - I've been unable to find meaningful information anywhere.
the REST call to /downtime:
As the service and host REST calls doesnt contain information whether or not the service/host is in a downtime state - i understand that i need to pull the /downtime information.
These registrations contain links (object_id) to the respective service_id/host_id - check.
but is the actual downtime status of a check done by nagios through the start_time and end_time?, or is there a flag ? "=1" somewhere i could pull?, i could simply check if time is between start and end.. but would be rather silly if Theres an attribute somewhere I've missed.
or are you checking up against the service/host calls last_check time ?
also please confirm for the /downtime json:
downtime_type ---> what are these values representing?
objecttype_id is 1 for host checks, 2 for service checks ?
object_id is either service_id (for service checks) or host_id (for host checks) depending on objecttype_ids value for host/service ?
the REST call to /*status (host/service):
acknowledgement_type is ---> what are these values representing ?
problem_acknowledged is ---> what are these values representing ? (im guessing 0 is "null" and 1 is "acknowledged" - any more states?)