This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
public:doku:nagios_icecast [2011/03/20 01:38] ello angelegt |
public:doku:nagios_icecast [2011/03/20 14:58] ello |
||
---|---|---|---|
Line 20: | Line 20: | ||
</file> | </file> | ||
+ | <file|/etc/nagios-plugins/config/icecast.cfg> | ||
+ | #checks if the icecast is accessible via http | ||
+ | define command { | ||
+ | command_name check_icecast_http | ||
+ | command_line /usr/lib/nagios/plugins/check_http -A nagios -H '$HOSTNAME$' -I '$HOSTADDRESS$' -N -p $ARG1$ | ||
+ | } | ||
+ | </file> | ||
Andere Ports sind natürlich auch denkbar. | Andere Ports sind natürlich auch denkbar. | ||
+ | Dann sollte man natürlich überprüfen, ob ein mountpoint existiert. | ||
+ | Dazu kann man den http-check nehmen und auf eine spezifische url überprüfen. Dabei muss man beachten, mit den Schalter "-N" nach dem Header abzubrechen (der content endet ja theoretisch nie). | ||
<file|/etc/nagios-plugins/config/icecast.cfg> | <file|/etc/nagios-plugins/config/icecast.cfg> | ||
Line 29: | Line 38: | ||
command_line /usr/lib/nagios/plugins/check_http -A nagios -H '$HOSTNAME$' -I '$HOSTADDRESS$' -N -p $ARG1$ -u '$ARG2$' | command_line /usr/lib/nagios/plugins/check_http -A nagios -H '$HOSTNAME$' -I '$HOSTADDRESS$' -N -p $ARG1$ -u '$ARG2$' | ||
} | } | ||
+ | </file> | ||
- | #checks if the icecast is accessible via http | + | Denkbar wäre auch eine Mindestlänge des Contents zu überprüfen: |
- | define command { | + | <file|/etc/nagios-plugins/config/icecast.cfg> |
- | command_name check_icecast_http | + | kommt noch |
- | command_line /usr/lib/nagios/plugins/check_http -A nagios -H '$HOSTNAME$' -I '$HOSTADDRESS$' -N -p $ARG1$ | + | </file> |
- | } | + | |
+ | |||
+ | Dann lässt sich noch überprüfen, ob valide Daten vom Icecast kommen | ||
+ | <file|/etc/nagios-plugins/config/icecast.cfg> | ||
+ | kommt noch | ||
</file> | </file> | ||
+ | ==== Beispielhafte Host-Definition ==== | ||
Folgende Host-Definition definiert einen Host "icecast1" mit entsprechender ip-addresse. | Folgende Host-Definition definiert einen Host "icecast1" mit entsprechender ip-addresse. | ||
Es werden 2 Mountpoints definiert: /test und /test-fallback. Dabei ist /test-fallback als fallback für /test im icecast definiert. | Es werden 2 Mountpoints definiert: /test und /test-fallback. Dabei ist /test-fallback als fallback für /test im icecast definiert. |