Benutzer-Werkzeuge

Webseiten-Werkzeuge


tachtler:icinga2_-_classic_ui

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_-_classic_ui [2015/12/12 10:18] klaustachtler:icinga2_-_classic_ui [2018/10/20 19:49] (aktuell) – [/etc/icinga/cgi.cfg] klaus
Zeile 2097: Zeile 2097:
         ServerPath /         ServerPath /
                  
-        ScriptAlias /cgi-bin "/usr/lib64/icinga/cgi"+        ScriptAlias /icinga/cgi-bin "/usr/lib64/icinga/cgi
 +        Alias /icinga "/usr/share/icinga/"
  
         DocumentRoot "/usr/share/icinga"         DocumentRoot "/usr/share/icinga"
Zeile 2134: Zeile 2135:
                 </RequireAll>                 </RequireAll>
         </Directory>         </Directory>
- 
-        DirectoryIndex index.php 
  
         ErrorLog logs/icinga-classicui_error.log         ErrorLog logs/icinga-classicui_error.log
Zeile 2172: Zeile 2171:
 </code> </code>
  
-==== /etc/icinga/cgi.cfg==== +==== /etc/icinga/cgi.cfg ====
  
 Nachfolgende Konfigurationsdatei  Nachfolgende Konfigurationsdatei 
   * ''/etc/icinga/cgi.conf''   * ''/etc/icinga/cgi.conf''
