# Availability Report - custom state during downtime

**URL:** <https://community.icinga.com/t/availability-report-custom-state-during-downtime/4336>\
**Category:** Icinga 2\
**Created:** [May 5, 2020, 9:51pm UTC](https://community.icinga.com/t/availability-report-custom-state-during-downtime/4336 "2020-05-05T21:51:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![karim\_1234](https://community.icinga.com/letter_avatar_proxy/v4/letter/k/ac91a4/32.png) [@karim\_1234](https://community.icinga.com/u/karim_1234)\
**Post date:** [May 5, 2020, 9:51pm UTC](https://community.icinga.com/t/availability-report-custom-state-during-downtime/4336/1 "2020-05-05T21:51:35Z")

</div>

Hi,

is it possible to set a custom state for a service/host during a scheduled downtime?  
I want to create an availability report in Grafana and right now Icinga sets the state on warning or critical during a downtime. So its not clear if its a real warning or a warning during a scheduled downtime.

Or do you have any other ideas how to create an availability report where the downtimes are visible?

Thank and Regards

---

<div class="post-metadata">

**Author:** ![Pooh](https://community.icinga.com/letter_avatar_proxy/v4/letter/p/f05b48/32.png) [@Pooh](https://community.icinga.com/u/Pooh)\
**Post date:** [May 5, 2020, 10:24pm UTC](https://community.icinga.com/t/availability-report-custom-state-during-downtime/4336/2 "2020-05-05T22:24:31Z")

</div>

> Hi,
> 
> is it possible to set a custom state for a service/host

No - Icinga has no concept of “custom states”.

> during a scheduled downtime? I want to create an availability report in  
> Grafana and right now Icinga sets the state on warning or critical during a  
> downtime.

Indeed - the states reflect the current state of the service / host.

Downtime simply affects whether you get alerts telling you about the state or  
not.

> So its not clear if its a real warning or a warning during a scheduled  
> downtime.

How are you collecting the state from Icinga?

If you’re looking at a status grid, then you’ll still get the usual red,  
yellow, green squares, but in downtime the colours are paler.

If you’re using alert notifications, then you shouldn’t be getting these at all  
during downtime - something’s wrong with the configuration if you are.

> Or do you have any other ideas how to create an availability report where  
> the downtimes are visible?

Create the report based on notifications - these can include the start & stop  
of downtime periods as well as “real” alerts outside of downtime.

Remember you can write your own notification scripts, to do anything you like  
with the information - you don’t have to just accept the standard basic  
scripts which are designed to send emails.

Regards,

Antony.

---

<div class="post-metadata">

**Author:** ![karim\_1234](https://community.icinga.com/letter_avatar_proxy/v4/letter/k/ac91a4/32.png) [@karim\_1234](https://community.icinga.com/u/karim_1234)\
**Post date:** [May 6, 2020, 12:49pm UTC](https://community.icinga.com/t/availability-report-custom-state-during-downtime/4336/3 "2020-05-06T12:49:23Z")

</div>

> [@Pooh](#):
>
> Antony

Thank you Antony. You got the right idea.  
I have now created a notification object which reports service state changes, including downtimes, to a Bash script which imports them to InfluxDB and then gets visualized by Grafana.
