Introduction
...
Notification escalations are explained in another page.
When Do Notifications Occur?
...
- When a hard state change occurs. More information on state types and hard state changes can be found on the sate type page.
- When a host or check remains in a hard non-OK state and the time specified by the "notification_interval" option in the host or check definition has passed since the last notification was sent out (for that specified host or check).
Who Gets Notified?
...
When Shinken Enterprise sends out a host or check notification, it will notify each contact that is a member of any contact groups specified in the "contact groups" option of the check definition. Shinken Enterprise realizes that a contact may be a member of more than one contact group, so it removes duplicate contact notifications before it does anything. Contacts specified on host or check are also notified.
What Filters Must Be Passed In Order For Notifications To Be Sent?
...
Ce chapitre explique en détail quand et comment sont envoyées les notifications, ainsi que les contacts concernés.
L'escalade des notifications sera expliqué dans une autre page.
Quand s'opèrent les notifications ?
La décision d’envoyer une notification est définie dans la politique de vérification. Elles sont lancées dans les cas suivants :
- quant un état "hard" change . Plus d'informations sur le statut "hard" sont disponibles dans la page "état"
- quand un hôte ou un check reste en état non-OK state et que le temps précisé dans le paramètre "notification_interval" dans la définition de l'hôte ou du check est dépassé depusi l'envoi de la dernière notification .
Qui est notifié ?
Dans chaque définition d'hôte et de check, il y a un paramètre "contact groups" et "contacts" ,qui précisent quels contacts doivent recevoir les notification pour cet hôte en particulier.
Quand Shinken Enterprise envoie une notification, il prévient chaque contact ou membre du groupe défini. Si un contact appartient à plusieurs groupes, il supprime les doublons avant envoi de la notification.
Quels filtres adoptés pour envoyer des notifications
Ce n'est pas juste parce qu'il faut envoyer la notification que des contacts vont être avertis . Il ya plusieurs filtres qu'une notification doit traverser avant qu'elle ne soit jugée suffisamment digne d'être envoyée . Même là, des contacts peuvent ne pas la recevoir si leurs filtres de notification ne permettent pas la notification .
Program-Wide Filter:
Le 1er filtre que les notifications doivent passer est un test permettant de vérifier que celles-ci sont autorisées à un niveau global. Cette étape est définie par le paramètre
Program-Wide Filter:
The first filter that notifications must pass is a test of whether or not notifications are enabled on a program-wide basis. This is initially determined by the :ref:`"enable_notifications" <configuration/configmain-advanced#enable_notifications>` directive in the main config file, but may be changed during runtime from the web interface. If notifications are disabled on a program-wide basis, no host or check notifications can be sent out - period. If they are enabled on a program-wide basis, there are still other tests that must be passed...
check and Host Filters:
...
The second filter for host or check notification is a check to see if the host or check is flapping (if you enabled flap detection). If the check or host is currently flapping, no one gets notified. Otherwise it gets passed to the next filter.
The third host or check filter that must be passed is the host- or check-specific notification options. Each check definition contains options that determine whether or not notifications can be sent out for warning states, critical states, and recoveries. Similarly, each host definition contains options that determine whether or not notifications can be sent out when the host goes down, becomes unreachable, or recovers. If the host or check notification does not pass these options, no one gets notified. If it does pass these options, the notification gets passed to the next filter...
Notifications about host or check recoveries are only sent out if a notification was sent out for the original problem. It doesn't make sense to get a recovery notification for something you never knew as a problem.
The fourth host or check filter that must be passed is the time period test. Each host and check definition has a "notification_period" option that specifies which time period contains valid notification times for the host or check. If the time that the notification is being made does not fall within a valid time range in the specified time period, no one gets contacted. If it falls within a valid time range, the notification gets passed to the next filter...
If the time period filter is not passed, Shinken Enterprise will reschedule the next notification for the host or check (if its in a non-OK state) for the next valid time present in the time period. This helps ensure that contacts are notified of problems as soon as possible when the next valid time in time period arrives.
The last set of host or check filters is conditional upon two things: (1) a notification was already sent out about a problem with the host or check at some point in the past and (2) the host or check has remained in the same non-OK state that it was when the last notification went out. If these two criteria are met, then Shinken Enterprise will check and make sure the time that has passed since the last notification went out either meets or exceeds the value specified by the "notification_interval" option in the host or check definition. If not enough time has passed since the last notification, no one gets contacted. If either enough time has passed since the last notification or the two criteria for this filter were not met, the notification will be sent out! Whether or not it actually is sent to individual contacts is up to another set of filters...
...
At this point the notification has passed the program mode filter and all host or check filters and Shinken Enterprise starts to notify all the people it should. Does this mean that each contact is going to receive the notification? No! Each contact has their own set of filters that the notification must pass before they receive it.
Contact filters are specific to each contact and do not affect whether or not other contacts receive notifications.
The first filter that must be passed for each contact are the notification options. Each contact definition contains options that determine whether or not check notifications can be sent out for warning states, critical states, and recoveries. Each contact definition also contains options that determine whether or not host notifications can be sent out when the host goes down, becomes unreachable, or recovers. If the host or check notification does not pass these options, the contact will not be notified. If it does pass these options, the notification gets passed to the next filter...
Notifications about host or check recoveries are only sent out if a notification was sent out for the original problem. It doesn't make sense to get a recovery notification for something you never knew was a problem.
The last filter that must be passed for each contact is the time period test. Each contact definition has a "notification_period" option that specifies which time period contains valid notification times for the contact. If the time that the notification is being made does not fall within a valid time range in the specified time period, the contact will not be notified. If it falls within a valid time range, the contact gets notified!
Notification Methods
...
dans le fichier principal de configuration, (il est peut être changé en cours d'utilisation dans l'interface web) . Si les notifications sont désactivées à un niveau global, aucune notification sur un hôte ou un check ne sera envoyée . Si elles sont activées au niveau global, d'autres filtres restent à passer.
Filtres sur les hôtes et les check :
Le 1er filtre à appliquer est de vérifier si l'élément n'est pas sous maintenance. Si c'est le cas, personne n'est notifié. Si ce n'est pas le cas, il passe au filtre suivant.
Le second filtre est de vérifier si l'élément n'est pas en état "flapping" (si la détection est activée).Si c'est le cas, personne n'est notifié. Si ce n'est pas le cas, il passe au filtre suivant
Le 3ème filtre est de vérifier si il n'y a pas d'options spécifiques sur l’élément. Chaque définition de check contient des options qui déterminent si les notificatiosn peuvent être envoyées en fonction de l'état "warning" ou "critical", ou de la reprise. De la même façon, chaque définition d'hôte contient des options qui déterminent si les notifications sont envoyées lorsque l'élément tombe, devient injoignable ou retrouve son état. Si la notification ne passe pas ces filtres, aucune notification n'est envoyée. Sinon, elle passe au filtre suivant.
Les notifications de retour à un état normal ne sont envoyées que lorsqu'une notification a déjà été envoyée sur le problème d'origine. Cela n'aurait pas de sens d'avertir sur un retour à la nromale alors qu'on était pas informé d'un incident...
Le 4ème filtre est de vérifier la période de test.Chaque définition d'hôte et de check contient un paramètre "notification_period" qui précise la période de validité. Si le temps ne correspond pas à la période valide, personne n'est contacté. Sinon, elle passe au filtre suivant.
Si le passage du filtre de période n'est pas réussi,Shinken Enterprise va replanifier la prochaine notification pour l'hôte ou le check (si il est dans un état non-OK ) dans la période temps valide. Cela permet de garantir que les contacts seront notifiés des problèmes dès que possible lorsque la prochaine période temps valide arrivera.
Les derniers filtres sont conditionnés par 2 choses : (1) une notification a déjà été envoyée sur un problème avec l'hôte ou le check dans le passé et (2) l'hôte ou le check est toujours dans le même état non-OK que celui dans lequel il était au moment de l'envoi de la dernière notification. Si ces 2 critères sont remplis, alors Shinken Enterprise vérifiera et s'assurer que le temps écoulé depuis la dernière notification est supérieur ou égal à la valeur spécifiée par l'option " notification_interval " dans la définition de l'hôte ou du check . Si pas assez de temps s'est écoulé depuis la dernière notification , personne n'est contacté . Si un temps suffisant s'est écoulé depuis la dernière notification ou les deux critères de ce filtre n'ont pas été réunis, la notification sera envoyée !
Filtres sur les contacts:
A ce stade, la notification a passé le programme de filtre et Shinken Enterprise commence à notifier les personnes concernées. Cela veut-il dire que chaque contact va recevoir une notification ? Non ! Chaque contact a ses propres filtres que les notifications doivent également passer avant qu'elles soient reçues.
Les filtres sont spécifiques à chaque contact .
Le 1er filtre qui doit être passé pour chaque contact concerne les options de notification. Chaque définition de contact contient des options qui déterminent si les notificatiosn peuvent être envoyées en fonction de l'état "warning" ou "critical", ou de la reprise. De la même façon, chaque définition d'hôte contient des options qui déterminent si les notifications sont envoyées lorsque l'élément tombe, devient injoignable ou retrouve son état. Si la notification ne passe pas ces filtres, aucune notification n'est envoyée. Sinon, elle passe au filtre suivant
Les notifications de retour à un état normal ne sont envoyées que lorsqu'une notification a déjà été envoyée sur le problème d'origine. Cela n'aurait pas de sens d'avertir sur un retour à la nromale alors qu'on était pas informé d'un incident...
Le 4ème filtre est de vérifier la période de test.Chaque définition de contact contient un paramètre "notification_period" qui précise la période de validité. Si le temps ne correspond pas à la période valide, personne n'est contacté. Sinon, le contact est notifié !
Méthodes de notification
Shinken Enterprise est capable de notifier sur un problème ou un retour à la normale sur tout type de support : pager, mobile, email, SMS, message audio , etc. La façon dont elles sont envoyées dépend de la commande définie dans le fichier de définition de l'objet.
Il existe déjà de nombreuses solutions externes prenant en main le gestion de ces notifications. Il suffit d'utiliser des packages disponibles supportant les mobiles, SMS....(simple script ou système complet de gestion)
Type de macro de notification
En créant votre commande de notification, il faut prendre en compte quel type de notification sera lancée. La macro $NOTIFICATIONTYPE$ contient une chaîne de caractère qui l'identifie précisément. Ci-joint une table avec les valeurs possibles et leur description :
| Valeur | Description |
|---|---|
| PROBLEM | Un check ou un hôte vient juste de passer (ou est encore) en état "problème". Si c'est une notification de check , cela signifie que le check est soit en état WARNING, UNKNOWN ou CRITICAL .Si c'est une notification d'hôte, cela signifie qu'il est dans un état DOWN ou UNREACHABLE |
There are a thousand different ways to do notifications and there are already a lot of packages out there that handle the dirty work, so why re-invent the wheel and limit yourself to a bike tire? Its much easier to let an external entity (i.e. a simple script or a full-blown messaging system) do the messy stuff. Some messaging packages that can handle notifications for pagers and cellphones are listed below in the resource section.
Notification Type Macro
...
| Value | Decription |
|---|---|
| PROBLEM | A check or host has just entered (or is still in) a problem state. If this is a check notification, it means the check is either in a WARNING, UNKNOWN or CRITICAL state. If this is a host notification, it means the host is in a DOWN or UNREACHABLE state . |
| RECOVERY | A check or host recovery has occurred. If this is a check notification, it means the check has just returned to an OK state. If it is a host notification, it means the host has just returned to an UP state. |
| ACKNOWLEDGEMENT | This notification is an acknowledgement notification for a host or check problem. Acknowledgement notifications are initiated via the web interface by contacts for the particular host or check. |
| FLAPPINGSTART | The host or check has just started flapping. |
| FLAPPINGSTOP | The host or check has just stopped flapping. |
| FLAPPINGDISABLED | The host or check has just stopped flapping because flap detection was disabled |
| DOWNTIMESTART | The host or check has just entered a period of scheduled downtime. Future notifications will be suppressed. |
| DOWNTIMESTOP | The host or check has just exited from a period of scheduled downtime. Notifications about problems can now resume. |
| DOWNTIMECANCELLED | The period of scheduled downtime for the host or check was just cancelled. Notifications about problems can now resume. |
...