Dies ist eine alte Version des Dokuments!
Artikel gerade in der Bearbeitung, noch nicht vollständig!
IT Infrastructure Monitoring mit Nagios unter CentOS 7.x
Mit Nagios kann man sehr leicht und einfach umfangreiche und komplexe IT-Infrastrukturen und Dienste überwachen. Nagios bietet umfassende Überwachungs- und Alarmfunktionen für Server, Switches, Anwendungen und Dienste, so dass also Störungen im Betrieb frühestmöglich erkannt und Abhilfe geschaffen werden kann.
Tiefergehende Informationen zu Nagios findet man auf der Übersichtsseite von Nagios im WWW.
Installation
Die Installation von nagios gestaltet sich sehr einfach, sofern man das Repository mailserver.guru eingebunden hat. Beschränkt sich der Installationsaufruf doch auf auf den Befehl yum.
# yum install nagios -y
Alternativ dazu kann man sich natürlich auch die einzelnen von einander abhängigen Paketen manuell installieren, oder gar nagios aus den Quellen selbst zu übersetzen.
Was alles im Paket nagios enthalten ist, können wir nach der erfolgreichen Installation mit folgendem Aufruf erkunden,
# rpm -qil nagios
Name : nagios Version : 4.0.8 Release : 2.el7.centos Architecture: x86_64 Install Date: Tue 17 Feb 2015 08:45:12 PM CET Group : Applications/System Size : 7343767 License : GPLv2 Signature : RSA/SHA1, Tue 17 Feb 2015 08:28:10 PM CET, Key ID 60ecfb9e8195aea0 Source RPM : nagios-4.0.8-2.el7.centos.src.rpm Build Date : Tue 17 Feb 2015 08:27:51 PM CET Build Host : vml000200.dmz.nausch.org Relocations : (not relocatable) Packager : Django <django@mailserver.guru> Vendor : Nagios Enterprises (http://www.nagios.org) URL : http://www.nagios.org/ Summary : Nagios monitors hosts and services and yells if somethings breaks Description : Nagios is a program that will monitor hosts and services on your network. It has the ability to send email or page alerts when a problem arises and when a problem is resolved. Nagios is written in C and is designed to run under Linux (and some other *NIX variants) as a background process, intermittently running checks on various services that you specify. The actual service checks are performed by separate "plugin" programs which return the status of the checks to Nagios. The plugins are available at http://sourceforge.net/projects/nagiosplug. This package provides the core program, web interface, and documentation files for Nagios. Development files are built as a separate package. /etc/httpd/conf.d/nagios.conf /etc/logrotate.d/nagios /etc/nagios/cgi.cfg /etc/nagios/conf.d /etc/nagios/nagios.cfg /etc/nagios/objects /etc/nagios/objects/commands.cfg /etc/nagios/objects/contacts.cfg /etc/nagios/objects/localhost.cfg /etc/nagios/objects/printer.cfg /etc/nagios/objects/switch.cfg /etc/nagios/objects/templates.cfg /etc/nagios/objects/timeperiods.cfg /etc/nagios/objects/windows.cfg /etc/nagios/passwd /etc/nagios/private /etc/nagios/private/resource.cfg /etc/rc.d/init.d/nagios /etc/sysconfig/nagios /usr/bin/convertcfg /usr/bin/nagiostats /usr/lib64/nagios/cgi-bin /usr/lib64/nagios/cgi-bin/archivejson.cgi /usr/lib64/nagios/cgi-bin/avail.cgi /usr/lib64/nagios/cgi-bin/cmd.cgi /usr/lib64/nagios/cgi-bin/config.cgi /usr/lib64/nagios/cgi-bin/extinfo.cgi /usr/lib64/nagios/cgi-bin/histogram.cgi /usr/lib64/nagios/cgi-bin/history.cgi /usr/lib64/nagios/cgi-bin/notifications.cgi /usr/lib64/nagios/cgi-bin/objectjson.cgi /usr/lib64/nagios/cgi-bin/outages.cgi /usr/lib64/nagios/cgi-bin/showlog.cgi /usr/lib64/nagios/cgi-bin/status.cgi /usr/lib64/nagios/cgi-bin/statusjson.cgi /usr/lib64/nagios/cgi-bin/statusmap.cgi /usr/lib64/nagios/cgi-bin/statuswml.cgi /usr/lib64/nagios/cgi-bin/statuswrl.cgi /usr/lib64/nagios/cgi-bin/summary.cgi /usr/lib64/nagios/cgi-bin/tac.cgi /usr/lib64/nagios/cgi-bin/traceroute.cgi /usr/lib64/nagios/cgi-bin/trends.cgi /usr/lib64/nagios/plugins/eventhandlers /usr/lib64/nagios/plugins/eventhandlers/disable_active_service_checks /usr/lib64/nagios/plugins/eventhandlers/disable_notifications /usr/lib64/nagios/plugins/eventhandlers/distributed-monitoring /usr/lib64/nagios/plugins/eventhandlers/distributed-monitoring/obsessive_svc_handler /usr/lib64/nagios/plugins/eventhandlers/distributed-monitoring/submit_check_result_via_nsca /usr/lib64/nagios/plugins/eventhandlers/enable_active_service_checks /usr/lib64/nagios/plugins/eventhandlers/enable_notifications /usr/lib64/nagios/plugins/eventhandlers/redundancy-scenario1 /usr/lib64/nagios/plugins/eventhandlers/redundancy-scenario1/handle-master-host-event /usr/lib64/nagios/plugins/eventhandlers/redundancy-scenario1/handle-master-proc-event /usr/lib64/nagios/plugins/eventhandlers/submit_check_result /usr/sbin/nagios /usr/share/doc/nagios-4.0.8 /usr/share/doc/nagios-4.0.8/Changelog /usr/share/doc/nagios-4.0.8/INSTALLING /usr/share/doc/nagios-4.0.8/README /usr/share/doc/nagios-4.0.8/UPGRADING /usr/share/doc/nagios-4.0.8/UpgradeToVersion3.ReadMe /usr/share/doc/nagios-4.0.8/UpgradeToVersion3.sh /usr/share/doc/nagios-4.0.8/internet.cfg /usr/share/licenses/nagios-4.0.8 /usr/share/licenses/nagios-4.0.8/LICENSE /usr/share/nagios /usr/share/nagios/html /usr/share/nagios/html/config.inc.php /usr/share/nagios/html/contexthelp /usr/share/nagios/html/contexthelp/A1.html /usr/share/nagios/html/contexthelp/A2.html /usr/share/nagios/html/contexthelp/A3.html /usr/share/nagios/html/contexthelp/A4.html /usr/share/nagios/html/contexthelp/A5.html /usr/share/nagios/html/contexthelp/A6.html /usr/share/nagios/html/contexthelp/A7.html /usr/share/nagios/html/contexthelp/B1.html /usr/share/nagios/html/contexthelp/C1.html /usr/share/nagios/html/contexthelp/D1.html /usr/share/nagios/html/contexthelp/E1.html /usr/share/nagios/html/contexthelp/F1.html /usr/share/nagios/html/contexthelp/G1.html /usr/share/nagios/html/contexthelp/G2.html /usr/share/nagios/html/contexthelp/G3.html /usr/share/nagios/html/contexthelp/G4.html /usr/share/nagios/html/contexthelp/G5.html /usr/share/nagios/html/contexthelp/G6.html /usr/share/nagios/html/contexthelp/H1.html /usr/share/nagios/html/contexthelp/H2.html /usr/share/nagios/html/contexthelp/H3.html /usr/share/nagios/html/contexthelp/H4.html /usr/share/nagios/html/contexthelp/H5.html /usr/share/nagios/html/contexthelp/H6.html /usr/share/nagios/html/contexthelp/H7.html /usr/share/nagios/html/contexthelp/H8.html /usr/share/nagios/html/contexthelp/I1.html /usr/share/nagios/html/contexthelp/I2.html /usr/share/nagios/html/contexthelp/I3.html /usr/share/nagios/html/contexthelp/I4.html /usr/share/nagios/html/contexthelp/I5.html /usr/share/nagios/html/contexthelp/I6.html /usr/share/nagios/html/contexthelp/I7.html /usr/share/nagios/html/contexthelp/I8.html /usr/share/nagios/html/contexthelp/I9.html /usr/share/nagios/html/contexthelp/J1.html /usr/share/nagios/html/contexthelp/K1.html /usr/share/nagios/html/contexthelp/L1.html /usr/share/nagios/html/contexthelp/L10.html /usr/share/nagios/html/contexthelp/L11.html /usr/share/nagios/html/contexthelp/L12.html /usr/share/nagios/html/contexthelp/L13.html /usr/share/nagios/html/contexthelp/L2.html /usr/share/nagios/html/contexthelp/L3.html /usr/share/nagios/html/contexthelp/L4.html /usr/share/nagios/html/contexthelp/L5.html /usr/share/nagios/html/contexthelp/L6.html /usr/share/nagios/html/contexthelp/L7.html /usr/share/nagios/html/contexthelp/L8.html /usr/share/nagios/html/contexthelp/L9.html /usr/share/nagios/html/contexthelp/M1.html /usr/share/nagios/html/contexthelp/M2.html /usr/share/nagios/html/contexthelp/M3.html /usr/share/nagios/html/contexthelp/M4.html /usr/share/nagios/html/contexthelp/M5.html /usr/share/nagios/html/contexthelp/M6.html /usr/share/nagios/html/contexthelp/N1.html /usr/share/nagios/html/contexthelp/N2.html /usr/share/nagios/html/contexthelp/N3.html /usr/share/nagios/html/contexthelp/N4.html /usr/share/nagios/html/contexthelp/N5.html /usr/share/nagios/html/contexthelp/N6.html /usr/share/nagios/html/contexthelp/N7.html /usr/share/nagios/html/docs /usr/share/nagios/html/docs/images /usr/share/nagios/html/images /usr/share/nagios/html/images/Nagios-clearbg.png /usr/share/nagios/html/images/NagiosEnterprises-whitebg-112x46.png /usr/share/nagios/html/images/ack.gif /usr/share/nagios/html/images/action-graph.gif /usr/share/nagios/html/images/action-nagios.gif /usr/share/nagios/html/images/action-orig.gif /usr/share/nagios/html/images/action.gif /usr/share/nagios/html/images/b_first2.png /usr/share/nagios/html/images/b_last2.png /usr/share/nagios/html/images/b_next2.png /usr/share/nagios/html/images/b_prev2.png /usr/share/nagios/html/images/command.png /usr/share/nagios/html/images/comment.gif /usr/share/nagios/html/images/contexthelp1.gif /usr/share/nagios/html/images/contexthelp2.gif /usr/share/nagios/html/images/critical.png /usr/share/nagios/html/images/delay.gif /usr/share/nagios/html/images/delete.gif /usr/share/nagios/html/images/detail.gif /usr/share/nagios/html/images/disabled.gif /usr/share/nagios/html/images/down.gif /usr/share/nagios/html/images/downtime.gif /usr/share/nagios/html/images/empty.gif /usr/share/nagios/html/images/enabled.gif /usr/share/nagios/html/images/extinfo.gif /usr/share/nagios/html/images/favicon.ico /usr/share/nagios/html/images/flapping.gif /usr/share/nagios/html/images/globe-support-150x150.png /usr/share/nagios/html/images/graph.gif /usr/share/nagios/html/images/greendot.gif /usr/share/nagios/html/images/histogram.png /usr/share/nagios/html/images/history.gif /usr/share/nagios/html/images/hostevent.gif /usr/share/nagios/html/images/info.png /usr/share/nagios/html/images/left.gif /usr/share/nagios/html/images/logofullsize.png /usr/share/nagios/html/images/logos /usr/share/nagios/html/images/logos/aix.gd2 /usr/share/nagios/html/images/logos/aix.gif /usr/share/nagios/html/images/logos/aix.jpg /usr/share/nagios/html/images/logos/aix.png /usr/share/nagios/html/images/logos/amiga.gd2 /usr/share/nagios/html/images/logos/amiga.gif /usr/share/nagios/html/images/logos/amiga.jpg /usr/share/nagios/html/images/logos/amiga.png /usr/share/nagios/html/images/logos/apple.gd2 /usr/share/nagios/html/images/logos/apple.gif /usr/share/nagios/html/images/logos/apple.jpg /usr/share/nagios/html/images/logos/apple.png /usr/share/nagios/html/images/logos/beos.gd2 /usr/share/nagios/html/images/logos/beos.gif /usr/share/nagios/html/images/logos/beos.jpg /usr/share/nagios/html/images/logos/beos.png /usr/share/nagios/html/images/logos/bluetooth.png /usr/share/nagios/html/images/logos/caldera.gd2 /usr/share/nagios/html/images/logos/caldera.gif /usr/share/nagios/html/images/logos/caldera.jpg /usr/share/nagios/html/images/logos/caldera.png /usr/share/nagios/html/images/logos/cat1900.gd2 /usr/share/nagios/html/images/logos/cat2900.gd2 /usr/share/nagios/html/images/logos/cat5000.gd2 /usr/share/nagios/html/images/logos/database.gd2 /usr/share/nagios/html/images/logos/database.gif /usr/share/nagios/html/images/logos/debian.gd2 /usr/share/nagios/html/images/logos/debian.gif /usr/share/nagios/html/images/logos/debian.jpg /usr/share/nagios/html/images/logos/debian.png /usr/share/nagios/html/images/logos/desktop-server.gd2 /usr/share/nagios/html/images/logos/desktop-server.gif /usr/share/nagios/html/images/logos/ethernet_card.png /usr/share/nagios/html/images/logos/fax.gd2 /usr/share/nagios/html/images/logos/fax.gif /usr/share/nagios/html/images/logos/firewall.gd2 /usr/share/nagios/html/images/logos/firewall.gif /usr/share/nagios/html/images/logos/freebsd40.gd2 /usr/share/nagios/html/images/logos/freebsd40.gif /usr/share/nagios/html/images/logos/freebsd40.jpg /usr/share/nagios/html/images/logos/freebsd40.png /usr/share/nagios/html/images/logos/globe.png /usr/share/nagios/html/images/logos/graph.gif /usr/share/nagios/html/images/logos/hp-printer40.gd2 /usr/share/nagios/html/images/logos/hp-printer40.gif /usr/share/nagios/html/images/logos/hp-printer40.jpg /usr/share/nagios/html/images/logos/hp-printer40.png /usr/share/nagios/html/images/logos/hpux.gd2 /usr/share/nagios/html/images/logos/hpux.gif /usr/share/nagios/html/images/logos/hpux.jpg /usr/share/nagios/html/images/logos/hpux.png /usr/share/nagios/html/images/logos/hub.gd2 /usr/share/nagios/html/images/logos/hub.gif /usr/share/nagios/html/images/logos/internet.gd2 /usr/share/nagios/html/images/logos/internet.gif /usr/share/nagios/html/images/logos/internet_device.png /usr/share/nagios/html/images/logos/ip-pbx.gd2 /usr/share/nagios/html/images/logos/ip-pbx.gif /usr/share/nagios/html/images/logos/irix.gd2 /usr/share/nagios/html/images/logos/irix.gif /usr/share/nagios/html/images/logos/irix.jpg /usr/share/nagios/html/images/logos/irix.png /usr/share/nagios/html/images/logos/linux40.gd2 /usr/share/nagios/html/images/logos/linux40.gif /usr/share/nagios/html/images/logos/linux40.jpg /usr/share/nagios/html/images/logos/linux40.png /usr/share/nagios/html/images/logos/logo.gd2 /usr/share/nagios/html/images/logos/mac40.gd2 /usr/share/nagios/html/images/logos/mac40.gif /usr/share/nagios/html/images/logos/mac40.jpg /usr/share/nagios/html/images/logos/mac40.png /usr/share/nagios/html/images/logos/mainframe.gd2 /usr/share/nagios/html/images/logos/mainframe.gif /usr/share/nagios/html/images/logos/mandrake.gd2 /usr/share/nagios/html/images/logos/mandrake.gif /usr/share/nagios/html/images/logos/mandrake.jpg /usr/share/nagios/html/images/logos/mandrake.png /usr/share/nagios/html/images/logos/monitor.png /usr/share/nagios/html/images/logos/nagios.gd2 /usr/share/nagios/html/images/logos/nagios.gif /usr/share/nagios/html/images/logos/nagiosvrml.png /usr/share/nagios/html/images/logos/next.gd2 /usr/share/nagios/html/images/logos/next.gif /usr/share/nagios/html/images/logos/next.jpg /usr/share/nagios/html/images/logos/next.png /usr/share/nagios/html/images/logos/ng-switch40.gd2 /usr/share/nagios/html/images/logos/ng-switch40.gif /usr/share/nagios/html/images/logos/ng-switch40.jpg /usr/share/nagios/html/images/logos/ng-switch40.png /usr/share/nagios/html/images/logos/notebook.gd2 /usr/share/nagios/html/images/logos/notebook.gif /usr/share/nagios/html/images/logos/novell40.gd2 /usr/share/nagios/html/images/logos/novell40.gif /usr/share/nagios/html/images/logos/novell40.jpg /usr/share/nagios/html/images/logos/novell40.png /usr/share/nagios/html/images/logos/openbsd.gd2 /usr/share/nagios/html/images/logos/openbsd.gif /usr/share/nagios/html/images/logos/openbsd.jpg /usr/share/nagios/html/images/logos/openbsd.png /usr/share/nagios/html/images/logos/printer.gd2 /usr/share/nagios/html/images/logos/printer.gif /usr/share/nagios/html/images/logos/printer.png /usr/share/nagios/html/images/logos/rack-server.gd2 /usr/share/nagios/html/images/logos/rack-server.gif /usr/share/nagios/html/images/logos/redhat.gd2 /usr/share/nagios/html/images/logos/redhat.gif /usr/share/nagios/html/images/logos/redhat.jpg /usr/share/nagios/html/images/logos/redhat.png /usr/share/nagios/html/images/logos/router.gd2 /usr/share/nagios/html/images/logos/router.gif /usr/share/nagios/html/images/logos/router.png /usr/share/nagios/html/images/logos/router40.gd2 /usr/share/nagios/html/images/logos/router40.gif /usr/share/nagios/html/images/logos/router40.jpg /usr/share/nagios/html/images/logos/router40.png /usr/share/nagios/html/images/logos/san.gd2 /usr/share/nagios/html/images/logos/san.gif /usr/share/nagios/html/images/logos/satellite.png /usr/share/nagios/html/images/logos/server.png /usr/share/nagios/html/images/logos/signal.png /usr/share/nagios/html/images/logos/slackware.gd2 /usr/share/nagios/html/images/logos/slackware.gif /usr/share/nagios/html/images/logos/slackware.jpg /usr/share/nagios/html/images/logos/slackware.png /usr/share/nagios/html/images/logos/stampede.gd2 /usr/share/nagios/html/images/logos/stampede.gif /usr/share/nagios/html/images/logos/stampede.jpg /usr/share/nagios/html/images/logos/stampede.png /usr/share/nagios/html/images/logos/station.gd2 /usr/share/nagios/html/images/logos/storm.gd2 /usr/share/nagios/html/images/logos/storm.gif /usr/share/nagios/html/images/logos/storm.jpg /usr/share/nagios/html/images/logos/storm.png /usr/share/nagios/html/images/logos/sun40.gd2 /usr/share/nagios/html/images/logos/sun40.gif /usr/share/nagios/html/images/logos/sun40.jpg /usr/share/nagios/html/images/logos/sun40.png /usr/share/nagios/html/images/logos/sunlogo.gd2 /usr/share/nagios/html/images/logos/sunlogo.gif /usr/share/nagios/html/images/logos/sunlogo.jpg /usr/share/nagios/html/images/logos/sunlogo.png /usr/share/nagios/html/images/logos/switch.gd2 /usr/share/nagios/html/images/logos/switch.gif /usr/share/nagios/html/images/logos/switch.png /usr/share/nagios/html/images/logos/switch40.gd2 /usr/share/nagios/html/images/logos/switch40.gif /usr/share/nagios/html/images/logos/switch40.jpg /usr/share/nagios/html/images/logos/switch40.png /usr/share/nagios/html/images/logos/thin-client.gd2 /usr/share/nagios/html/images/logos/thin-client.gif /usr/share/nagios/html/images/logos/turbolinux.gd2 /usr/share/nagios/html/images/logos/turbolinux.gif /usr/share/nagios/html/images/logos/turbolinux.jpg /usr/share/nagios/html/images/logos/turbolinux.png /usr/share/nagios/html/images/logos/ultrapenguin.gd2 /usr/share/nagios/html/images/logos/ultrapenguin.gif /usr/share/nagios/html/images/logos/ultrapenguin.jpg /usr/share/nagios/html/images/logos/ultrapenguin.png /usr/share/nagios/html/images/logos/unicos.gd2 /usr/share/nagios/html/images/logos/unicos.gif /usr/share/nagios/html/images/logos/unicos.jpg /usr/share/nagios/html/images/logos/unicos.png /usr/share/nagios/html/images/logos/unknown.gd2 /usr/share/nagios/html/images/logos/unknown.gif /usr/share/nagios/html/images/logos/webcamera.png /usr/share/nagios/html/images/logos/wifi.gd2 /usr/share/nagios/html/images/logos/wifi.gif /usr/share/nagios/html/images/logos/wifi_modem.png /usr/share/nagios/html/images/logos/win40.gd2 /usr/share/nagios/html/images/logos/win40.gif /usr/share/nagios/html/images/logos/win40.jpg /usr/share/nagios/html/images/logos/win40.png /usr/share/nagios/html/images/logos/workstation.gd2 /usr/share/nagios/html/images/logos/workstation.gif /usr/share/nagios/html/images/logos/workstation.png /usr/share/nagios/html/images/logos/workstation_locked.png /usr/share/nagios/html/images/logos/yellowdog.gd2 /usr/share/nagios/html/images/logos/yellowdog.gif /usr/share/nagios/html/images/logos/yellowdog.jpg /usr/share/nagios/html/images/logos/yellowdog.png /usr/share/nagios/html/images/logrotate.png /usr/share/nagios/html/images/ndisabled.gif /usr/share/nagios/html/images/noack.gif /usr/share/nagios/html/images/notes.gif /usr/share/nagios/html/images/notify.gif /usr/share/nagios/html/images/orangedot.gif /usr/share/nagios/html/images/passiveonly.gif /usr/share/nagios/html/images/recovery.png /usr/share/nagios/html/images/redudancy.png /usr/share/nagios/html/images/redundancy.png /usr/share/nagios/html/images/restart.gif /usr/share/nagios/html/images/right.gif /usr/share/nagios/html/images/sblogo.png /usr/share/nagios/html/images/serviceevent.gif /usr/share/nagios/html/images/sflogo.png /usr/share/nagios/html/images/splunk1.gif /usr/share/nagios/html/images/splunk2.gif /usr/share/nagios/html/images/start.gif /usr/share/nagios/html/images/status.gif /usr/share/nagios/html/images/status2.gif /usr/share/nagios/html/images/status3.gif /usr/share/nagios/html/images/status4.gif /usr/share/nagios/html/images/stop.gif /usr/share/nagios/html/images/tacdisabled.jpg /usr/share/nagios/html/images/tacdisabled.png /usr/share/nagios/html/images/tacenabled.jpg /usr/share/nagios/html/images/tacenabled.png /usr/share/nagios/html/images/thermcrit.png /usr/share/nagios/html/images/thermok.png /usr/share/nagios/html/images/thermwarn.png /usr/share/nagios/html/images/trends.gif /usr/share/nagios/html/images/trendshost.png /usr/share/nagios/html/images/trendssvc.png /usr/share/nagios/html/images/unknown.png /usr/share/nagios/html/images/up.gif /usr/share/nagios/html/images/warning.png /usr/share/nagios/html/images/weblogo1.png /usr/share/nagios/html/images/zoom1.gif /usr/share/nagios/html/images/zoom2.gif /usr/share/nagios/html/includes /usr/share/nagios/html/includes/jquery-1.7.1.min.js /usr/share/nagios/html/includes/rss /usr/share/nagios/html/includes/rss/extlib /usr/share/nagios/html/includes/rss/extlib/Snoopy.class.inc /usr/share/nagios/html/includes/rss/rss_cache.inc /usr/share/nagios/html/includes/rss/rss_fetch.inc /usr/share/nagios/html/includes/rss/rss_parse.inc /usr/share/nagios/html/includes/rss/rss_utils.inc /usr/share/nagios/html/includes/utils.inc.php /usr/share/nagios/html/index.php /usr/share/nagios/html/js /usr/share/nagios/html/js/jquery-1.7.1.min.js /usr/share/nagios/html/js/jsonquery.js /usr/share/nagios/html/jsonquery.html /usr/share/nagios/html/main.php /usr/share/nagios/html/media /usr/share/nagios/html/robots.txt /usr/share/nagios/html/rss-corebanner.php /usr/share/nagios/html/rss-corefeed.html /usr/share/nagios/html/rss-corefeed.php /usr/share/nagios/html/rss-newsfeed.html /usr/share/nagios/html/rss-newsfeed.php /usr/share/nagios/html/side.php /usr/share/nagios/html/ssi /usr/share/nagios/html/stylesheets /usr/share/nagios/html/stylesheets/avail.css /usr/share/nagios/html/stylesheets/checksanity.css /usr/share/nagios/html/stylesheets/cmd.css /usr/share/nagios/html/stylesheets/common.css /usr/share/nagios/html/stylesheets/config.css /usr/share/nagios/html/stylesheets/extinfo.css /usr/share/nagios/html/stylesheets/histogram.css /usr/share/nagios/html/stylesheets/history.css /usr/share/nagios/html/stylesheets/jsonquery.css /usr/share/nagios/html/stylesheets/ministatus.css /usr/share/nagios/html/stylesheets/notifications.css /usr/share/nagios/html/stylesheets/outages.css /usr/share/nagios/html/stylesheets/showlog.css /usr/share/nagios/html/stylesheets/status.css /usr/share/nagios/html/stylesheets/statusmap.css /usr/share/nagios/html/stylesheets/summary.css /usr/share/nagios/html/stylesheets/tac.css /usr/share/nagios/html/stylesheets/trends.css /var/cache/nagios /var/log/nagios /var/log/nagios/archives /var/log/nagios/rw /var/spool/nagios/checkresults /var/spool/nagios/cmd
Basis-Konfiguration
WEB-Server
Für die Konfiguration des Apache-Webserver liefert uns das RPM-Paket bereits eine vorgefertigte Musterdatei mit.
# less /etc/httpd/conf.d/nagios.conf
- /etc/httpd/conf.d/nagios.conf
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER # # This file contains examples of entries that need # to be incorporated into your Apache web server # configuration file. Customize the paths, etc. as # needed to fit your system. <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^/$ /nagios/index.php [R] </IfModule> ScriptAlias /nagios/cgi-bin "/usr/lib64/nagios/cgi-bin" <Directory "/usr/lib64/nagios/cgi-bin"> # SSLRequireSSL Options +ExecCGI AllowOverride All AuthName "Nagios Access" AuthType Basic AuthUserFile /etc/nagios/passwd <IfModule mod_authz_core.c> # Apache 2.4 <RequireAll> Require all granted # Require local Require valid-user </RequireAll> </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order allow,deny Allow from all # Order deny,allow # Deny from all # Allow from 127.0.0.1 Require valid-user </IfModule> </Directory> Alias /nagios "/usr/share/nagios/html" <Directory "/usr/share/nagios/html"> # SSLRequireSSL Options None AllowOverride None AuthName "Nagios Access" AuthType Basic AuthUserFile /etc/nagios/passwd <IfModule mod_authz_core.c> # Apache 2.4 <RequireAll> Require all granted # Require local Require valid-user </RequireAll> </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order allow,deny Allow from all # Order deny,allow # Deny from all # Allow from 127.0.0.1 Require valid-user </IfModule> </Directory>
Bevor wir die Konfiguration unseres Apache Webservers „scharf“ schalten, testen wir die Konfigurationsdatei noch auf syntaktische Fehler.
# apachectl -t
Syntax OK
Ist alles O.K., aktivieren wir die Konfiguration mit einem Reload unseres Apache-Webservers.
# systemctl condrestart httpd
Nutzerkonten
Damit sich unser(e) Nagios-User am WEB-Frontend anmelden können, brauchen wir zur Authorisierung noch entsprechende Nutzerkonten, bestehend aus User und Passwort. Diese legen wir mit Hilfe des Befehls htpasswd an. Für den ersten Account admin benutzen wir htpasswd mit der Option -c (create).
# htpasswd -c /etc/nagios/passwd nagiosadmin
New password: Re-type new password: Adding password for user nagiosadmin
Bei jedem weiteren Nutzer brauchen wir dann keine Option -c, da die Datei ja bereits existiert und wir sonst die ggf. bestehenden Nutzeraccounts überschreiben würden!
# htpasswd /etc/nagios/passwd django
New password: Re-type new password: Adding password for user django
Nagios Web-Frontend
Nun können wir uns am Webfrontend anmelden. Wir rufen also mit dem Browser unserer Wahl den zuvor aktivierten Webserver auf.
$ firefox http://nagios.nausch.org
Hier geben wir nun unsere Anmeldedaten ein, die wir zuvor angelegt hatten.
Sofern wir unsere zu überwachenden Systeme, Server, Switche und Dienste konfiguriert haben, werden diese bei einem Klick auf die zugehörigen Menüpunkt am linken Bildschirmrand angezeigt.
Konfigurationsbeispiele
Je nach Art und Umfang der zu überwachenden Systeme und Dienste nimmt der Umfang der nötigen Konfigurationsaufgaben zu. Einen kleinen Einblick gewährt z.B. nachfolgender Verzeichnisbaum in das Monitoring einer kleinen IT-Organisation.
/etc/nagios/ ├── cgi.cfg ├── conf.d ├── nrpe.cfg ├── objects │ ├── commands │ │ ├── check_nrpe.cfg │ │ └── command_check_nrpe.cfg.test │ ├── commands.cfg │ ├── contacts.cfg │ ├── localhost.cfg │ ├── nausch.org │ │ ├── commands │ │ │ ├── check_sks-keyserver.cfg │ │ │ ├── command_check_switch.cfg │ │ │ └── command_check_webcam.cfg │ │ ├── contact │ │ │ ├── object_contact_django.cfg │ │ │ ├── object_contact_patrick.cf │ │ │ ├── object_contact_peer.cf │ │ │ ├── object_contact_klaus.cf │ │ │ ├── object_contactgroup_admins.cfg │ │ │ └── object_contact_nagiosadmin.cfg │ │ ├── hostgroups │ │ │ ├── dmz │ │ │ │ └── hostgroups_dmz.nausch.org.cfg │ │ │ └── intra │ │ │ ├── hostgroup_cameras.cfg │ │ │ ├── hostgroup_intra.nausch.org.cfg │ │ │ ├── hostgroup_router.cfg │ │ │ ├── hostgroup_switche.cfg │ │ │ └── hostgroup_voip.cfg │ │ ├── hosts │ │ │ ├── dmz │ │ │ │ ├── vml000010.cfg │ │ │ │ ├── vml000017.cfg │ │ │ │ ├── vml000020.cfg │ │ │ │ ├── vml000027.cfg │ │ │ │ ├── vml000030.cfg │ │ │ │ ├── vml000037.cfg │ │ │ │ ├── vml000040.cfg │ │ │ │ ├── vml000047.cfg │ │ │ │ ├── vml000050.cfg │ │ │ │ ├── vml000057.cfg │ │ │ │ ├── vml000067.cfg │ │ │ │ ├── vml000077.cfg │ │ │ │ ├── vml000087.cfg │ │ │ │ ├── vml000097.cfg │ │ │ │ ├── vml000117.cfg │ │ │ │ └── vml000127.cfg │ │ │ └── intra │ │ │ ├── cam010017.cfg │ │ │ ├── cam010018.cfg │ │ │ ├── cam010019.cfg │ │ │ ├── pml010002.cfg │ │ │ ├── pml010010.cfg │ │ │ ├── pml010011.cfg │ │ │ ├── pml010013.cfg │ │ │ ├── pnc010004.cfg │ │ │ ├── pnc010005.cfg │ │ │ ├── pnc010007.cfg │ │ │ ├── pnc010008.cfg │ │ │ ├── pnc010009.cfg │ │ │ ├── pnc010015.cfg │ │ │ ├── pnc010021.cfg │ │ │ ├── pnc010030.cfg │ │ │ ├── pnc010033.cfg │ │ │ ├── pnc010042.cfg │ │ │ ├── pnc010047.cfg │ │ │ ├── pnc010048.cfg │ │ │ ├── pnc010049.cfg │ │ │ └── pnc010057.cfg │ │ ├── servicegroups │ │ │ ├── servicegroup_cups.cfg │ │ │ ├── servicegroup_dhcp.cfg │ │ │ ├── servicegroup_fhem.cfg │ │ │ ├── servicegroup_firewalls.cfg │ │ │ ├── servicegroup_ldap.cfg │ │ │ ├── servicegroup_mail.cfg │ │ │ ├── servicegroup_mysql.cfg │ │ │ ├── servicegroup_proxy.cfg │ │ │ ├── servicegroup_sks.cfg │ │ │ ├── servicegroup_wetterstation.cfg │ │ │ └── servicegroup_www.cfg │ │ └── services │ │ ├── check_access_vantage_2.cfg │ │ ├── check_cert_autodiscover.dokuwiki.guru.cfg │ │ ├── check_cert_autodiscover.ebersberger-liedersammlung.de.cfg │ │ ├── check_cert_autodiscover.it-ignorant.de.cfg │ │ ├── check_cert_autodiscover.it-ignorant.org.cfg │ │ ├── check_cert_autodiscover.mail-server.guru.cfg │ │ ├── check_cert_autodiscover.mailserver.guru.cfg │ │ ├── check_cert_autodiscover.nausch.guru.cfg │ │ ├── check_cert_autodiscover.nausch.org.cfg │ │ ├── check_cert_autodiscover.omni128.de.cfg │ │ ├── check_cert_autodiscover.pgp.guru.cfg │ │ ├── check_cert_autodiscover.piraten-it.guru.cfg │ │ ├── check_cert_autodiscover.postfix.guru.cfg │ │ ├── check_cert_autodiscover.sec-mai.guru.cfg │ │ ├── check_cert_autodiscover.wetterstation-pliening.info.cfg │ │ ├── check_cert_awstats.nausch.org.cfg │ │ ├── check_cert_betterawstats.nausch.org.cfg │ │ ├── check_cert_buero.nausch.org.cfg │ │ ├── check_cert_buero.sec-mail.guru.cfg │ │ ├── check_cert_cacti.nausch.org.cfg │ │ ├── check_cert_dglog.nausch.org.cfg │ │ ├── check_cert_dms.nausch.org.cfg │ │ ├── check_cert_dokuwiki.nausch.org.cfg │ │ ├── check_cert_ebersberger-liedersammlung.de.cfg │ │ ├── check_cert_fhem.nausch.org.cfg │ │ ├── check_cert_greygraph.nausch.org.cfg │ │ ├── check_cert_homepage.nausch.org.cfg │ │ ├── check_cert_iconfig.nausch.org.cfg │ │ ├── check_cert_lists.nausch.org.cfg │ │ ├── check_cert_mailgraph.nausch.org.cfg │ │ ├── check_cert_mailstats.nausch.org.cfg │ │ ├── check_cert_mxgraphs.nausch.org.cfg │ │ ├── check_cert_nagios.nausch.org.cfg │ │ ├── check_cert_nas.nausch.org.cfg │ │ ├── check_cert_nausch.org.cfg │ │ ├── check_cert_omni128.de.cfg │ │ ├── check_cert_photo.nausch.org.cfg │ │ ├── check_cert_phpldapadmin.nausch.org.cfg │ │ ├── check_cert_phpmyadmin.nausch.org.cfg │ │ ├── check_cert_piwik.nausch.org.cfg │ │ ├── check_cert_postfixadmin.nausch.org.cfg │ │ ├── check_cert_postfix.guru.cfg │ │ ├── check_cert_postmaster.guru.cfg │ │ ├── check_cert_power.nausch.org.cfg │ │ ├── check_cert_queuegraph.nausch.org.cfg │ │ ├── check_cert_r-dmarc.nausch.org.cfg │ │ ├── check_cert_roundcubemail.mailserver.guru.cfg │ │ ├── check_cert_roundcubemail.sec-mail.guru.cfg │ │ ├── check_cert_sarg.nausch.org.cfg │ │ ├── check_cert_squid-graph.nausch.org.cfg │ │ ├── check_cert_switch.nausch.org.cfg │ │ ├── check_cert_test.dokuwiki.nausch.org.cfg │ │ ├── check_cert_test.ebersberger-liedersammlung.de.cfg │ │ ├── check_cert_webdav.nausch.org.cfg │ │ ├── check_cert_wiki.mailserver.guru.cfg │ │ ├── check_cert_wlan.nausch.org.cfg │ │ ├── check_cert_www.buero.nausch.org.cfg │ │ ├── check_cert_www.dms.nausch.org.cfg │ │ ├── check_cert_www.dokuwiki.nausch.org.cfg │ │ ├── check_cert_www.ebersberger-liedersammlung.de.cfg │ │ ├── check_cert_www.homepage.nausch.org.cfg │ │ ├── check_cert_www.iconfig.nausch.org.cfg │ │ ├── check_cert_www.nausch.org.cfg │ │ ├── check_cert_www.omni128.de.cfg │ │ ├── check_cert_www.xn--bro-hoa.nausch.org.cfg │ │ ├── check_cert_xn--bro-hoa.nausch.org.cfg │ │ ├── check_cert_xn--bro-hoa.sec-mai.guru.cfg │ │ ├── check_clamav.cfg │ │ ├── check_dhcp_leases.cfg │ │ ├── check_dns_forward.cfg │ │ ├── check_dns_reverse.cfg │ │ ├── check_dokuwiki.cfg │ │ ├── check_fileage_dh_1024.cfg │ │ ├── check_fileage_dh_2048.cfg │ │ ├── check_fileage_dh_512.cfg │ │ ├── check_fs_boot.cfg │ │ ├── check_fs_data.cfg │ │ ├── check_fs_dataoldone.cfg │ │ ├── check_fs_home.cfg │ │ ├── check_fs_opt.cfg │ │ ├── check_fs_ramdisk_srvsks.cfg │ │ ├── check_fs_ramdisk_sudo.cfg │ │ ├── check_fs_root.cfg │ │ ├── check_fs_srvvmail.cfg │ │ ├── check_fs_varlibldap.cfg │ │ ├── check_fs_varliblibvirt.cfg │ │ ├── check_fs_varlibmysql.cfg │ │ ├── check_fs_varlog.cfg │ │ ├── check_fs_varlogdansguardian.cfg │ │ ├── check_fs_varlogsquid.cfg │ │ ├── check_fs_varspoolpostfix.cfg │ │ ├── check_fs_varspoolsquid.cfg │ │ ├── check_fs_varsyslog.cfg │ │ ├── check_fs_varwwwwebcam.cfg │ │ ├── check_http_buero.cfg │ │ ├── check_http_b\303\274ro.cfg │ │ ├── check_http_cacti.cfg │ │ ├── check_http_cam-ost.cfg │ │ ├── check_http_cam-tfe.cfg │ │ ├── check_http_cam-west.cfg │ │ ├── check_http_dglog.cfg │ │ ├── check_http_greygraph.cfg │ │ ├── check_http_lists.cfg │ │ ├── check_http_mailgraph.cfg │ │ ├── check_http_mailstats.cfg │ │ ├── check_http_mxgraphs.cfg │ │ ├── check_http_postfixadmin.cfg │ │ ├── check_http_power.cfg │ │ ├── check_http_queuegraph.cfg │ │ ├── check_http_repository.cfg │ │ ├── check_http_sarg.cfg │ │ ├── check_http_squid-graph.cfg │ │ ├── check_http_webcam.cfg │ │ ├── check_http_wetter.cfg │ │ ├── check_http_wviewadmin.cfg │ │ ├── check_if_traffic_eth0.cfg │ │ ├── check_if_traffic_eth1.cfg │ │ ├── check_if_traffic_ppp0.cfg │ │ ├── check_imap_cert.cfg │ │ ├── check_imap_connections.cfg │ │ ├── check_imap_login.cfg │ │ ├── check_imap_login_processes.cfg │ │ ├── check_imap_master_process.cfg │ │ ├── check_imaps_login.cfg │ │ ├── check_ldap_cert.cfg │ │ ├── check_ldap_connect.cfg │ │ ├── check_ldap_local.cfg │ │ ├── check_load.cfg │ │ ├── check_mail_loop.cfg │ │ ├── check_mysql_connection-time.cfg │ │ ├── check_mysql_index-usage.cfg │ │ ├── check_mysql_innodb-bufferpool-hitrate.cfg │ │ ├── check_mysql_innodb-bufferpool-wait-free.cfg │ │ ├── check_mysql_innodb-log-waits.cfg │ │ ├── check_mysql_local.cfg │ │ ├── check_mysql_long-running-procs.cfg │ │ ├── check_mysql_myisam-keycache-hitrate.cfg │ │ ├── check_mysql_open-files.cfg │ │ ├── check_mysql_query_aborted_connects.cfg │ │ ├── check_mysql_querycache-hitrate.cfg │ │ ├── check_mysql_querycache-lowmem-prunes.cfg │ │ ├── check_mysql_query_max_used_connections.cfg │ │ ├── check_mysql_remote.cfg │ │ ├── check_mysql_slow-queries.cfg │ │ ├── check_mysql_tablecache-hitrate.cfg │ │ ├── check_mysql_table-lock-contention.cfg │ │ ├── check_mysql_threadcache-hitrate.cfg │ │ ├── check_mysql_threads-connected.cfg │ │ ├── check_mysql_tmp-disk-tables.cfg │ │ ├── check_mysql_uptime.cfg │ │ ├── check_ntpd.cfg │ │ ├── check_pop3_connections.cfg │ │ ├── check_pop3_login.cfg │ │ ├── check_pop3_login_processes.cfg │ │ ├── check_pop3s_login.cfg │ │ ├── check_postfix_queue.cfg │ │ ├── check_running_amavisd.cfg │ │ ├── check_running_arpwatch.cfg │ │ ├── check_running_cam2pic.cfg │ │ ├── check_running_cam_update.cfg │ │ ├── check_running_clamd_mail.cfg │ │ ├── check_running_clamd_web.cfg │ │ ├── check_running_crond.cfg │ │ ├── check_running_dansguardian.cfg │ │ ├── check_running_dhcp2.cfg │ │ ├── check_running_dhcpd.cfg │ │ ├── check_running_freshclam_web.cfg │ │ ├── check_running_haveged.cfg │ │ ├── check_running_httpd.cfg │ │ ├── check_running_iptables.cfg │ │ ├── check_running_ldap.cfg │ │ ├── check_running_mailman.cfg │ │ ├── check_running_mysql.cfg │ │ ├── check_running_named.cfg │ │ ├── check_running_newsletter.cfg │ │ ├── check_running_opendkim.cfg │ │ ├── check_running_opendmarc.cfg │ │ ├── check_running_postfix.cfg │ │ ├── check_running_postfix_weather.cfg │ │ ├── check_running_pppoe.cfg │ │ ├── check_running_sks-db.cfg │ │ ├── check_running_sks-recon.cfg │ │ ├── check_running_smf-spf.cfg │ │ ├── check_running_squid.cfg │ │ ├── check_running_srsd.cfg │ │ ├── check_running_stormforce_client.cfg │ │ ├── check_running_stormforce_server.cfg │ │ ├── check_running_website.cfg │ │ ├── check_running_wview.cfg │ │ ├── check_sda_smart.cfg │ │ ├── check_sdb_smart.cfg │ │ ├── check_sdc_smart.cfg │ │ ├── check_sdd_smart.cfg │ │ ├── check_sending_bodyspam_mail.cfg │ │ ├── check_sending_headerspam_mail.cfg │ │ ├── check_sending_lmtp.cfg │ │ ├── check_sending_mail_10024.cfg │ │ ├── check_sending_mail_10025.cfg │ │ ├── check_sending_newsletter.cfg │ │ ├── check_sending_submission.cfg │ │ ├── check_sending_virusmail.cfg │ │ ├── check_sks-keyserver.cfg │ │ ├── check_smtp_auth.cfg │ │ ├── check_smtp_cert.cfg │ │ ├── check_squid_access.cfg │ │ ├── check_squid_file_desc.cfg │ │ ├── check_ssh_c7.cfg │ │ ├── check_ssh.cfg │ │ ├── check_stormforce_2_age.cfg │ │ ├── check_stormforce_small_age.cfg │ │ ├── check_swap.cfg │ │ ├── check_tcp_amavisd_10024.cfg │ │ ├── check_tcp_amavisd_9998.cfg │ │ ├── check_tcp_amavisd_milter.cfg │ │ ├── check_tcp_amavis_mail.cfg │ │ ├── check_tcp_auth.cfg │ │ ├── check_tcp_dansguardian.cfg │ │ ├── check_tcp_dkim_milter.cfg │ │ ├── check_tcp_dmarc_milter.cfg │ │ ├── check_tcp_imap.cfg │ │ ├── check_tcp_imaps.cfg │ │ ├── check_tcp_lmtp.cfg │ │ ├── check_tcp_nrpe.cfg │ │ ├── check_tcp_pop3.cfg │ │ ├── check_tcp_pop3s.cfg │ │ ├── check_tcp_postgres_serverport.cfg │ │ ├── check_tcp_quota.cfg │ │ ├── check_tcp_sasl_auth.cfg │ │ ├── check_tcp_smtp_mail.cfg │ │ ├── check_tcp_smtp_submission.cfg │ │ ├── check_tcp_spamd_783.cfg │ │ ├── check_tcp_spf_milter.cfg │ │ ├── check_tcp_squid.cfg │ │ ├── check_tcp_srs_recipient.cfg │ │ ├── check_tcp_srs_sender.cfg │ │ ├── check_tcp_stormforce_serverport.cfg │ │ ├── check_tcp_www_mail.cfg │ │ ├── check_time.cfg │ │ ├── check_total_procs.cfg │ │ ├── check_update_clamav.cfg │ │ ├── check_updates.cfg │ │ ├── check_users.cfg │ │ └── check_zombie_procs.cfg │ ├── printer.cfg │ ├── switch.cfg │ ├── templates │ │ ├── template_generic-contact.cfg │ │ ├── template_generic-host.cfg │ │ ├── template_generic-printer.cfg │ │ ├── template_generic-service.cfg │ │ ├── template_generic-switch.cfg │ │ ├── template_hostgroup_firewalls.cfg │ │ ├── template_hostgroup_linuxhosts.cfg │ │ ├── template_hostgroup_virtual-linuxhosts.cfg │ │ ├── template_ip-camera.cfg │ │ ├── template_linux-realserver.cfg │ │ ├── template_linux-virtualserver.cfg │ │ ├── template_mobile-telefone.cfg │ │ ├── template_network-equipment.cfg │ │ ├── template_physical-telefone.cfg │ │ └── template_windows-server.cfg │ ├── templates.cfg │ ├── timeperiods.cfg │ └── windows.cfg ├── passwd └── private └── resource.cfg
Je nach Anforderungen kann zur Konfiguration und Verwaltung der einzelnen Objekte eine SQL-Datenbank oder auch einzelne Dateien verwendet werden. Für die IT-Landschaft bei nausch.org kommen entsprechende Konfigurationsdateien zum Einsatz. So können ohne großen Aufwand einzelne Objekte schnell und einfach eingestellt und angepasst werden. Auf diese einfache Konfigurationsschritte gehen wir nun anschließend bei einem System/Server kurz ein.