I am currently doing an overhaul of all my services and notifications to match my company’s policy on alarms. Basically we have 3 levels of alarm, say yellow, orange and red in order of severity. These levels mean that different actions will be taken (for example email different people or send notifications to different channels). However, this does not necessarily map with the Warning/Critical states of Icinga. For example, Service A should send a yellow alert only when critical. Or Service B should send an orange alert when warning, but red when critical. Or Service C should send a yellow warning when warning, but orange when critical.
My question is, how could I best structure this? I could of course make separate warning/critical notifications for each service but this is going to be very redundant and messy. I could also make notifications like “yellow-warning”, “yellow-critical”, “orange-warning”, etc. but I wonder if there’s a better way of handling this.
I would consider describing the criticality of services and hosts at Service and Host level, respectively, with custom variables, and use the custom variables in the Notification Apply Rules.
I must admit I was too lazy and too short on time to envision the solution. I was just pointing to a potential direction, i.e., describe the Service and Host objects with custom variables, provide the values of the variables at the correct level (Host/Service template, Host/Service object, or Service Apply Rule), and then use the variables where it makes sense (in this case the Notification Apply Rule).
What I see above goes along those lines, and I am very glad you tried the suggestion.
NB: We use the Director, and I am not familiar at all with the “function” object type. I thought the custom variables would be used in the where clause of Notification Apply rules
Hi, you might want to handle this with an external alerting service like SIGNL4: Icinga » SIGNL4 .
In that setup, Icinga sends all events to SIGNL4, and from there you can filter and route alerts however you like. For example, critical alerts can wake someone up at night, while less critical ones can politely let the on-call team keep dreaming. You can also enrich alerts with colors, icons, and other useful context.
Full disclosure: I’m with SIGNL4, so my opinion may come with a tiny bit of branded seasoning. That said, SIGNL4 integrates nicely with Icinga, including two-way status updates, alerting via app push, SMS, and voice calls, plus escalation and on-call scheduling.