-beinhaltete alle Konfigurationsdirektiven für [[https://www.icinga.org/|Icinga]]-Web (**Classic UI**)+beinhaltete alle Konfigurationsdirektiven für [[https://www.icinga.org/|Icinga]]-Web (**Classic UI**).
  
 Nachfolgende die **komplette Konfigurationsdatei**: Nachfolgende die **komplette Konfigurationsdatei**:
Zeile 2192: Zeile 2190:
 refresh_rate=30 refresh_rate=30
 refresh_type=1 refresh_type=1
-escape_html_tags=1 +# Tachtler 
-result_limit=50+# default: escape_html_tags=1 
 +escape_html_tags=0 
 +# Tachtler 
 +# default: result_limit=50 
 +result_limit=0
 show_tac_header=1 show_tac_header=1
 use_pending_states=1 use_pending_states=1
Zeile 2203: Zeile 2205:
 use_ssl_authentication=0 use_ssl_authentication=0
 lowercase_user_name=0 lowercase_user_name=0
-authorized_for_system_information=icingaadmin +# Tachtler 
-authorized_for_configuration_information=icingaadmin +# default: authorized_for_system_information=icingaadmin 
-authorized_for_full_command_resolution=icingaadmin +authorized_for_system_information=klaus 
-authorized_for_system_commands=icingaadmin +# Tachtler 
-authorized_for_all_services=icingaadmin +# default: authorized_for_configuration_information=icingaadmin 
-authorized_for_all_hosts=icingaadmin +authorized_for_configuration_information=klaus 
-authorized_for_all_service_commands=icingaadmin +# Tachtler 
-authorized_for_all_host_commands=icingaadmin+# default: authorized_for_full_command_resolution=icingaadmin 
 +authorized_for_full_command_resolution=klaus 
 +# Tachtler 
 +# default: authorized_for_system_commands=icingaadmin 
 +authorized_for_system_commands=klaus 
 +# Tachtler 
 +# default: authorized_for_all_services=icingaadmin 
 +authorized_for_all_services=klaus 
 +# Tachtler 
 +# default: authorized_for_all_hosts=icingaadmin 
 +authorized_for_all_hosts=klaus 
 +# Tachtler 
 +# default: authorized_for_all_service_commands=icingaadmin 
 +authorized_for_all_service_commands=klaus 
 +# Tachtler 
 +# default: authorized_for_all_host_commands=icingaadmin 
 +authorized_for_all_host_commands=klaus
 show_all_services_host_is_authorized_for=1 show_all_services_host_is_authorized_for=1
 show_partial_hostgroups=0 show_partial_hostgroups=0
Zeile 2242: Zeile 2260:
 #    requires standalone_installation=1 #    requires standalone_installation=1
 ###################################### ######################################
-object_cache_file=/var/cache/icinga2/objects.cache+# Tachtler - ab icinga2 2.10.1 
 +# default: object_cache_file=/var/cache/icinga2/objects.cache 
 +object_cache_file=/var/cache/icinga2/icinga2.debug
 status_file=/var/cache/icinga2/status.dat status_file=/var/cache/icinga2/status.dat
 resource_file=/etc/icinga/resource.cfg resource_file=/etc/icinga/resource.cfg
Zeile 2258: Zeile 2278:
 </code> </code>
    
-**__Erklärung zu den vorhergehenden Anpassugnen__**:+**__Erklärung zu den vorhergehenden Anpassungen__**: 
 + 
 +  * <code bash>escape_html_tags=0</code> 
 + 
 +Interpretation von Links in der Anziege des Web-Interfaces als Text, oder tatsächliche Links. (0 = als Link interpretieren, :!: **VORSICHT !!!** - Dies kann ein Sicherheitsrisiko sein!) 
 + 
 +  * <code bash>result_limit=0</code> 
 + 
 +Limit für die Anzeige von Elementen der Status-Seite des Web-Interfaces. (0 = unlimitiert, :!: **VORSICHT !!!**) 
 + 
 +  * <code bash># Tachtler 
 +# default: authorized_for_system_information=icingaadmin 
 +authorized_for_system_information=klaus 
 +# Tachtler 
 +# default: authorized_for_configuration_information=icingaadmin 
 +authorized_for_configuration_information=klaus 
 +# Tachtler 
 +# default: authorized_for_full_command_resolution=icingaadmin 
 +authorized_for_full_command_resolution=klaus 
 +# Tachtler 
 +# default: authorized_for_system_commands=icingaadmin 
 +authorized_for_system_commands=klaus 
 +# Tachtler 
 +# default: authorized_for_all_services=icingaadmin 
 +authorized_for_all_services=klaus 
 +# Tachtler 
 +# default: authorized_for_all_hosts=icingaadmin 
 +authorized_for_all_hosts=klaus 
 +# Tachtler 
 +# default: authorized_for_all_service_commands=icingaadmin 
 +authorized_for_all_service_commands=klaus 
 +# Tachtler 
 +# default: authorized_for_all_host_commands=icingaadmin 
 +authorized_for_all_host_commands=klaus</code> 
 + 
 +Änderung des Benutzers zur Authentifizierung an [[https://www.icinga.org/|Icinga]]-Web (**Classic UI**), damit Informationen abgerufen werden können.  
 + 
 +:!: **HIWNEIS** - **Vorausgehend bei der Konfiguration des VHOST wurde die Authentifizierung gegen __LDAP__ eingeführt!** 
 + 
 +  * <code bash># Tachtler - ab icinga2 2.10.1 
 +# default: object_cache_file=/var/cache/icinga2/objects.cache 
 +object_cache_file=/var/cache/icinga2/icinga2.debug</code> 
 + 
 +**Ab [[https://www.icinga.org/|Icinga2]] Version 2.10.1** muss der Pfad zu den Objekten, welche für [[https://www.icinga.org/|Icinga]]-Web (**Classic UI**) bereitgestellt werden, abgeändert werden!
  
   * <code bash>date_format=iso8601</code>   * <code bash>date_format=iso8601</code>
  
 Einstellung des Formats für das Datums für die LOG-Dateien. Einstellung des Formats für das Datums für die LOG-Dateien.
 +
 +==== /etc/icinga/resource.cfg ====
 +
 +Nachfolgende Konfigurationsdatei 
 +  * ''/etc/icinga/resource.cfg''
 +beinhaltete alle Ressourcen-Konfigurationsdirektiven für [[https://www.icinga.org/|Icinga]]-Web (**Classic UI**).
 +
 +:!: **HINWEIS** - **Die Konfigurationsdatei besteht __grundsätzlich nicht__, deshalb kann diese mit nachfolgendem Befehl wie folgt angelegt werden:**
 +<code>
 +# touch /etc/icinga/resource.cfg
 +</code>
 +
 +Nachfolgende die **komplette Konfigurationsdatei**:
 +<code bash>
 +# Sets $USER1$ to be the path to the plugins
 +$USER1$=/usr/lib64/nagios/plugins
 + 
 +# Sets $USER2$ to be the path to event handlers
 +#$USER2$=/usr/lib64/nagios/plugins/eventhandlers
 + 
 +# Store some usernames and passwords (hidden from the CGIs)
 +#$USER3$=someuser
 +#$USER4$=somepassword
 +</code>
 +
 +==== /var/cache/icinga2 ====
 +
 +In nachfolgendem Verzeichnis
 +  * ''/var/cache/icinga2''
 +müssen die darin enthaltenen Dateien durch den Benutzer des [[http://httpd.apache.org/|Apache HTTP Server]] mindestens lesenden Zugriff haben, damit [[https://www.icinga.org/|Icinga]] Classic-UI darauf zugreifen kann.
 +
 +Nachfolgender Befehl fügt den Benutzer **''apache''** der **Gruppe ''icinga''** hinzu:
 +<code>
 +# usermod -a -G icinga apache
 +</code>
 +
 +Anschließend ist der Benutzer **''apache''** in der **Gruppe ''icinga''** und kann somit auf die Dateien im Verzeichnis **''/var/cache/icinga2''** zugreifen.
 +
 +:!: **HINWEIS** - Nachfolgender Fehler im der LOG-Datei der [[https://www.icinga.org/|Icinga]] Classic-UI
 +  * ''/var/log/icinga/gui/icinga-cgi.log''
 +sollte somit **__nicht__ mehr auftreten**:
 +<code>
 +...
 +[1506061398] Error: Cannot open config file '/var/cache/icinga2/objects.cache' for reading: Permission denied
 +...
 +</code>
  
 ===== icinga2: Neustart ===== ===== icinga2: Neustart =====
Zeile 2274: Zeile 2383:
 <code> <code>
 # systemctl status icinga2 # systemctl status icinga2
 +icinga2.service - Icinga host/service/network monitoring system
 +   Loaded: loaded (/usr/lib/systemd/system/icinga2.service; enabled)
 +   Active: active (running) since Sat 2015-12-12 10:19:03 CET; 5s ago
 +  Process: 6107 ExecReload=/usr/lib/icinga2/safe-reload /etc/sysconfig/icinga2 (code=exited, status=0/SUCCESS)
 +  Process: 23817 ExecStart=/usr/sbin/icinga2 daemon -d -e ${ICINGA2_ERROR_LOG} (code=exited, status=0/SUCCESS)
 +  Process: 23724 ExecStartPre=/usr/lib/icinga2/prepare-dirs /etc/sysconfig/icinga2 (code=exited, 
 +status=0/SUCCESS)
 + Main PID: 23858 (icinga2)
 +   CGroup: /system.slice/icinga2.service
 +           └─23858 /usr/lib64/icinga2/sbin/icinga2 --no-stack-rlimit daemon -...
  
 +Dec 12 10:19:03 server11.idmz.tachtler.net icinga2[23817]: [2015-12-12 10:19:...
 +Dec 12 10:19:03 server11.idmz.tachtler.net icinga2[23817]: [2015-12-12 10:19:...
 +Dec 12 10:19:03 server11.idmz.tachtler.net icinga2[23817]: [2015-12-12 10:19:...
 +Dec 12 10:19:03 server11.idmz.tachtler.net icinga2[23817]: [2015-12-12 10:19:...
 +Dec 12 10:19:03 server11.idmz.tachtler.net icinga2[23817]: [2015-12-12 10:19:...
 +Dec 12 10:19:03 server11.idmz.tachtler.net icinga2[23817]: [2015-12-12 10:19:...
 +Dec 12 10:19:03 server11.idmz.tachtler.net icinga2[23817]: [2015-12-12 10:19:...
 +Dec 12 10:19:03 server11.idmz.tachtler.net icinga2[23817]: [2015-12-12 10:19:...
 +Dec 12 10:19:03 server11.idmz.tachtler.net icinga2[23817]: [2015-12-12 10:19:...
 +Dec 12 10:19:03 server11.idmz.tachtler.net systemd[1]: Started Icinga host/se...
 +Hint: Some lines were ellipsized, use -l to show in full.
 </code> </code>
  
Zeile 2283: Zeile 2413:
 Der Inhalt der LOG-Datei ''/var/log/icinga2/icinga2.log'' könnte demnach wie folgt aussehen: Der Inhalt der LOG-Datei ''/var/log/icinga2/icinga2.log'' könnte demnach wie folgt aussehen:
 <code> <code>
 +[2015-12-12 10:19:02 +0100] information/Application: Shutting down... 
 +[2015-12-12 10:19:02 +0100] information/CheckerComponent: Checker stopped. 
 +[2015-12-12 10:19:02 +0100] information/DbConnection: Pausing IDO connection: ido-mysql 
 +[2015-12-12 10:19:03 +0100] information/DbConnection: Resuming IDO connection: ido-mysql 
 +[2015-12-12 10:19:03 +0100] information/ConfigItem: Activated all objects. 
 +[2015-12-12 10:19:03 +0100] information/JsonRpcConnection: Reconnecting to API endpoint  
 +'server10.idmz.tachtler.net' via host '192.168.0.10' and port '5665' 
 +[2015-12-12 10:19:03 +0100] information/ConfigCompiler: Compiling config file: /var/lib/icinga2/modified- 
 +attributes.conf 
 +[2015-12-12 10:19:03 +0100] information/IdoMysqlConnection: MySQL IDO instance id: 1 (schema version: '1.14.0'
 +[2015-12-12 10:19:03 +0100] information/ApiListener: New client connection for identity  
 +'server10.idmz.tachtler.net' 
 +[2015-12-12 10:19:03 +0100] information/ApiListener: Sending updates for endpoint 'server10.idmz.tachtler.net'
 +[2015-12-12 10:19:03 +0100] information/ApiListener: Syncing runtime objects to endpoint  
 +'server10.idmz.tachtler.net'
 +[2015-12-12 10:19:03 +0100] information/ApiListener: Finished sending updates for endpoint  
 +'server10.idmz.tachtler.net'.
 </code> </code>
  
 Die LOG-Datei ''/var/log/icinga2/error.log'' sollte hingegen **leer** sein! Die LOG-Datei ''/var/log/icinga2/error.log'' sollte hingegen **leer** sein!
 +
 +===== icinga2-classicui =====
 +
 +Durch Eingabe der entsprechenden URL sollte nachfolgender Bildschirm in Browser erscheinen:
 +
 +{{:tachtler:icinga:icinga-classicui.png|Icinga Classic UI}}
  
tachtler/icinga2_-_classic_ui.1449911924.txt.gz · Zuletzt geändert: 2015/12/12 10:18 von klaus