# SLA Querying over the API

**URL:** <https://community.icinga.com/t/sla-querying-over-the-api/15453>\
**Category:** Icinga DB\
**Created:** [May 19, 2026, 2:08pm UTC](https://community.icinga.com/t/sla-querying-over-the-api/15453 "2026-05-19T14:08:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicolasberens](https://community.icinga.com/user_avatar/community.icinga.com/nicolasberens/32/8344_2.png) [@nicolasberens](https://community.icinga.com/u/nicolasberens)\
**Post date:** [May 19, 2026, 2:08pm UTC](https://community.icinga.com/t/sla-querying-over-the-api/15453/1 "2026-05-19T14:08:19Z")

</div>

Hi,

In the IcingaDB documentation, a SLA reporting is mentioned:

> **[Retention Configuration - Configuration - Icinga DB](https://icinga.com/docs/icinga-db/latest/doc/03-Configuration/#retention-configuration)**
>
> Icinga DB can be configured using a YAML configuration file, environment variables, or both. Environment variables take precedence and override previously defined values from the configuration file.

Is there a way to query the Data over the API?

Background:

I am currently looking for a way to query the availability of Services that are in a Specific Service Group on a per-host basis.

E.g.

Host1 has 3 Services that are in the “sla” group. Each of the services fails for a Day, so i want to get the number 90% for this specific host. (30 days a month - 3x1d outage)

Is this possible with the information in that table?

All the best,

Nicolas

---

<div class="post-metadata">

**Author:** ![moreamazingnick](https://community.icinga.com/user_avatar/community.icinga.com/moreamazingnick/32/7725_2.png) [@moreamazingnick](https://community.icinga.com/u/moreamazingnick)\
**Post date:** [May 19, 2026, 2:38pm UTC](https://community.icinga.com/t/sla-querying-over-the-api/15453/2 "2026-05-19T14:38:49Z")

</div>

you can query your report via api  
here is a python3 example

```python3
user = "admin"
pw = " ****"
url = "https://example.com/icingaweb2/reporting/report/download?type=json&id=15"
page = requests.get(url, verify=False, headers={'Accept': 'application/json'}, auth=(user, pw))

```

---

<div class="post-metadata">

**Author:** ![nicolasberens](https://community.icinga.com/user_avatar/community.icinga.com/nicolasberens/32/8344_2.png) [@nicolasberens](https://community.icinga.com/u/nicolasberens)\
**Post date:** [June 3, 2026, 12:40pm UTC](https://community.icinga.com/t/sla-querying-over-the-api/15453/3 "2026-06-03T12:40:16Z")

</div>

I think this is referring to the reports module.

But that one is a bit Weird in its Reporting.

E.g. if i have a Server with 100 Services. And a single Service has been offline for the whole month, the SLA is 99%.

BUT, lets assume this is a webserver, and the service thats not available is nginx, then the “actual” uptime is 0.

So i would like to have some form of XOR for the Failing checks and want to get Time & SLA for when all Services were OK

---

<div class="post-metadata">

**Author:** ![moreamazingnick](https://community.icinga.com/user_avatar/community.icinga.com/moreamazingnick/32/7725_2.png) [@moreamazingnick](https://community.icinga.com/u/moreamazingnick)\
**Post date:** [June 3, 2026, 1:09pm UTC](https://community.icinga.com/t/sla-querying-over-the-api/15453/4 "2026-06-03T13:09:22Z")

</div>

The icingadb reporting functionality calculates individual per service sla and one combined sla in the end depending on your query/filter of the report

If you want to create dependecies or redundencies you need to put a check before your check.  
this check would take care of a redudancy with or xor or whatever you need.  
One way to implement that is creating a business process and create a check on your businessprocess.

The overall sla only makes sense if your filter is appropriate
