Hi, I have a machine with the following details
OS : CentOS Linux 8
Icinga2 version : 2.12.1-1
I am curious to know if different escalations can be notified based on the difference between the current time and incident time. The notified user should get a comment / summary about how many hours the machine has been down.
I went through the docs, it talks about this escalation method, but uses
times = {
begin = xh
end = xh
}
I want to know if something like this can be done
downhours = currenttime - downtime
if (downhours >= 2) {
apply Notification "level2-escation"
...
...
...
assign ... notification.telegram
}
else {
apply Notification "level1-escation"
...
...
...
assign ... notification.mail
}
Basically the point is, the person receiving the escalation, one hour from the incident should get a statement saying “Host” ABC has been down for the past 1 hour, when he gets the next notification and subsequently, the statement should summarise the number of hours it has been down, saying the “Host” ABC has been down for the past x hours. I am sure Icinga2 has a way to doing this.
Thanks, Best