We're developing a new componente for Nagios BPI. We need to get all the Services that we see in BPI calling to a service defined in the API REST interface: http://XXX.XX.XX.XX/nagiosxi/api/v1/obj ... X&pretty=1
We get all of them, BPI groups included. How could we know if each record is a service or a service group?
We have been trying to do with service group and contact group Rest services, but unfortunately we don't get group list.
We have create groups using "New Nagios BPI Group".
Is it possible to distingsh if each record we get with Servicestatus WS, is a group or a service?
Thanks,
Nagios API Rest
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios API Rest
Each of them are services, but what I think you are saying is distinguishing which items are monitoring BPI groups?
If so you would have to keep track of them, possibly by comparing to the objects/bpi endpoint available in 5.5.1?
If so you would have to keep track of them, possibly by comparing to the objects/bpi endpoint available in 5.5.1?
Re: Nagios API Rest
Thank you Scott,
The fact is that we want to develop an external tool to collect the information about each service we have in Nagios BPI Front. We have a service to get all the services and groups, but we don't know how to know if each one is a group or a service.
We want also to recover the group each service belongs to, and we don't know the way to do that.
We have seen the API REST documentation and we don't find anything about.
The fact is that we want to develop an external tool to collect the information about each service we have in Nagios BPI Front. We have a service to get all the services and groups, but we don't know how to know if each one is a group or a service.
We want also to recover the group each service belongs to, and we don't know the way to do that.
We have seen the API REST documentation and we don't find anything about.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios API Rest
It's really going to depend on what you named the service checks when you ran the BPI wizard.jalzurix wrote:Thank you Scott,
The fact is that we want to develop an external tool to collect the information about each service we have in Nagios BPI Front. We have a service to get all the services and groups, but we don't know how to know if each one is a group or a service.
We want also to recover the group each service belongs to, and we don't know the way to do that.
We have seen the API REST documentation and we don't find anything about.
If you didn't run the BPI wizard for these yet, then they would not exist.
Re: Nagios API Rest
Yes, we ran the BPI wizard and we see the service information, but not only de service. We see BPI Group information and we can't distingsh each from an other.scottwilkerson wrote:It's really going to depend on what you named the service checks when you ran the BPI wizard.jalzurix wrote:Thank you Scott,
The fact is that we want to develop an external tool to collect the information about each service we have in Nagios BPI Front. We have a service to get all the services and groups, but we don't know how to know if each one is a group or a service.
We want also to recover the group each service belongs to, and we don't know the way to do that.
We have seen the API REST documentation and we don't find anything about.
If you didn't run the BPI wizard for these yet, then they would not exist.
Thanks Scott,
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios API Rest
When you run the BPI Wizard it adds the groups to the host you specify.
Just look for the group names you have specified on the host you assigned the groups to.
Just look for the group names you have specified on the host you assigned the groups to.