Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Scroll Ignore
scroll-pdftrue
scroll-officetrue
scroll-chmtrue
scroll-docbooktrue
scroll-eclipsehelptrue
scroll-epubtrue
scroll-htmltrue
Panel
titleSommaire

Table of Contents
stylenone

Contexte

La commande de notification notify-service-by-email-with-images permet d'envoyer un mail de notification

Panel

Image Added

Paramétrage

La commande utilise la définition suivante :

Code Block
languagetext
themeEmacs
$NOTIFPLUGINDIR$/notify_by_email.py --title-tpl $NOTIFPLUGINDIR$/service_alert_title_template.tpl --content-tpl $NOTIFPLUGINDIR$/service_alert_content_template.tpl -F "$SENDER$" -r "$CONTACTEMAIL$" -n "$NOTIFICATIONTYPE$" -H "$HOSTNAME$" --address "$HOSTADDRESS$" --url $MAILURL$ --huuid $HOSTUUID$ --serviceuuid $SERVICEUUID$ --check "$SERVICEDESC$" --state $SERVICESTATE$ --last-state $LASTSERVICESTATEID$ --last-change $LASTSERVICESTATECHANGE$ --last-check "$DATE$ $TIME$" --output "$SERVICEOUTPUT$" --long-output "$LONGSERVICEOUTPUT$" --with-images --ack-author "$ACKAUTHOR$" --ack-data "$ACKDATA$" --downtime-comment "$SERVICEDOWNTIMECOMMENT$" --downtime-author "$SERVICEDOWNTIMEAUTHOR$" --first-notification-delay "$SERVICEFIRSTNOTIFICATIONDELAY$" --notification-number "$SERVICENOTIFICATIONNUMBER$" --realm "$HOSTREALM$"

Données communes

NomModifiable sur UnitésDéfautValeur par défaut à l'installation de ShinkenDescription
No Format
MAILURL

/etc/shinken/resource.d/email.cfg

---

http://127.0.0.1:7767

http://127.0.0.1:7767

L'adresse de l'UI de visualisation de Shinken. (dans le but par exemple de donner au contact un lien vers l'élément).

No Format
SENDER

/etc/shinken/resource.d/email.cfg

---
shinken@localhost
shinken@localhost

L'adresse mail de l'envoyeur, pour une notification mail.

No Format
NOTIFPLUGINDIR

/etc/shinken/resource.d/email.cfg

--- /var/lib/shinken/libexec/notifications/var/lib/shinken/libexec/notifications

Le répertoire dans lequel se trouve la commande de notification à exécuter.

Données de fonctionnement

NomModifiable sur Description
No Format
CONTACTEMAIL

l'utilisateur ( Onglet Général )


email de l'utilisateur à notifier

No Format
HOSTNAME

L'hôte ( Onglet Général )

nom de l'hôte

No Format
NOTIFICATIONTYPE

---

Le type de notification à envoyer. Cela correspond au type d'événement qui a été constaté sur l'élément.

  • PROBLEM    ( Le statut de l'élément est non OK )
  • RECOVERY    ( L'élément avait un problème, mais est de nouveau dans un statut OK )
  • ACKNOWLEDGEMENT ( Un utilisateur a envoyé par l'interface web un accusé de réception par rapport à un problème survenu à un hôte ou à un check )
  • FLAPPINGSTART, FLAPPINGSTOP ( L'élément est entré ou sorti d'un contexte de FLAPPING )
  • FLAPPINGDISABLED ( La détection a été désactivée pendant la durée du FLAPPING )
  • DOWNTIMESTART, DOWNTIMESTOP ( L'élément est entré ou sorti d'une période programmée d'indisponibilité )
  • DOWNTIMECANCELLED ( La période programmée d'indisponibilité de l'élément a été annulée en cours )
No Format
HOSTREALM

L'hôte ( Onglet Général )

Nom du royaume auquel appartient l'hôte

No Format
HOSTADDRESS

L'hôte ( Onglet Général )

Adresse de l'hôte

No Format
SERVICEDESC

Le check ( Onglet Général )

Nom/description du check

No Format
DATE

---

La date d'exécution de la commande

No Format
TIME

---

L'heure d'exécution de la commande

No Format
SERVICESTATE

---

État courant du check ( OK, WARNING, UNKNOWN, CRITICAL )

No Format
LASTSERVICESTATEID

---

Numéro correspondant à l'état précédent du check ( 0=UP, 1=DOWN, ou 2=UNREACHABLE )

No Format
LASTSERVICESTATECHANGE

---

Date au format timestamp du dernier changement d'état du check

No Format
SERVICEOUTPUT

---

Résultat de la dernière vérification du check

No Format
SERVICEFIRSTNOTIFICATIONDELAY

---

Nombre de minutes à attendre avant d'envoyer la première notification pour un service

No Format
SERVICENOTIFICATIONNUMBER

---

N° d'ordre d'une notification pour un événement donné 

Données pour compléter l'affichage du contenu du mail

NomModifiable sur Description
No Format
LONGSERVICEOUTPUT


Résultat long de la dernière vérification du check

No Format
ACKAUTHOR

---

L'auteur du contexte "Prise en compte"

No Format
ACKDATA

---

Le message d'un contexte "Prise en compte"

No Format
SERVICEDOWNTIMECOMMENT

---

Le commentaire de la période programmée d'indisponibilité

No Format
SERVICEDOWNTIMEAUTHOR

---

L'auteur de la période programmée d'indisponibilité

Exemple

Notification type - PROBLEM

Panel

Image Added

Notification type - RECOVERY

Panel

Image Added