Page 1 of 1

Reporting question

Posted: Mon Nov 30, 2020 5:36 pm
by RwynneZAS
We are wanting to provide SLA overviews based on our Nagios data.

We have various different sets of service platforms. I know I can use a servicegroup to create set of services to monitor for SLA purposes for each one, and provide a topline number of availability.

Is it possible to create a report that will aggregate several of these into one report.

So, for example, let's say I have three different platforms. i create a service group for each one, and an SLA report based of of that.

Platform 1: 99.4%
Platform 2: 99.6%
Platform 3: 98.9%

I'd like to be able to generate a report that collects these different service groups and provides the topline number from each one on a single report that can be distributed to relevant parties in management.

I hope this make sense. Thanks for any advice.

Re: Reporting question

Posted: Mon Nov 30, 2020 6:51 pm
by Rfferrao13
If I may offer some advice, perhaps BPI (with check_bpi.php) could be of use for this?

Re: Reporting question

Posted: Tue Dec 01, 2020 4:52 pm
by RwynneZAS
Possibly. I'm not familiar with it, though at first glance of the documentation, I'm not sure how it gets me where I want to be, reports wise.

Re: Reporting question

Posted: Tue Dec 01, 2020 6:11 pm
by RwynneZAS
Or, is the notion that I set up a BPI for each platform, then put all the BPI objects into a hostgroup and run an SLA report against that?

Do the Dummy BPI hosts consume a license?

Re: Reporting question

Posted: Tue Dec 01, 2020 7:37 pm
by RwynneZAS
Ok, I think I'm getting a feel for this.

Create a BPI group consisting of the essential services for the platform. "These X things must all be up to call the platform up".

Create BPI checks to monitor the status of each BPI group.

Put all those checks into a service group, and run the SLA report on that. The detail report will simply be each of the BPI checks, not the underlying services.

Is that the approach? Looks like it will solve my need. Just making sure i"m not missing anything.

Re: Reporting question

Posted: Tue Dec 01, 2020 11:34 pm
by Rfferrao13
RwynneZAS wrote:Ok, I think I'm getting a feel for this.

Create a BPI group consisting of the essential services for the platform. "These X things must all be up to call the platform up".

Create BPI checks to monitor the status of each BPI group.

Put all those checks into a service group, and run the SLA report on that. The detail report will simply be each of the BPI checks, not the underlying services.

Is that the approach? Looks like it will solve my need. Just making sure i"m not missing anything.
Like you've most likely already noticed, this setup has some drawbacks and can be laborious; but yes, that's kind of what I figured would (maybe) work for what you described as your use case -- basically the BPI checks would each represent one of the Platforms aforementioned. Ultimately, it's your call.

Re: Reporting question

Posted: Wed Dec 02, 2020 3:27 am
by RwynneZAS
Well, it looks like *a* solution for my need, at least. And it should not be all that laborious once it's set up! This is cool. and a whole area in Nagios I hadn't really explored, so thanks for the pointer!

Re: Reporting question

Posted: Wed Dec 02, 2020 11:09 am
by ssax
As another option, you could also get the information by passing &servicegroup=SERVICEGROUPNAME to the XI API SLA endpoint and parse it how you'd like, see here on your system:

http://YOURXISERVER/nagiosxi/help/api-o ... bjects-sla

For example:

Code: Select all

curl -k -L 'http://YOURXISERVER/nagiosxi/api/v1/objects/sla?apikey=APIKEY&pretty=1&servicegroup=myservicegroup'

Code: Select all

{
    "sla": {
        "hosts": {
            "average": "100.000"
        },
        "services": {
            "average": "84.615"
        }
    }
}

Re: Reporting question

Posted: Wed Dec 02, 2020 6:59 pm
by RwynneZAS
ssax wrote:As another option, you could also get the information by passing &servicegroup=SERVICEGROUPNAME to the XI API SLA endpoint and parse it how you'd like, see here on your system:
that's also a promising avenue, thanks. I hadn't previously worked with the API.

Is there a way to get the verbose output (similar to when I click on "Show Details" on the SLA report run from the web interface?

Re: Reporting question

Posted: Thu Dec 03, 2020 4:33 pm
by ssax
Not currently, If you pass a hostgroup/servicegroup it only does the overall average, I looked at the code and tested it, development will need to add that showdetail option to the API code, I have submitted the request:

FR: XI - SLA API Endpoint - Add showdetail option from SLA report so when you pass a hostgroup/servicegroup you can see the host/service details instead of the overall group average like it currently does

Please keep in mind that the decision to implement the enhancement is at the discretion of our development team.

Thank you!