Alle Dateien dieser Seite sind auch Bestandteil des check_multi-Tree und damit in den Tarballs enthalten.
Diese Datei kann als Ersatz fuer die Standard-Notification dienen, es versendet den HTML extended plugin output als Mail-Attachment.
# 'notify-service-by-email' command definition
define command {
command_name notify-service-by-email
command_line /bin/sh /usr/local/nagios/libexec/notify_service_html
}
enable_environment_macros=1
Beispiel Mailoutput (die alte Version, wird hoffentlich bald updated
):
Nagios service notification PROBLEM check_multi test WARNING Sun Aug 5 16:33:23 CEST 2007 --- Host information --- Name thinkpad IP address 127.0.0.1 --- Service information --- Name check_multi test State WARNING State type HARD Output SYSTEM WARNING - 15 plugins checked, 0 critical (), 1 warning (disk_root_warning), 0 unknown (), 14 ok WARNING service output [15] WARNING disk_root_warning - DISK WARNING - free space: / 4876 MB (42% inode=82%); OK service output [ 1] OK proc_cron - PROCS OK: 1 process with command name 'cron' [ 2] OK proc_syslogd - PROCS OK: 1 process with command name 'syslog-ng' [ 3] OK proc_xinetd - PROCS OK: 1 process with command name 'xinetd' [ 4] OK procs_RSS - RSS OK: 136 processes [ 5] OK procs_zombie - PROCS OK: 1 process with STATE = Z [ 6] OK system_load - OK - load average: 0.53, 1.20, 1.72 [ 7] OK system_mail - TCP OK - 0.015 second response time on port 25 [ 8] OK system_mailqueue - OK: mailq is empty [ 9] OK system_ntp - NTP OK: Offset 10.86617522 secs [10] OK system_portmapper - OK: RPC program portmapper version 2 udp running [11] OK system_rootdisk - DISK OK - free space: / 4876 MB (42% inode=82%); [12] OK system_ssh - SSH OK - OpenSSH_4.4 (protocol 1.99) [13] OK system_swap - SWAP OK - 97% free (1978 MB out of 2048 MB) [14] OK system_syslog - FILE_AGE OK: /var/log/messages is 1 seconds old and 6943224 bytes Plugin check_multi!/usr/local/nagios/etc/check_multi.cmd Execution time(s) 1.248 --- Contact information --- Name nagiosadmin Alias Nagios Admin Mail address Matthias.Flacke@gmx.net Notification type PROBLEM --- Service URLs --- Service details http://localhost/nagios/cgi-bin/extinfo.cgi?type=2&host=thinkpad&service=check_multi test Service alert history http://localhost/nagios/cgi-bin/history.cgi?host=thinkpad&service=check_multi test Service availability http://localhost/nagios/cgi-bin/avail.cgi?host=thinkpad&&service=check_multi test&show_log_entries Service comments http://localhost/nagios --- Host URLs --- Host details http://localhost/nagios/cgi-bin/extinfo.cgi?type=1&host=thinkpad Host services http://localhost/nagios/cgi-bin/status.cgi?host=dada Host alert history http://localhost/nagios/cgi-bin/history.cgi?host=thinkpad Host availability http://localhost/nagios/cgi-bin/avail.cgi?host=thinkpad&show_log_entries Host comments http://localhost/nagios
Momentan gibt es die status_query.cgi nur in einer der Entwicklerversionen unter contrib/status_query. Das CGI per make erstellen und ins Nagios-CGI-Verzeichnis kopieren, das normalerweise in <nagiosdir>/sbin liegt.
Das CGI-Script bietet ein flexibles Interface, um verschiedene Felder in der status.dat abzufragen und die Ergebnisse in einer Tabelle zu praesentieren, die der status.cgi aehnelt.