Change Icinga service display name depending on the python command return

Hello Community.

I have an Icinga service that calls an Icinga command that triggers a python script.

I am wondering if it is there a way to change the Icinga service display name according to the python script return.


This python script executes a SQL stored procedure to check a scenario.

If this SP returns 10, then Icinga service display name should be Severity 2 + Message. If this SP returns 5, then Icinga service display name should be Severity 1 + Message.

I am reading the docs and forums but so far I didn’t find anything. For now, we are just using ICG_STATE_CRITICAL, ICG_STATE_WARNING, ICG_STATE_OK as exit codes.

But the display name I couldn’t find yet.

Thank you in advance.
Marcelo Moraes

sorry that doesn’t work.

but you can create dashboards in icingaweb2 and filter by check output which is something you can control.

So you create a severity2 dashboards with services that produced a SEVERITY=2 within its output

Well, it does not meet the requirements I received, neither my expectations with the tool.

Thanks for your response.

It would help a lot if you specify it in more detail.
Why you need that?
What’s the reason you need to change a displayname?
What are you trying to achieve?

We have an integration between icinga and another tool, and this integration relies on icinga service display name to map to an alert escalation list.

So if a first threshold of 10% is reached, it needs to raise an alert with severity 2, for example, and it will integrate with this other tool and goes to an escalation list based on this severity 2.

And then, if nothing is done and the threshold reaches 5%, it need to raise the severity to 1, for example, and make this integration now receive this new severity and starts the escalation workflow in accordance to it.

Not sure if it makes sense to you.

how do you realise the integration?