This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
public:doku:nagios_icecast [2011/03/20 01:48] ello |
public:doku:nagios_icecast [2014/10/25 18:12] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ===== Icecast mit Nagios überprüfen ===== | ===== Icecast mit Nagios überprüfen ===== | ||
| - | Als erstes lässt sich natürlich der Icecast mittels check_http überprüfen. | + | Icecast lässt sich mittels check_http überprüfen. |
| + | Besser ist aber [[:public:code:check_ice|check_ice]], da das bei fehlender Existenz eines Mountpoints statt wie check_http "Warning" "Critical" zurückliefert. | ||
| Ich habe das mit einer hostgroup gemacht: | Ich habe das mit einer hostgroup gemacht: | ||
| Line 21: | Line 22: | ||
| <file|/etc/nagios-plugins/config/icecast.cfg> | <file|/etc/nagios-plugins/config/icecast.cfg> | ||
| - | #checks if the icecast is accessible via http | + | #check if icecast responds to http requests |
| define command { | define command { | ||
| command_name check_icecast_http | command_name check_icecast_http | ||
| - | command_line /usr/lib/nagios/plugins/check_http -A nagios -H '$HOSTNAME$' -I '$HOSTADDRESS$' -N -p $ARG1$ | + | command_line /usr/local/bin/check_ice -H '$HOSTADDRESS$' -p $ARG1$ |
| } | } | ||
| + | |||
| </file> | </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. | + | 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). | + | 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). Oder wie in meinem Falle [[:public:code:check_ice|check_ice]]. |
| <file|/etc/nagios-plugins/config/icecast.cfg> | <file|/etc/nagios-plugins/config/icecast.cfg> | ||
| - | #check if a url (mountpoint) exists on icecast server | + | #check if a mountpoint exists |
| define command { | define command { | ||
| command_name check_icecast_mountpoint | command_name check_icecast_mountpoint | ||
| - | command_line /usr/lib/nagios/plugins/check_http -A nagios -H '$HOSTNAME$' -I '$HOSTADDRESS$' -N -p $ARG1$ -u '$ARG2$' | + | command_line /usr/local/bin/check_ice -H '$HOSTADDRESS$' -p $ARG1$ -m '$ARG2$' |
| } | } | ||
| </file> | </file> | ||
| Line 42: | Line 44: | ||
| Denkbar wäre auch eine Mindestlänge des Contents zu überprüfen: | Denkbar wäre auch eine Mindestlänge des Contents zu überprüfen: | ||
| <file|/etc/nagios-plugins/config/icecast.cfg> | <file|/etc/nagios-plugins/config/icecast.cfg> | ||
| - | kommt noch | + | #check if a mountpoint delivers data |
| + | define command { | ||
| + | command_name check_icecast_mountpoint_data | ||
| + | command_line /usr/local/bin/check_ice -H '$HOSTADDRESS$' -p $ARG1$ -m '$ARG2$' -s '$ARG3' | ||
| + | } | ||
| </file> | </file> | ||
| + | |||
| + | Dann lässt sich noch überprüfen, ob valide Daten vom Icecast kommen | ||
| + | <file|/etc/nagios-plugins/config/icecast.cfg> | ||
| + | kommt noch | ||
| + | </file> | ||
| ==== Beispielhafte Host-Definition ==== | ==== Beispielhafte Host-Definition ==== | ||