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:03] – [Kommando Übergabe] 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  
 +  * ''/etc/icinga/cgi.conf'' 
 +beinhaltete alle Konfigurationsdirektiven für [[https://www.icinga.org/|Icinga]]-Web (**Classic UI**). 
 + 
 +Nachfolgende die **komplette Konfigurationsdatei**: 
 +<code bash> 
 +# Icinga 2 Classic UI configuration 
 +
 +# requires icinga-gui package 
 +# check http://docs.icinga.org for option details 
 +standalone_installation=1 
 +physical_html_path=/usr/share/icinga 
 +url_html_path=/icinga 
 +url_stylesheets_path=/icinga/stylesheets 
 +http_charset=utf-8 
 +refresh_rate=30 
 +refresh_type=1 
 +# Tachtler 
 +# default: escape_html_tags=1 
 +escape_html_tags=0 
 +# Tachtler 
 +# default: result_limit=50 
 +result_limit=0 
 +show_tac_header=1 
 +use_pending_states=1 
 +first_day_of_week=0 
 +suppress_maintenance_downtime=0 
 +action_url_target=main 
 +notes_url_target=main 
 +use_authentication=1 
 +use_ssl_authentication=0 
 +lowercase_user_name=0 
 +# 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 
 +show_all_services_host_is_authorized_for=1 
 +show_partial_hostgroups=0 
 +show_partial_servicegroups=0 
 +default_statusmap_layout=5 
 +status_show_long_plugin_output=0 
 +display_status_totals=0 
 +highlight_table_rows=1 
 +add_notif_num_hard=28 
 +add_notif_num_soft=0 
 +use_logging=0 
 +cgi_log_file=/var/log/icinga/gui/icinga-cgi.log 
 +cgi_log_rotation_method=d 
 +cgi_log_archive_path=/var/log/icinga/gui 
 +enforce_comments_on_actions=0 
 +send_ack_notifications=1 
 +persistent_ack_comments=0 
 +lock_author_names=1 
 +default_downtime_duration=7200 
 +set_expire_ack_by_default=0 
 +default_expiring_acknowledgement_duration=86400 
 +default_expiring_disabled_notifications_duration=86400 
 +tac_show_only_hard_state=0 
 +show_tac_header_pending=1 
 +exclude_customvar_name=PASSWORD,COMMUNITY 
 +exclude_customvar_value=secret 
 +extinfo_show_child_hosts=0 
 +tab_friendly_titles=1 
 +###################################### 
 +#    STANDALONE (ICINGA 2) OPTIONS 
 +#    requires standalone_installation=1 
 +###################################### 
 +# 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 
 +resource_file=/etc/icinga/resource.cfg 
 +command_file=/var/run/icinga2/cmd/icinga2.cmd 
 +check_external_commands=1 
 +interval_length=60 
 +status_update_interval=10 
 +log_file=/var/log/icinga2/compat/icinga.log 
 +log_rotation_method=h 
 +log_archive_path=/var/log/icinga2/compat/archives 
 +# Tachtler 
 +# default: date_format=us 
 +date_format=iso8601 
 +#   EOF 
 +</code> 
 +  
 +**__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> 
 + 
 +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 ===== 
 + 
 +Danach kann der **icinga2**-Server mit nachfolgendem Befehle **neu** gestartet werden: 
 +<code> 
 +# systemctl restart 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 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> 
 + 
 +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-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> 
 + 
 +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:
  
-FIXME+{{:tachtler:icinga:icinga-classicui.png|Icinga Classic UI}}
  
tachtler/icinga2_-_classic_ui.1449910982.txt.gz · Zuletzt geändert: 2015/12/12 10:03 von klaus