Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
centos:web_c7:icinga:start [13.03.2015 15:05. ] – [Konfiguration] django | centos:web_c7:icinga:start [30.05.2020 17:30. ] (aktuell) – django | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | <WRAP center round important 60%> | ||
- | Artikel ist g' | ||
- | </ | ||
- | |||
====== IT Infrastruktur und System Monitoring mit Icinga 2 unter CentOS 7.x ====== | ====== IT Infrastruktur und System Monitoring mit Icinga 2 unter CentOS 7.x ====== | ||
- | {{:centos: | + | {{page>centos: |
- | Mit [[https:// | + | |
- | + | ||
- | Tiefergehende Informationen zu Icinga selbst findet man auf der [[https:// | + | |
- | |Installations- und Konfigurationsbeschreibung]], | + | |
- | + | ||
- | + | ||
- | + | ||
- | ===== Installation ===== | + | |
- | Die Installation von **ICINGA** selbst gestaltet sich relativ einfach, da die Entwickler unter anderem für **CentOS 7** ein eigenes Repository vorgehalten wird. | + | |
- | + | ||
- | ==== ICINGA-Repository ==== | + | |
- | Als Vorbereitung vor der Installation von icinga2 müssen wir erst einmal das benötigte Repository einbinden. Hierzu holen wir uns die Konfigurationsdatei erst einmal auf unseren Server. | + | |
- | # wget http:// | + | |
- | + | ||
- | Anschließend tragen wir noch die **Priorität** in der Konfigurationsdatei nach; in unserer Installationsumgebung wählen wir dazu einen nachrangigen wert, z.B. **15** | + | |
- | # vim / | + | |
- | + | ||
- | <file bash / | + | |
- | name=ICINGA (stable release for epel) | + | |
- | baseurl=http:// | + | |
- | enabled=1 | + | |
- | # Django : 2015-03-07 Priorität 15 nachgetragen | + | |
- | # default: unset | + | |
- | priority=15 | + | |
- | gpgcheck=1 | + | |
- | gpgkey=http:// | + | |
- | </ | + | |
- | + | ||
- | Anschließend weisen wir **yum** an, alle Metadaten des neuen Repositorys zu laden. | + | |
- | # yum makecache | + | |
- | + | ||
- | Zu guter Letzt holen wir uns noch den PGP-Schlüssel des ICINGA-Repositorys, | + | |
- | # rpm --import http:// | + | |
- | + | ||
- | ==== ICINGA2 ==== | + | |
- | Nachdem die Vorbereitungen abgeschlossen sind, können wir nun mit der Installation von **ICINGA2** starten, indem wir den Befehl **yum** bemühen. | + | |
- | # yum install icinga2 -y | + | |
- | + | ||
- | Neben dem Paket **icinga2**, | + | |
- | + | ||
- | ===== Paketinhalte ===== | + | |
- | ==== icinga2 ==== | + | |
- | Welche Verzeichnisse und Dateien das Paket installierte, | + | |
- | # rpm -qil icinga2 | + | |
- | + | ||
- | < | + | |
- | Version | + | |
- | Release | + | |
- | Architecture: | + | |
- | Install Date: Fri 13 Mar 2015 08:44:31 AM CET | + | |
- | Group : Applications/ | + | |
- | Size : 17986 | + | |
- | License | + | |
- | Signature | + | |
- | Source RPM : icinga2-2.3.2-1.el7.centos.src.rpm | + | |
- | Build Date : Thu 12 Mar 2015 04:17:05 PM CET | + | |
- | Build Host : jenkins-build-5c74b3d4-776 | + | |
- | Relocations : (not relocatable) | + | |
- | URL : https:// | + | |
- | Summary | + | |
- | Description : | + | |
- | Meta package for Icinga 2 Core, DB IDO and Web. | + | |
- | / | + | |
- | </ | + | |
- | + | ||
- | ==== icinga2-common ==== | + | |
- | Wie schon zuvor prüfen wir, welchen Inhalt das RPM mitbrachte. | + | |
- | # rpm -qil icinga2-common | + | |
- | < | + | |
- | Version | + | |
- | Release | + | |
- | Architecture: | + | |
- | Install Date: Fri 13 Mar 2015 08:44:29 AM CET | + | |
- | Group : Applications/ | + | |
- | Size : 188359 | + | |
- | License | + | |
- | Signature | + | |
- | Source RPM : icinga2-2.3.2-1.el7.centos.src.rpm | + | |
- | Build Date : Thu 12 Mar 2015 04:17:05 PM CET | + | |
- | Build Host : jenkins-build-5c74b3d4-776 | + | |
- | Relocations : (not relocatable) | + | |
- | URL : https:// | + | |
- | Summary | + | |
- | Description : | + | |
- | Provides common directories, | + | |
- | packages. | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | </ | + | |
- | + | ||
- | ==== icinga2-bin ==== | + | |
- | Zum Schluß werfen wir dann noch einen Blick in das Paket **icinga2-bin**. | + | |
- | # rpm -qil icinga2-bin | + | |
- | + | ||
- | < | + | |
- | Version | + | |
- | Release | + | |
- | Architecture: | + | |
- | Install Date: Fri 13 Mar 2015 08:44:30 AM CET | + | |
- | Group : Applications/ | + | |
- | Size : 11691943 | + | |
- | License | + | |
- | Signature | + | |
- | Source RPM : icinga2-2.3.2-1.el7.centos.src.rpm | + | |
- | Build Date : Thu 12 Mar 2015 04:17:05 PM CET | + | |
- | Build Host : jenkins-build-5c74b3d4-776 | + | |
- | Relocations : (not relocatable) | + | |
- | URL : https:// | + | |
- | Summary | + | |
- | Description : | + | |
- | Icinga 2 is a general-purpose network monitoring application. | + | |
- | Provides binaries and libraries for Icinga 2 Core. | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | </ | + | |
- | + | ||
- | ===== Systemstart ===== | + | |
- | ==== erster manueller Start ==== | + | |
- | Nun können wir den Icinga2-Daemon das erste mal starten. | + | |
- | # systemctl start icinga2.service | + | |
- | + | ||
- | Im Syslog wird der Start entsprechend dokumentiert. | + | |
- | # less / | + | |
- | <file / | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] warning/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 icinga2: [2015-03-12 10:09:42 +0100] information/ | + | |
- | Mar 12 10:09:42 vml000117 systemd: Started Icinga host/ | + | |
- | </ | + | |
- | + | ||
- | ==== automatischer Start beim Systemstart ==== | + | |
- | Wollen wir den Daemon beim Hochfahren des Systems automatisch starten, greifen wir auf den Befehl **systemctl** zurück. | + | |
- | # systemctl enable icinga2.service | + | |
- | + | ||
- | # ln -s '/ | + | |
- | + | ||
- | | + | |
- | # systemctl is-enabled icinga2.service | + | |
- | + | ||
- | | + | |
- | + | ||
- | Startet der Server nicht automatisch, | + | |
- | + | ||
- | ===== Systemtest ===== | + | |
- | Wollen wir den Status eines gerade laufenden Icinga2-Daemon abfragen, verwenden wir folgenden Aufruf. | + | |
- | # systemctl status icinga2.service | + | |
- | + | ||
- | < | + | |
- | | + | |
- | | + | |
- | Process: 23808 ExecReload=/ | + | |
- | Process: 31217 ExecStart=/ | + | |
- | Process: 31171 ExecStartPre=/ | + | |
- | Main PID: 23826 (icinga2) | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | + | ||
- | Mar 13 14:56:26 vml000117.dmz.nausch.org safe-reload[23331]: | + | |
- | Mar 13 14:56:26 vml000117.dmz.nausch.org systemd[1]: Reloaded Icinga host/ | + | |
- | Mar 13 14:57:21 vml000117.dmz.nausch.org systemd[1]: Reloading Icinga host/ | + | |
- | Mar 13 14:57:22 vml000117.dmz.nausch.org safe-reload[23462]: | + | |
- | Mar 13 14:57:22 vml000117.dmz.nausch.org safe-reload[23462]: | + | |
- | Mar 13 14:57:22 vml000117.dmz.nausch.org systemd[1]: Reloaded Icinga host/ | + | |
- | </ | + | |
- | + | ||
- | ===== Konfiguration ===== | + | |
- | ==== Programm- und Verzeichnisse ==== | + | |
- | Bevor wir uns nun mit der Konfiguration von Icinga beschäftigen werfen wir noch kurz einen Blick in unser Dateisystem auf unserem Monitoring-Host. | + | |
- | + | ||
- | < | + | |
- | Pfad/Datei | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | | + | |
- | (aus dem Paket icinga2-doc) | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | </ | + | |
- | Im Verzeichnis // | + | {{page>centos: |
- | < | + | |
- | ├── conf.d | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | ├── constants.conf | + | |
- | ├── features-available | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | ├── features-enabled | + | |
- | │ | + | |
- | │ | + | |
- | │ | + | |
- | ├── icinga2.conf | + | |
- | ├── init.conf | + | |
- | ├── repository.d | + | |
- | │ | + | |
- | ├── scripts | + | |
- | │ | + | |
- | │ | + | |
- | ├── zones.conf | + | |
- | └── zones.d | + | |
- | └── README | + | |
- | </code> | + | |
+ | ====== Links ====== | ||
+ | * **⇒ [[centos: | ||
+ | * **[[centos: | ||
+ | * **[[centos: | ||
+ | * **[[wiki: | ||
+ | * **[[http:// | ||