Benutzer-Werkzeuge

Webseiten-Werkzeuge


tachtler:icinga2_-_client

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
tachtler:icinga2_-_client [2015/12/04 05:23] klaustachtler:icinga2_-_client [2016/01/14 18:15] (aktuell) – [icinga2: Erster Start] klaus
Zeile 236: Zeile 236:
 </code> </code>
  
-===== Installation: nagios-plugins-(all) =====+===== iptables Regel =====
  
-Nachdem das **Drittanbieter-Repository** +Damit der [[https://www.icinga.org/|Icinga]] auch erreichbar ist und nicht das Empfangen  der IP-Paket vom Paketfilter ''iptables'' blockiert wird, muss nachfolgende Regel zum ''iptables''-Regelwerk hinzugefügt werden. 
-  * [[tachtler:icinga2#repositoryepel|Icinga2 - Repository: EPEL]] + 
-erfolgreich eingebunden wurde, kann mit nachfolgendem Befehl, das ''rpm''-Pakete - **''nagios-plugins-all''** installiert werden:+Um die aktuellen ''iptables''-Regeln erweitern zu können, sollten diese erst einmal aufgelistet werden, was mit nachfolgendem Befehl durchgeführt werden kann:
 <code> <code>
-yum install nagios-plugins-all+iptables --nv --line-numbers 
 +Chain INPUT (policy ACCEPT 0 packets, 0 bytes) 
 +num   pkts bytes target     prot opt in     out     source               destination          
 +1        0     0 ACCEPT     all  --  *      *       0.0.0.0/           0.0.0.0/          state RELATED,ESTABLISHED  
 +2        0     0 ACCEPT     icmp --  *      *       0.0.0.0/           0.0.0.0/           
 +3        0     0 ACCEPT     all  --  lo           0.0.0.0/           0.0.0.0/           
 +4        0     0 ACCEPT     tcp  --  *      *       0.0.0.0/           0.0.0.0/          state NEW tcp dpt:22   
 +5        0     0 REJECT     all  --  *      *       0.0.0.0/           0.0.0.0/          reject-with icmp-host-prohibited  
 + 
 +Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) 
 +num   pkts bytes target     prot opt in     out     source               destination          
 +1        0     0 REJECT     all  --  *      *       0.0.0.0/           0.0.0.0/          reject-with icmp-host-prohibited  
 + 
 +Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes) 
 +num   pkts bytes target     prot opt in     out     source               destination
 </code> </code>
-oder **__nur__ die Plugins** die auf dem **entsprechenden __zu überprüfenden Host__ benötigt** werden.  
  
-Nachfolgend eine Beispiel für das Plugin **''nagios-plugins-icmp''**+Nachfolgender Befehl, fügt folgende ''iptables''-Regel dem ''iptables''-Regelwerk nach der **Position 4** hinzu, ohne das der Paketfilter angehalten werden muss: 
 +  * <code>-A INPUT -p tcp --dport 5665 -j ACCEPT</code> 
 +und hier der Befehl:
 <code> <code>
-yum install nagios-plugins-icmp+iptables -I INPUT 5 -p tcp --dport 5665 -j ACCEPT
 </code> </code>
  
-===== KonfigurationPHP =====+Ein erneute Abfrage des ''iptables''-Regelwerts, sollte dann nachfolgend dargestellte Ausgabe ergeben, was mit folgendem Befehl durchgeführt werden kann: 
 +<code> 
 +# iptables -L -nv --line-numbers 
 +Chain INPUT (policy ACCEPT 0 packets, 0 bytes) 
 +num   pkts bytes target     prot opt in     out     source               destination          
 +1        0     0 ACCEPT     all  --  *      *       0.0.0.0/           0.0.0.0/          state RELATED,ESTABLISHED  
 +2        0     0 ACCEPT     icmp --  *      *       0.0.0.0/           0.0.0.0/           
 +3        0     0 ACCEPT     all  --  lo           0.0.0.0/           0.0.0.0/           
 +4        0     0 ACCEPT     tcp  --  *      *       0.0.0.0/           0.0.0.0/          state NEW tcp dpt:22 
 +5        0     0 ACCEPT     tcp  --  eth0         0.0.0.0/           0.0.0.0/          tcp dpt:5665 state NEW 
 +6        0     0 REJECT     all  --  *      *       0.0.0.0/           0.0.0.0/          reject-with icmp-host-prohibited 
  
-==== /etc/php.ini ====+Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) 
 +num   pkts bytes target     prot opt in     out     source               destination          
 +1        0     0 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/          reject-with icmp-host-prohibited 
  
-Nachfolgende Konfiguration in der Konfigurationsdatei ''/etc/php.ini'' ist erforderlich, damit [[https://www.icinga.org/|Icinga]] eine **Default Timezone** (Standard Zeitzone) verwendet werden kann.+Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes) 
 +num   pkts bytes target     prot opt in     out     source               destination 
 +</code>
  
-Siehe auch nachfolgenden externen Link+Die neuen Zeile ist an **Position 5 (INPUT)** zu sehen, hier nachfolgend zur Verdeutlichung noch einmal dargestellt (**nur relevanter Ausschnitt**)
-  * [[http://php.net/manual/de/timezones.php]]+<code> 
 +... 
 +5        0     0 ACCEPT     tcp  --  eth0         0.0.0.0/0            0.0.0.0/0       tcp dpt:5665 state NEW 
 +... 
 +</code>
  
-Nachfolgenden Anpassungen an der Konfigurationsdatei +Um diese ''iptables''-Regel dauerhaft, auch nach einem Neustart des Server, weiterhin im ''iptables''-Regelwerk zu speichern, muss nachfolgend dargestellter Befehl abschließend noch ausgeführt werden: 
-  * ''/etc/php.ini'' +<code> 
-sind daher erforderlich:+# /usr/sbin/iptables-save > /etc/sysconfig/iptables  
 +</code>
  
-(**Nur relevanter Ausschnitt**):+===== Installation: nagios-plugins-(all=====
  
-<code php+Nachdem das **Drittanbieter-Repository** 
-... +  * [[tachtler:icinga2#repositoryepel|Icinga2 - Repository: EPEL]] 
-[Date] +erfolgreich eingebunden wurde, kann mit nachfolgendem Befehl, das ''rpm''-Pakete - **''nagios-plugins-all''** installiert werden: 
-; Defines the default timezone used by the date functions +<code> 
-; http://php.net/date.timezone +# yum install nagios-plugins-all 
-; Tachtler +</code> 
-; default: ;date.timezone = +oder **__nur__ die Plugins** die auf dem **entsprechenden __zu überprüfenden Host__ benötigt** werden.  
-date.timezone = Europe/Berlin + 
-...+Nachfolgend eine Beispiel für das Plugin **''nagios-plugins-icmp''** 
 +<code> 
 +# yum install nagios-plugins-icmp
 </code> </code>
  
Zeile 301: Zeile 337:
 # cp -a /usr/share/doc/icinga2-common-2.4.0/syntax/vim/syntax/icinga2.vim /root/.vim/syntax/icinga2.vim # cp -a /usr/share/doc/icinga2-common-2.4.0/syntax/vim/syntax/icinga2.vim /root/.vim/syntax/icinga2.vim
 </code> </code>
 +
 +===== icinga2: Erster Start =====
 +
 +Danach kann der **icinga2**-Server mit nachfolgendem Befehle gestartet werden:
 +<code>
 +# systemctl start icinga2
 +</code>
 +
 +Mit nachfolgendem Befehl kann der Status des [[https://www.icinga.org/|Icinga]]-Servers abgefragt werden:
 +<code>
 +# systemctl status icinga2
 +icinga2.service - Icinga host/service/network monitoring system
 +   Loaded: loaded (/usr/lib/systemd/system/icinga2.service; enabled)
 +   Active: active (running) since Fri 2015-12-04 09:23:21 CET; 6s ago
 +  Process: 3183 ExecStart=/usr/sbin/icinga2 daemon -d -e ${ICINGA2_ERROR_LOG} (code=exited, status=0/SUCCESS)
 +  Process: 3092 ExecStartPre=/usr/lib/icinga2/prepare-dirs /etc/sysconfig/icinga2 (code=exited, 
 +status=0/SUCCESS)
 + Main PID: 3222 (icinga2)
 +   CGroup: /system.slice/icinga2.service
 +           └─3222 /usr/lib64/icinga2/sbin/icinga2 --no-stack-rlimit daemon -d...
 +
 +Dec 04 09:23:21 server10.idmz.tachtler.net systemd[1]: Started Icinga host/se...
 +Hint: Some lines were ellipsized, use -l to show in full.
 +</code>
 +
 +Nachfolgende LOG-Dateien sollten Auskunft darüber geben, wie der Start und der Status des [[https://www.icinga.org/|Icinga]]-Servers  ist.
 +  * ''/var/log/icinga2/icinga2.log''
 +  * ''/var/log/icinga2/error.log''
 +
 +Der Inhalt der LOG-Datei ''/var/log/icinga2/icinga2.log'' könnte demnach wie folgt aussehen:
 +<code>
 +[2015-12-04 09:23:21 +0100] information/JsonRpcConnection: Reconnecting to API endpoint 
 +'server11.idmz.tachtler.net' via host '192.168.0.110' and port '5665'
 +[2015-12-04 09:23:21 +0100] information/ConfigItem: Activated all objects.
 +[2015-12-04 09:23:21 +0100] information/ApiListener: New client connection for identity 
 +'server11.idmz.tachtler.net'
 +[2015-12-04 09:23:21 +0100] information/ApiListener: Sending updates for endpoint 'server11.idmz.tachtler.net'.
 +[2015-12-04 09:23:21 +0100] information/ApiListener: Syncing runtime objects to endpoint 
 +'server11.idmz.tachtler.net'.
 +[2015-12-04 09:23:21 +0100] information/ApiListener: Finished sending updates for endpoint 
 +'server11.idmz.tachtler.net'.
 +</code>
 +
 +Die LOG-Datei ''/var/log/icinga2/error.log'' sollte hingegen **leer** sein!
 +
 +Siehe auch weiter nachfolgenden internen Link:
 +  * [[tachtler:icinga2_-_client_-_grundkonfiguration|Icinga2 - Client - Grundkonfiguration]]
  
tachtler/icinga2_-_client.1449203019.txt.gz · Zuletzt geändert: 2015/12/04 05:23 von klaus