Howto let Nagios send documentationlinks

Author: stephan  |  Category: Linux, Nagios, Netzwerk

[lang_en]
If you use Nagios to monitor a lot of services and hosts , you want to link the Dokumentation to nagios and you want to see the Link also in the Notification email.

Whats the way to achieve this??

You can define a special Section in the configuration for Extended Information about Services . Into this section you have to put a Variable „action_url“ with the URL of your dokulink, Than you’ll find the Link on the webpage

define serviceextinfo{
host_name localhost
service_description some service
action_url http://link.to.doku
}

To see the Link also in the eMail you have to put the following


...
$SERVICEACTIONURL$ \n
...

into your notifcation Command.

2 additional notes:
1.)This will also work by using $SERVICENOTESURL$ but $SERVICENOTESURL$ is used by tools like nagiosgrapher. So use $SERVICEACTIONSURL$
2.)This will also work for $HOSTACTIONURL$
[/lang_en] [lang_de]
Wenn man nagios einsetzt um sehr viele Hosts und Dienste zu überwachen , wäre es schön wenn der Nagios im Störungsfall gleich die Doku zum enstprechenden Dienst mit verschickt.

Ich stand genau vor diesem Problem und habe nun diese Lösung gefunden .

Zur Konfiguration des Services wird nun eine Erweiterungsektion zum Service hinugefügt. In diese Sektion kommt eine Variable action_url mit einem Link auf die Doku.
Dann wird dieser Link auf jeden Fall schon auf Weboberfläche angezeigt.


define serviceextinfo{
host_name localhost
service_description some service
action_url http://link.to.doku
}

Damit er auch noch in der Mial zu sehen ist muss dem/den Notofikationkommando(s) noch folgendes hinzugefügt werden.

...
$SERVICEACTIONURL$ \n
...

Zwei Ergänzungen:
1.) Es wurde auch ,mit der Variable $SERVICENOTESURL$ funktionieren, die wird allerdings auch von Addons wie dem Nagiosgrapher genutzt.
2.)Für Hosts funktioniert das ganze gleich, da heisst die Variable $HOSTACTIONURL$
[/lang_de]

Tags: , , , , , ,