Nagios API Rest

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jalzurix
Posts: 10
Joined: Tue Mar 21, 2017 9:52 am

Nagios API Rest

Post by jalzurix »

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,
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios API Rest

Post by scottwilkerson »

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?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
jalzurix
Posts: 10
Joined: Tue Mar 21, 2017 9:52 am

Re: Nagios API Rest

Post by jalzurix »

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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios API Rest

Post by scottwilkerson »

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.
It's really going to depend on what you named the service checks when you ran the BPI wizard.

If you didn't run the BPI wizard for these yet, then they would not exist.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
jalzurix
Posts: 10
Joined: Tue Mar 21, 2017 9:52 am

Re: Nagios API Rest

Post by jalzurix »

scottwilkerson wrote:
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.
It's really going to depend on what you named the service checks when you ran the BPI wizard.

If you didn't run the BPI wizard for these yet, then they would not exist.
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.

Thanks Scott,
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios API Rest

Post by scottwilkerson »

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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked