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:nagvis [20.04.2015 08:35. ] – [NagVis 1.8 Installation] django | centos:web_c7:icinga:nagvis [22.07.2019 14:58. ] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== | + | ====== Icinga Web 2 - Einbinden von NagVis zur graphischen Visualisierung - Installation und Konfiguration unter CentOS 7.x ====== |
- | ===== Icinga Web 2 Modul ===== | + | {{: |
- | # wget https://github.com/ | + | Mit **[[http://www.nagvis.org|NagVis]]** steht ein sehr mächtiges Werkzeug zur Verfügung, wenn es darum geht IT-Landschaften in Übersichtsgraphiken mit Echtzeitdaten zur Verfügung zu stellen. |
- | # unzip master.zip -d /usr/share/icingaweb2/modules | + | <WRAP center round info 80%> |
+ | Aber werfen für die genauere Beschreibung einfach einen Blick in die sehr gute [[http://docs.nagvis.org/1.8/de_DE/ | ||
- | # mv /usr/share/ | + | ... //NagVis kann benutzt werden, um Nagios-Daten zu visualisieren, |
+ | * // | ||
+ | * //logisch (z.B. alle Applikations-Server)// | ||
+ | * // | ||
+ | * // | ||
- | ===== NagVis 1.8 Installation ===== | + | ... |
+ | </ | ||
- | # yum install rsync php-mbstring graphviz graphviz-php graphviz-gd | + | ===== Installations-/ |
+ | Vor der Installation und Konfiguration von **[[http:// | ||
+ | # yum install rsync php-mbstring graphviz graphviz-php graphviz-gd | ||
+ | Damit später **NagVis** aktuelle Daten von unserem **Icinga 2**-Daemon anzeigen kann, muss NagVis auf aktuelle Daten von Icinga 2 zugreifen können. Hierzu nutzen wir das Icinga2-Feature **// | ||
+ | # icinga2 feature list | ||
+ | |||
+ | < | ||
+ | <font style=" | ||
+ | <font style=" | ||
+ | </ | ||
+ | |||
+ | Ist die Funktion **livestatus** noch nicht aktiviert, holen wir dies noch nach. | ||
+ | # icinga2 feature enable livestatus | ||
+ | |||
+ | < | ||
+ | <font style=" | ||
+ | </ | ||
+ | |||
+ | Zur Aktivierung führen wir nun noch einen Restart des Icinga 2 Daemon durch. | ||
+ | # systemctl restart icinga2 | ||
+ | |||
+ | |||
+ | ===== NagVis ===== | ||
+ | |||
+ | ==== Installation ==== | ||
+ | Im nächsten Schritt werden wir **NagVis** installieren. Haben wir schon eine bestehende NagVis-Installation können wir den Schritt überspringen und gleich mit der Konfiguration von **[[centos: | ||
+ | |||
+ | Als erstes holen wir uns das aktuelle **tar.gz**-Paket von der [[http:// | ||
# wget http:// | # wget http:// | ||
+ | Anschließend entpacken wir das Archiv zur weiteren Installation. | ||
# tar -zxf nagvis-1.8.2.tar.gz -C / | # tar -zxf nagvis-1.8.2.tar.gz -C / | ||
- | # cd / | + | Im erstellten Verzeichnis finden wir eine Datei mit weiteren Installations-Informationen. |
# less / | # less / | ||
- | + | < | |
- | < | + | |
NagVis 1.8 Quick Installation Instructions | NagVis 1.8 Quick Installation Instructions | ||
============================================================================== | ============================================================================== | ||
Zeile 80: | Zeile 112: | ||
============================================================================== | ============================================================================== | ||
Have fun using NagVis and please report bugs! | Have fun using NagVis and please report bugs! | ||
- | ============================================================================== | + | ==============================================================================</ |
- | </ | + | |
+ | Bei der Installation von NagVis greifen wir auf das Installationsscript **install.sh** aus dem NagVis-Paket zurück. Für unsere Monitoring-Umgebung nutzen wir nachfolgende Optionen, die dann später noch jeweils einzeln bestätigt bzw. verändert werden können. Erst einmal wechseln wir in das Installationsverzeichniss // | ||
+ | # cd / | ||
- | # /usr/local/src/nagvis-1.8.2/install.sh -s icinga | + | Anschließend starten wir das installationsscript. |
- | < | + | # ./ |
- | | Welcome to NagVis Installer 1.8.2 | | + | |
- | +------------------------------------------------------------------------------+ | + | <WRAP center round tip 90%> |
+ | Der Hinweis, dass der Installer für Debain, Ubuntu und SuSE getestet sei, braucht uns nicht zu beunruhigen, | ||
+ | </ | ||
+ | |||
+ | Bei der Frage zum Backend, bestätigen wir die Vorauswahl **mklivestatus**. | ||
+ | |||
+ | < | ||
+ | | Welcome to NagVis Installer 1.8.2 | | ||
+ | +------------------------------------------------------------------------------+ | ||
| This script is built to facilitate the NagVis installation and update | | This script is built to facilitate the NagVis installation and update | ||
| procedure for you. The installer has been tested on the following systems: | | procedure for you. The installer has been tested on the following systems: | ||
Zeile 109: | Zeile 150: | ||
| | | | | | ||
+--- Checking paths -----------------------------------------------------------+ | +--- Checking paths -----------------------------------------------------------+ | ||
- | | Please enter the path to the icinga | + | | Please enter the path to the nagios |
- | | icinga | + | | nagios |
- | | Please enter the path to NagVis base [/usr/sbin/ | + | | Please enter the path to NagVis base [/usr/share/ |
| | | | | | ||
+--- Checking prerequisites ---------------------------------------------------+ | +--- Checking prerequisites ---------------------------------------------------+ | ||
Zeile 124: | Zeile 165: | ||
| Checking Backends. (Available: mklivestatus, | | Checking Backends. (Available: mklivestatus, | ||
| Do you want to use backend mklivestatus? | | Do you want to use backend mklivestatus? | ||
- | | Do you want to use backend ndo2db? [n]: n | + | | Do you want to use backend ndo2db? [n]: |
- | | Do you want to use backend ido2db? [n]: n | + | | Do you want to use backend ido2db? [n]: |
| | | | ||
| PHP Module: sockets compiled_in | | PHP Module: sockets compiled_in | ||
Zeile 140: | Zeile 181: | ||
| Please enter the name of the web-server user [apache]: | | Please enter the name of the web-server user [apache]: | ||
| Please enter the name of the web-server group [apache]: | | Please enter the name of the web-server group [apache]: | ||
- | | create Apache config file [y]: y | + | | create Apache config file [n]: y |
| | | | | | ||
+--- Checking for existing NagVis ---------------------------------------------+ | +--- Checking for existing NagVis ---------------------------------------------+ | ||
Zeile 147: | Zeile 188: | ||
| Summary | | Summary | ||
+------------------------------------------------------------------------------+ | +------------------------------------------------------------------------------+ | ||
- | | NagVis home will be: / | + | | NagVis home will be: / |
| Owner of NagVis files will be: apache | | Owner of NagVis files will be: apache | ||
| Group of NagVis files will be: apache | | Group of NagVis files will be: apache | ||
Zeile 156: | Zeile 197: | ||
| | | | | | ||
| Do you really want to continue? [y]: y | | Do you really want to continue? [y]: y | ||
- | +------------------------------------------------------------------------------+ | ||
- | | Starting installation | ||
- | +------------------------------------------------------------------------------+ | ||
- | | Creating directory / | ||
- | | Creating directory / | ||
- | | Creating directory / | ||
- | | Creating directory / | ||
- | | Creating directory / | ||
- | | Copying files to / | ||
- | | Creating directory / | ||
- | | Creating main configuration file... | ||
- | | adding base="/ | ||
- | | adding htmlcgi=/ | ||
- | | adding dbname=icinga | ||
- | | adding dbprefix=icinga_ | ||
- | | | ||
- | | | ||
- | | Creating web configuration file... | ||
- | | Setting permissions for web configuration file... | ||
- | | | | ||
- | | | | ||
- | | | | ||
- | +--- Setting permissions... ---------------------------------------------------+ | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | | | ||
- | +------------------------------------------------------------------------------+ | ||
- | | Installation complete | ||
- | | | | ||
- | | You can safely remove this source directory. | ||
- | | | | ||
- | | For later update/ | ||
- | | / | ||
- | | | | ||
- | | What to do next? | | ||
- | | - Read the documentation | ||
- | | - Maybe you want to edit the main configuration file? | | ||
- | | Its location is: / | ||
- | | - Configure NagVis via browser | ||
- | | < | ||
- | | - Initial admin credentials: | ||
- | | | ||
- | | | ||
- | +------------------------------------------------------------------------------+ | ||
- | </ | ||
- | |||
- | |||
- | # ./ | ||
- | < | ||
- | | Welcome to NagVis Installer 1.8.2 | | ||
- | +------------------------------------------------------------------------------+ | ||
- | | This script is built to facilitate the NagVis installation and update | ||
- | | procedure for you. The installer has been tested on the following systems: | ||
- | | - Debian, since Etch (4.0) | ||
- | | - Ubuntu, since Hardy (8.04) | ||
- | | - SuSE Linux Enterprise Server 10 and 11 | ||
- | | | | ||
- | | Similar distributions to the ones mentioned above should work as well. | ||
- | | That (hopefully) includes RedHat, Fedora, CentOS, OpenSuSE | ||
- | | | | ||
- | | If you experience any problems using these or other distributions, | ||
- | | report that to the NagVis team. | | ||
- | +------------------------------------------------------------------------------+ | ||
- | | Do you want to proceed? [y]: y | ||
- | +------------------------------------------------------------------------------+ | ||
- | | Starting installation of NagVis 1.8.2 | | ||
- | +------------------------------------------------------------------------------+ | ||
- | | | | ||
- | +--- Checking for tools -------------------------------------------------------+ | ||
- | | Using packet manager / | ||
- | | | | ||
- | +--- Checking paths -----------------------------------------------------------+ | ||
- | | Please enter the path to the nagios base directory [/ | ||
- | | | ||
- | | Please enter the path to NagVis base [/ | ||
- | | | | ||
- | +--- Checking prerequisites ---------------------------------------------------+ | ||
- | | PHP 5.4 found | | ||
- | | PHP Module: gd php found | | ||
- | | PHP Module: mbstring php found | | ||
- | | PHP Module: gettext compiled_in | ||
- | | PHP Module: session compiled_in | ||
- | | PHP Module: xml php found | | ||
- | | PHP Module: pdo php found | | ||
- | | | ||
- | | Do you want to update the backend configuration? | ||
- | | Checking Backends. (Available: mklivestatus, | ||
- | | Do you want to use backend mklivestatus? | ||
- | | Do you want to use backend ndo2db? [n]: n | ||
- | | Do you want to use backend ido2db? [n]: n | ||
- | | | ||
- | | PHP Module: sockets compiled_in | ||
- | | Graphviz 2.30 found | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | SQLite 3.7 found | | ||
- | | | | ||
- | +--- Trying to detect Apache settings -----------------------------------------+ | ||
- | | Please enter the web path to NagVis [/ | ||
- | | Please enter the name of the web-server user [apache]: | ||
- | | Please enter the name of the web-server group [apache]: | ||
- | | create Apache config file [y]: n | ||
- | | | | ||
- | +--- Checking for existing NagVis ---------------------------------------------+ | ||
- | | NagVis 1.8.2 found | | ||
- | | Do you want the installer to update your config files when possible? [y]: y | ||
- | | Remove backup directory after successful installation? | ||
- | | | | ||
- | +------------------------------------------------------------------------------+ | ||
- | | Summary | ||
- | +------------------------------------------------------------------------------+ | ||
- | | NagVis home will be: / | ||
- | | Owner of NagVis files will be: apache | ||
- | | Group of NagVis files will be: apache | ||
- | | Path to Apache config dir is: / | ||
- | | Apache config will be created: NO | | ||
- | | | | ||
- | | Installation mode: | ||
- | | Old version: | ||
- | | New version: | ||
- | | Backup directory: | ||
- | | | | ||
- | | Note: The current NagVis directory will be moved to the backup directory. | ||
- | | The backup directory will be NOT removed after successful installation | | ||
- | | Your configuration files will be copied. | ||
- | | The configuration files will be updated if possible. | ||
- | | | | ||
- | | Do you really want to continue? [y]: y | ||
- | +------------------------------------------------------------------------------+ | ||
- | | Starting installation | ||
- | +------------------------------------------------------------------------------+ | ||
- | | Moving old NagVis to / | ||
- | | Creating directory / | ||
- | | Creating directory / | ||
- | | Creating directory / | ||
- | | Creating directory / | ||
- | | Creating directory / | ||
- | | Copying files to / | ||
- | | Creating directory / | ||
- | | Creating main configuration file... | ||
- | | adding base="/ | ||
- | | | ||
- | | | ||
- | | *** creation of / | ||
- | | | | ||
- | | Restoring main configuration file(s)... | ||
- | | Restoring custom map configuration files... | ||
- | | Restoring custom geomap source files... | ||
- | | Restoring user configuration files... | ||
- | | Restoring conf.d/ configuration files... | ||
- | | Restoring custom map images... | ||
- | | Restoring custom gadget images... | ||
- | | Restoring custom iconsets... | ||
- | | Restoring custom shapes... | ||
- | | Restoring custom templates... | ||
- | | Restoring custom template images... | ||
- | | Restoring custom gadgets... | ||
- | | Restoring custom scripts... | ||
- | | Restoring auth database file... | ||
- | | Restoring custom stylesheets... | ||
- | | | | ||
- | +------------------------------------------------------------------------------+ | ||
- | | Handling changed/ | ||
- | +------------------------------------------------------------------------------+ | ||
- | | Removing allowedforconfig option from main config... | ||
- | | Removing autoupdatefreq option from main config... | ||
- | | Removing htmlwuijs option from main config... | ||
- | | Removing wuijs option from main config... | ||
- | | Removing showautomaps option from main config... | ||
- | | Removing usegdlibs option from main config... | ||
- | | Removing displayheader option from main config... | ||
- | | Removing hovertimeout option from main config... | ||
- | | Removing allowed_for_config option from map configs... | ||
- | | Removing allowed_user from map configs... | ||
- | | Removing hover_timeout from map configs... | ||
- | | Removing usegdlibs from map configs... | ||
- | +------------------------------------------------------------------------------+ | ||
- | | HINT: Please check the changelog or the documentation for changes which | | ||
- | | | ||
- | | | | ||
- | +--- Setting permissions... ---------------------------------------------------+ | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | / | ||
- | | | | ||
- | +------------------------------------------------------------------------------+ | ||
- | | Installation complete | ||
- | | | | ||
- | | You can safely remove this source directory. | ||
- | | | | ||
- | | For later update/ | ||
- | | ./ | ||
- | | | | ||
- | | What to do next? | | ||
- | | - Read the documentation | ||
- | | - Maybe you want to edit the main configuration file? | | ||
- | | Its location is: / | ||
- | | - Configure NagVis via browser | ||
- | | < | ||
- | | - Initial admin credentials: | ||
- | | | ||
- | | | ||
- | +------------------------------------------------------------------------------+ | ||
- | </ | ||
- | |||
- | |||
- | |||
- | # ./ | ||
- | |||
- | < | ||
- | +------------------------------------------------------------------------------+ | ||
- | | Welcome to NagVis Installer 1.8.2 | | ||
- | +------------------------------------------------------------------------------+ | ||
- | | This script is built to facilitate the NagVis installation and update | ||
- | | procedure for you. The installer has been tested on the following systems: | ||
- | | - Debian, since Etch (4.0) | ||
- | | - Ubuntu, since Hardy (8.04) | ||
- | | - SuSE Linux Enterprise Server 10 and 11 | ||
- | | | | ||
- | | Similar distributions to the ones mentioned above should work as well. | ||
- | | That (hopefully) includes RedHat, Fedora, CentOS, OpenSuSE | ||
- | | | | ||
- | | If you experience any problems using these or other distributions, | ||
- | | report that to the NagVis team. | | ||
- | +------------------------------------------------------------------------------+ | ||
- | | Do you want to proceed? [y]: y | ||
- | +------------------------------------------------------------------------------+ | ||
- | | Starting installation of NagVis 1.8.2 | | ||
- | +------------------------------------------------------------------------------+ | ||
- | | | | ||
- | +--- Checking for tools -------------------------------------------------------+ | ||
- | | Using packet manager / | ||
- | | | | ||
- | +--- Checking paths -----------------------------------------------------------+ | ||
- | | Please enter the path to the nagios base directory [/ | ||
- | | | ||
- | | Please enter the path to NagVis base [/ | ||
- | | | | ||
- | +--- Checking prerequisites ---------------------------------------------------+ | ||
- | | PHP 5.4 found | | ||
- | | PHP Module: gd php found | | ||
- | | PHP Module: mbstring php found | | ||
- | | PHP Module: gettext compiled_in | ||
- | | PHP Module: session compiled_in | ||
- | | PHP Module: xml php found | | ||
- | | PHP Module: pdo php found | | ||
- | | | ||
- | | Checking Backends. (Available: mklivestatus, | ||
- | | Do you want to use backend mklivestatus? | ||
- | | Do you want to use backend ndo2db? [n]: | ||
- | | Do you want to use backend ido2db? [n]: | ||
- | | | ||
- | | PHP Module: sockets compiled_in | ||
- | | Graphviz 2.30 found | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | SQLite 3.7 found | | ||
- | | | | ||
- | +--- Trying to detect Apache settings -----------------------------------------+ | ||
- | | Please enter the web path to NagVis [/ | ||
- | | Please enter the name of the web-server user [apache]: | ||
- | | Please enter the name of the web-server group [apache]: | ||
- | | create Apache config file [n]: | ||
- | | | | ||
- | +--- Checking for existing NagVis ---------------------------------------------+ | ||
- | | | | ||
- | +------------------------------------------------------------------------------+ | ||
- | | Summary | ||
- | +------------------------------------------------------------------------------+ | ||
- | | NagVis home will be: / | ||
- | | Owner of NagVis files will be: apache | ||
- | | Group of NagVis files will be: apache | ||
- | | Path to Apache config dir is: / | ||
- | | Apache config will be created: NO | | ||
- | | | | ||
- | | Installation mode: | ||
- | | | | ||
- | | Do you really want to continue? [y]: | ||
+------------------------------------------------------------------------------+ | +------------------------------------------------------------------------------+ | ||
| Starting installation | | Starting installation | ||
Zeile 484: | Zeile 211: | ||
| | | | ||
| | | | ||
- | | *** creation of / | + | | *** / |
+ | | *** creating / | ||
+ | | Creating web configuration file... | ||
+ | | Setting permissions for web configuration file... | ||
| | | | | | ||
| | | | | | ||
Zeile 513: | Zeile 243: | ||
| | | | | | ||
| For later update/ | | For later update/ | ||
- | | ./ | + | | ./ |
| | | | | | ||
| What to do next? | | | What to do next? | | ||
Zeile 527: | Zeile 257: | ||
</ | </ | ||
+ | Das Installationsverzeichnis wird nun nicht mehr benötigt und kann bei Bedarf gelöscht werden. Für spätere Updates von NagVis sichern wir den angebotenen Scriptaufruf. | ||
+ | | ||
+ | -b mklivestatus -u apache -g apache -w / | ||
+ | |||
+ | ==== (Erst-)Konfiguration ==== | ||
+ | === Apache Webserver === | ||
+ | Das Installationsscript von NagVis hat uns im Verzeichnis // | ||
+ | Dort brauchen wir nur noch die Berechtigungen zum Zugriff zu definieren. | ||
+ | # vim / | ||
+ | |||
+ | <file apache / | ||
+ | # | ||
+ | # ############################################################################# | ||
+ | |||
+ | Alias /nagvis "/ | ||
+ | |||
+ | < | ||
+ | Options FollowSymLinks | ||
+ | AllowOverride None | ||
+ | # Django : 2015-04-20 | ||
+ | # default: Order allow,deny | ||
+ | # Allow from all | ||
+ | Require IP 10.0 | ||
+ | |||
+ | # To enable Nagios basic auth on NagVis use the following options | ||
+ | # Just uncomment it. Maybe you need to adjust the path to the | ||
+ | # Auth user file. | ||
+ | # | ||
+ | # If you use the NagVis internal auth mechanism based on the web | ||
+ | # for you won't need this. | ||
+ | # | ||
+ | #AuthName " | ||
+ | #AuthType Basic | ||
+ | # | ||
+ | #Require valid-user | ||
+ | |||
+ | # With installed and enabled mod_rewrite there are several redirections | ||
+ | # available to fix deprecated and/or wrong urls. None of those rules is | ||
+ | # mandatory to get NagVis working. | ||
+ | < | ||
+ | RewriteEngine On | ||
+ | RewriteBase /nagvis | ||
+ | |||
+ | # Use mod_rewrite for old url redirection even if there are php files which | ||
+ | # redirect the queries itselfs. In some cases the mod_rewrite redirect | ||
+ | # is better than the php redirect. | ||
+ | # | ||
+ | # Using the php redirect seems to be better in some cases where https/http servers | ||
+ | # are mixed. For example in OMD setups where using apache own mode and https in the | ||
+ | # frontend and http in the backend apache servers. | ||
+ | # | ||
+ | # Disabling this redirect by default in the hope that the php direct works better. | ||
+ | # | ||
+ | # | ||
+ | |||
+ | # Redirect old regular map links | ||
+ | RewriteCond %{REQUEST_URI} ^/ | ||
+ | RewriteCond %{QUERY_STRING} map=(.*) | ||
+ | RewriteRule ^(.*)$ / | ||
+ | |||
+ | # Without map= param | ||
+ | RewriteCond %{REQUEST_URI} ^/ | ||
+ | RewriteRule ^(.*)$ / | ||
+ | |||
+ | # Redirect old rotation calls | ||
+ | RewriteCond %{REQUEST_URI} ^/ | ||
+ | RewriteCond %{QUERY_STRING} !mod | ||
+ | RewriteCond %{QUERY_STRING} rotation=(.*) | ||
+ | RewriteRule ^(.*)$ / | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Bevor wir unsere Konfigurationsanpassung mit einem Reload des Apache-Daemon vornehmen, testen wir die angepasste Konfigurationsdatei **nagvis.conf** auf syntaktische Fehler. | ||
+ | # apachectl -t | ||
+ | |||
+ | Syntax OK | ||
+ | |||
+ | Da nichts beanstandet wurde, führen wir nun einen Reload des Apache-Webservers durch. | ||
+ | # systemctl reload httpd | ||
+ | |||
+ | === NagVis === | ||
+ | Bei der Installation von NagVis mit Hilfe des Installationsscriptes wurde im Verzeichnis // | ||
+ | * **Sprache**: | ||
+ | |||
+ | | ||
+ | ; | ||
+ | ; Django : 2015-04-20 | ||
+ | ; default: unset | ||
+ | language=" | ||
+ | |||
+ | ...</ | ||
+ | * **Verzeichnis-Pfade**: | ||
+ | |||
+ | ; Path definitions | ||
+ | [paths] | ||
+ | ; absolute physical NagVis path | ||
+ | ; | ||
+ | base="/ | ||
+ | ; absolute html NagVis path | ||
+ | ; | ||
+ | ; absolute html NagVis cgi path | ||
+ | ; | ||
+ | ; Django : 2015-04-20 | ||
+ | htmlcgi="/ | ||
+ | |||
+ | ...</ | ||
+ | * **Links**: \\ Das größte Augenmerk legen wir auf die Sektion **[defaults]**. Damit später beim Einbetten der NagVis-Seiten in Icinga Web 2 Verweise aus den NagVis-Graphiken __nur__ als iframe von Icinga Web2 angezeigt werden, passen wir den Konfigurationsparameter **// | ||
+ | |||
+ | ; Django : 2015-04-20 | ||
+ | ; don't show iframe in iframe | ||
+ | urltarget=" | ||
+ | ; URL template for host object links | ||
+ | ; | ||
+ | ; Django : 2015-04-20 | ||
+ | hosturl=" | ||
+ | ; URL template for hostgroup object links | ||
+ | ; | ||
+ | ; Django : 2015-04-20 | ||
+ | hostgroupurl=" | ||
+ | ; URL template for service object links | ||
+ | ; | ||
+ | ; Django : 2015-04-20 | ||
+ | serviceurl=" | ||
+ | ; URL template for servicegroup object links | ||
+ | ; | ||
+ | ; Django : 2015-04-20 | ||
+ | servicegroupurl=" | ||
+ | |||
+ | ...</ | ||
+ | * **Automap**: | ||
+ | |||
+ | ; Options for the Automap | ||
+ | [automap] | ||
+ | ; Default URL parameters for links to the automap | ||
+ | ; | ||
+ | ; Default root host (NagVis uses this if it can't detect it via backend) | ||
+ | ; You can configure a hostname here or use "<<< | ||
+ | ; node which shows the parent tree and all hosts which have no parents | ||
+ | ; defined below the is node. | ||
+ | ; | ||
+ | ; Path to the graphviz binaries (dot, | ||
+ | ; | ||
+ | ; Django : 2015-04-20 | ||
+ | defaultparams="& | ||
+ | defaultroot=" | ||
+ | graphvizpath="/ | ||
+ | |||
+ | ...</ | ||
+ | |||
+ | Somit ergibt sich folgende NagVis-Konfigurations-Optionen: | ||
+ | # egrep -v ' | ||
+ | < | ||
+ | file_group=" | ||
+ | language=" | ||
+ | [paths] | ||
+ | base="/ | ||
+ | htmlcgi="/ | ||
+ | [defaults] | ||
+ | urltarget=" | ||
+ | hosturl=" | ||
+ | hostgroupurl=" | ||
+ | serviceurl=" | ||
+ | servicegroupurl=" | ||
+ | backend=" | ||
+ | [index] | ||
+ | [automap] | ||
+ | defaultparams="& | ||
+ | defaultroot=" | ||
+ | graphvizpath="/ | ||
+ | [wui] | ||
+ | [worker] | ||
+ | [backend_live_1] | ||
+ | backendtype=" | ||
+ | socket=" | ||
+ | [backend_ndomy_1] | ||
+ | backendtype=" | ||
+ | [rotation_demo] | ||
+ | maps=" | ||
+ | interval=15 | ||
+ | [states] | ||
+ | </ | ||
+ | |||
+ | Hier finden wir nochmals die komplette Konfigurationsdatei: | ||
+ | # vim / | ||
+ | |||
+ | < | ||
+ | ; the line above is to prevent | ||
+ | ; viewing this file from web. | ||
+ | ; DON'T REMOVE IT! | ||
+ | |||
+ | ; ---------------------------- | ||
+ | ; Default NagVis Configuration File | ||
+ | ; At delivery everything here is commented out. The default values are set in the NagVis code. | ||
+ | ; You can make your changes here, they' | ||
+ | ; ---------------------------- | ||
+ | |||
+ | ; ---------------------------- | ||
+ | ; !!! The sections/ | ||
+ | ; ---------------------------- | ||
+ | |||
+ | ; General options which affect the whole NagVis installation | ||
+ | [global] | ||
+ | ; Enable/ | ||
+ | ; example user logins and logouts are logged in var/ | ||
+ | ; | ||
+ | ; | ||
+ | ; Defines the authentication module to use. By default NagVis uses the built-in | ||
+ | ; SQLite authentication module. On delivery there is no other authentication | ||
+ | ; module available. It is possible to add own authentication modules for | ||
+ | ; supporting other authorisation mechanisms. For details take a look at the | ||
+ | ; documentation. | ||
+ | ; | ||
+ | ; | ||
+ | ; Defines the authorisation module to use. By default NagVis uses the built-in | ||
+ | ; SQLite authorisation module. On delivery there are some other modules available: | ||
+ | ; | ||
+ | ; - CoreAuthorisationModMySQL: | ||
+ | ; | ||
+ | ; - CoreAuthorisationModMultisite: | ||
+ | ; to gather user permissions. This makes use of the roles defined for a user within | ||
+ | ; | ||
+ | ; - CoreAuthorisationModGroups: | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; group within NagVis. Take a look at the docs for details. | ||
+ | ; | ||
+ | ; It is possible to add own authorisation modules for supporting other authorisation | ||
+ | ; mechanisms. For details take a look at the documentation. | ||
+ | ; | ||
+ | ; | ||
+ | ; If you use CoreAuthorisationModGroups above, you might need these options: | ||
+ | ; This option defines the path to your group permission mapping table. This file | ||
+ | ; is searched within the NagVis etc directory. | ||
+ | ; | ||
+ | ; This option is used to configure one or several backend_ids, | ||
+ | ; should be used to get the users contact group memberships from. | ||
+ | ; | ||
+ | ; | ||
+ | ; Sets the size of the controls in unlocked (edit) mode of the frontend. This | ||
+ | ; defaults to a value of 10 which makes each control be sized to 10px * 10px. | ||
+ | ; | ||
+ | ; | ||
+ | ; Dateformat of the time/dates shown in nagvis (For valid format see PHP docs) | ||
+ | ; | ||
+ | ; | ||
+ | ; Used to configure the preselected options in the " | ||
+ | ; dialog_ack_sticky=1 | ||
+ | ; dialog_ack_notify=1 | ||
+ | ; dialog_ack_persist=0 | ||
+ | ; | ||
+ | ; File group and mode are applied to all files which are written by NagVis. | ||
+ | ; Usualy these values can be left as they are. In some rare cases you might | ||
+ | ; want to change these values to make the files writeable/ | ||
+ | ; users in a group. | ||
+ | file_group=" | ||
+ | ; | ||
+ | ; | ||
+ | ; The server to use as source for the NagVis geomaps. Must implement the API which | ||
+ | ; can be found on http:// | ||
+ | ; | ||
+ | ; | ||
+ | ; In some cases NagVis needs to open connections to the internet. The cases are: | ||
+ | ; - The new geomap needs access to openstreetmap webservices to be able to fetch | ||
+ | ; | ||
+ | ; Most company networks don't allow direct HTTP access to the internet. The most | ||
+ | ; networks require the users to use proxy servers for outbound HTTP requests. | ||
+ | ; The proxy url to be used in NagVis can be configured here. One possible value | ||
+ | ; is " | ||
+ | ; | ||
+ | ; Most proxies require authentication to access the internet. Use the format | ||
+ | ; "< | ||
+ | ; | ||
+ | ; Set the timeout (in seconds) for outbound HTTP requests (for example geomap requests) | ||
+ | ; | ||
+ | ; | ||
+ | ; Defines which translations of NagVis are available to the users | ||
+ | ; | ||
+ | ; Language detection steps to use. Available: | ||
+ | ; - User: The user selection | ||
+ | ; - Session: Language saved in the session (Usually set after first setting an | ||
+ | ; | ||
+ | ; - Browser: Detection by user agent information from the browser | ||
+ | ; - Config: | ||
+ | ; | ||
+ | ; | ||
+ | ; Select language (Available by default: en_US, de_DE, fr_FR, pt_BR) | ||
+ | ; | ||
+ | ; Django : 2015-04-20 | ||
+ | ; default: unset | ||
+ | language=" | ||
+ | ; | ||
+ | ; Defines the logon module to use. There are three logon modules to be used by | ||
+ | ; default. It is possible to add own logon modules for serving other dialogs or | ||
+ | ; ways of logging in. For details take a look at the documentation. | ||
+ | ; | ||
+ | ; The delivered modules are: | ||
+ | ; | ||
+ | ; LogonMixed: The mixed logon module uses the LogonEnv module as default and | ||
+ | ; the LogonDialog module as fallback when LogonEnv returns no username. This | ||
+ | ; | ||
+ | ; | ||
+ | ; LogonDialog: | ||
+ | ; | ||
+ | ; | ||
+ | ; LogonEnv: It is possible to realise a fully " | ||
+ | ; | ||
+ | ; is not really authenticated with NagVis. NagVis trusts the provided username | ||
+ | ; | ||
+ | ; user. You can add several authentication mechanisms to your webserver, | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; set to empty string to disable that behaviour. | ||
+ | ; | ||
+ | ; LogonMultisite: | ||
+ | ; which have been generated by Check_MK multisite when using the cookie based | ||
+ | ; | ||
+ | ; to use this, you need to define a new option called logon_multisite_serials | ||
+ | ; which points to the auth.serial file generated by Check_MK. | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; Default rotation time of pages in rotations | ||
+ | ; | ||
+ | ; | ||
+ | ; Some user information is stored in sessions which are identified by session | ||
+ | ; cookies placed on the users computer. The options below set the properties | ||
+ | ; of the session cookie. | ||
+ | ; Domain to set the cookie for. By default NagVis tries to auto-detect this | ||
+ | ; options value by using the webserver' | ||
+ | ; | ||
+ | ; Absolute web path to set the cookie for. This defaults to configured | ||
+ | ; paths/ | ||
+ | ; | ||
+ | ; Lifetime of the NagVis session cookie in seconds. The default value is set to | ||
+ | ; 24 hours. The NagVis session cookie contents will be renewed on every page | ||
+ | ; visit. If a session is idle for more time than configured here it will become | ||
+ | ; invalid. | ||
+ | ; | ||
+ | ; Most modern browsers will deny javascript access to cookies if the HttpOnly | ||
+ | ; flag is set. This prevents XSS attacks from stealing cookies. Default is off | ||
+ | ; to not break any existing installations that rely on this functionality. Set | ||
+ | ; to 1 to enable. | ||
+ | ; | ||
+ | ; Most modern browsers will prevent cookies from being sent unencrypted if the | ||
+ | ; Secure flag is set. Default is off since not all Nagvis installations require | ||
+ | ; HTTPS. Set to 1 to enable. | ||
+ | ; | ||
+ | ; | ||
+ | ; Staleness threshold (Only used with livestatus backend). Take a look at the | ||
+ | ; Check_MK documentation for details about the staleness of hosts/ | ||
+ | ; The staleness means that an object has not received any state information for | ||
+ | ; a given time. The configured value is a factor of the regular check interval. | ||
+ | ; A value of 1.5 means that an object is marked as stale after one and a half | ||
+ | ; check intervals have passed without update. | ||
+ | ; | ||
+ | ; | ||
+ | ; Start page to redirect the user to when first visiting NagVis without | ||
+ | ; special parameters. | ||
+ | ; | ||
+ | ; | ||
+ | ; The startshow parameter is only used by some views at the moment. It is used | ||
+ | ; by the Map module. | ||
+ | ; | ||
+ | ; | ||
+ | ; Turn on to enable some shinken related features in NagVis, like the | ||
+ | ; min_business_impact-filter on automaps which can be used to render automaps | ||
+ | ; based on the shinken attribute " | ||
+ | ; | ||
+ | |||
+ | ; Path definitions | ||
+ | [paths] | ||
+ | ; absolute physical NagVis path | ||
+ | ; | ||
+ | base="/ | ||
+ | ; absolute html NagVis path | ||
+ | ; | ||
+ | ; absolute html NagVis cgi path | ||
+ | ; | ||
+ | ; Django : 2015-04-20 | ||
+ | htmlcgi="/ | ||
+ | |||
+ | ; Default values which get inherited to the maps and its objects | ||
+ | [defaults] | ||
+ | ; default backend (id of the default backend) | ||
+ | ; | ||
+ | ; background color of maps | ||
+ | ; | ||
+ | ; Enable/ | ||
+ | ; able to bind commands or links to your map objects | ||
+ | ; | ||
+ | ; Choose the default context template | ||
+ | ; | ||
+ | ; Raise frontend events for problematic objects also on page loading. Set to 1 to | ||
+ | ; enable this feature | ||
+ | ; | ||
+ | ; Repeat frontend events in the given interval. The interval is configured in seconds. | ||
+ | ; | ||
+ | ; The time in seconds to repeat alerts for a problematic ojects for as configured in | ||
+ | ; event_repeat_interval. This value defaults to -1, this leads to repeated events | ||
+ | ; till the problematic state has been fixed. | ||
+ | ; | ||
+ | ; Enable/ | ||
+ | ; shown when summary state is PENDING, OK or UP) | ||
+ | ; | ||
+ | ; Enable/ | ||
+ | ; border | ||
+ | ; | ||
+ | ; The duration of the event highlight in milliseconds (10 seconds by default) | ||
+ | ; | ||
+ | ; The interval of the event highlight in milliseconds (0.5 seconds by default) | ||
+ | ; | ||
+ | ; Enable/ | ||
+ | ; track of important actions and information | ||
+ | ; | ||
+ | ; Loglevel of the eventlog (available: debug, info, warning, critical) | ||
+ | ; | ||
+ | ; Number of events kept in the scrollback | ||
+ | ; | ||
+ | ; Height of the eventlog when visible in px | ||
+ | ; | ||
+ | ; Hide/Show the eventlog on page load | ||
+ | ; | ||
+ | ; Enable/ | ||
+ | ; out of the visible scope | ||
+ | ; | ||
+ | ; Enable/ | ||
+ | ; | ||
+ | ; enable/ | ||
+ | ; | ||
+ | ; header template | ||
+ | ; | ||
+ | ; Enable/ | ||
+ | ; | ||
+ | ; Show states in the sidebar header menu (if supported by template) | ||
+ | ; | ||
+ | ; enable/ | ||
+ | ; | ||
+ | ; hover template | ||
+ | ; | ||
+ | ; hover menu open delay (seconds) | ||
+ | ; | ||
+ | ; show children in hover menus | ||
+ | ; | ||
+ | ; limit shown child objects to n | ||
+ | ; | ||
+ | ; order method of children (desc: descending, asc: ascending) | ||
+ | ; | ||
+ | ; sort method of children (s: state, a: alphabetical) | ||
+ | ; | ||
+ | ; default icons | ||
+ | ; | ||
+ | ; recognize only hard states (not soft) | ||
+ | ; | ||
+ | ; recognize service states in host/ | ||
+ | ; | ||
+ | ; show map in lists (dropdowns, index page, ...) | ||
+ | ; | ||
+ | ; show map in multisite snapin | ||
+ | ; | ||
+ | ; Name of the custom stylesheet to use on the maps (The file needs to be located | ||
+ | ; in the share/ | ||
+ | ; | ||
+ | ; target for the icon links | ||
+ | ; | ||
+ | ; Django : 2015-04-20 | ||
+ | ; don't show iframe in iframe | ||
+ | urltarget=" | ||
+ | ; URL template for host object links | ||
+ | ; | ||
+ | ; Django : 2015-04-20 | ||
+ | hosturl=" | ||
+ | ; URL template for hostgroup object links | ||
+ | ; | ||
+ | ; Django : 2015-04-20 | ||
+ | hostgroupurl=" | ||
+ | ; URL template for service object links | ||
+ | ; | ||
+ | ; Django : 2015-04-20 | ||
+ | serviceurl=" | ||
+ | ; URL template for servicegroup object links | ||
+ | ; | ||
+ | ; Django : 2015-04-20 | ||
+ | servicegroupurl=" | ||
+ | ; URL template for dynamic group object links (disabled by default) | ||
+ | ; | ||
+ | ; URL template for aggregations object links (disabled by default) | ||
+ | ; | ||
+ | ; URL template for nested map links | ||
+ | ; | ||
+ | ; Templates to be used for the different views. | ||
+ | ; | ||
+ | ; Enable/ | ||
+ | ; | ||
+ | ; Configure the colors used by weathermap lines | ||
+ | ; | ||
+ | ; Show mouse controllable elements for zooming the maps at the upper left corner of the map | ||
+ | ; | ||
+ | ; Enables scaling of the objects (icons, texts, lines, ...) when zooming the map. This can be disabled | ||
+ | ; to have the objects remain at the same size during zooming | ||
+ | ; | ||
+ | |||
+ | ; Options to configure the Overview page of NagVis | ||
+ | backend=" | ||
+ | [index] | ||
+ | ; Color of the overview background | ||
+ | ; | ||
+ | ; Set number of map cells per row | ||
+ | ; | ||
+ | ; enable/ | ||
+ | ; | ||
+ | ; header template | ||
+ | ; | ||
+ | ; Enable/ | ||
+ | ; | ||
+ | ; Enable/ | ||
+ | ; | ||
+ | ; Enable/ | ||
+ | ; | ||
+ | |||
+ | ; Options for the Automap | ||
+ | [automap] | ||
+ | ; Default URL parameters for links to the automap | ||
+ | ; | ||
+ | ; Default root host (NagVis uses this if it can't detect it via backend) | ||
+ | ; You can configure a hostname here or use "<<< | ||
+ | ; node which shows the parent tree and all hosts which have no parents | ||
+ | ; defined below the is node. | ||
+ | ; | ||
+ | ; Path to the graphviz binaries (dot, | ||
+ | ; | ||
+ | ; Django : 2015-04-20 | ||
+ | defaultparams="& | ||
+ | defaultroot=" | ||
+ | graphvizpath="/ | ||
+ | |||
+ | ; Options for the WUI | ||
+ | [wui] | ||
+ | ; map lock time (minutes). When a user edits a map other users trying to edit | ||
+ | ; the map are warned about this fact. | ||
+ | ; | ||
+ | ; Show/hide the grid | ||
+ | ; | ||
+ | ; The color of the grid lines | ||
+ | ; | ||
+ | ; The space between the single grid lines in pixels | ||
+ | ; | ||
+ | |||
+ | ; Options for the new Javascript worker | ||
+ | [worker] | ||
+ | ; The interval in seconds in which the worker will check for objects which need | ||
+ | ; to be updated | ||
+ | ; | ||
+ | ; The maximum number of parameters used in ajax http requests | ||
+ | ; Some intrusion detection/ | ||
+ | ; too many parameters in the url. Give 0 for no limit. | ||
+ | ; | ||
+ | ; The maximum length of http request urls during ajax http requests | ||
+ | ; Some intrusion detection/ | ||
+ | ; queries being too long | ||
+ | ; | ||
+ | ; The retention time of the states in the frontend in seconds. The state | ||
+ | ; information will be refreshed after this time | ||
+ | ; | ||
+ | |||
+ | ; ---------------------------- | ||
+ | ; Backend definitions | ||
+ | ; ---------------------------- | ||
+ | |||
+ | ; Example definition of a livestatus backend. | ||
+ | ; In this case the backend_id is live_1 | ||
+ | ; The path / | ||
+ | [backend_live_1] | ||
+ | backendtype=" | ||
+ | ; The status host can be used to prevent annoying timeouts when a backend is not | ||
+ | ; reachable. This is only useful in multi backend setups. | ||
+ | ; | ||
+ | ; It works as follows: The assumption is that there is a " | ||
+ | ; monitors the host of the " | ||
+ | ; reported as UP the backend is queried as normal. | ||
+ | ; When the remote backend host is reported as " | ||
+ | ; try to connect to the backend anymore until the backend host gets available again. | ||
+ | ; | ||
+ | ; The statushost needs to be given in the following format: | ||
+ | ; "< | ||
+ | ; | ||
+ | socket=" | ||
+ | |||
+ | ; Example definition for a MySQL backend | ||
+ | ; in this example the ID of the Backend is " | ||
+ | [backend_ndomy_1] | ||
+ | ; type of backend - MUST be set | ||
+ | backendtype=" | ||
+ | ; The status host can be used to prevent annoying timeouts when a backend is not | ||
+ | ; reachable. This is only useful in multi backend setups. | ||
+ | ; | ||
+ | ; It works as follows: The assumption is that there is a " | ||
+ | ; monitors the host of the " | ||
+ | ; reported as UP the backend is queried as normal. | ||
+ | ; When the remote backend host is reported as " | ||
+ | ; try to connect to the backend anymore until the backend host gets available again. | ||
+ | ; | ||
+ | ; The statushost needs to be given in the following format: | ||
+ | ; "< | ||
+ | ; | ||
+ | ; hostname for NDO-db | ||
+ | ; | ||
+ | ; portname for NDO-db | ||
+ | ; | ||
+ | ; database name for NDO-db | ||
+ | ; | ||
+ | ; username for NDO-db | ||
+ | ; | ||
+ | ; password for NDO-db | ||
+ | ; | ||
+ | ; prefix for tables in NDO-db | ||
+ | ; | ||
+ | ; instance name for tables in NDO-db | ||
+ | ; | ||
+ | ; maximum delay of the NDO Database in seconds | ||
+ | ; | ||
+ | ; path to the cgi-bin of this backend | ||
+ | ; | ||
+ | |||
+ | ; ---------------------------- | ||
+ | ; Rotation pool definitions | ||
+ | ; ---------------------------- | ||
+ | |||
+ | ; in this example the browser switches between the maps demo and demo2 every 15 | ||
+ | ; seconds, the rotation is enabled by url: index.php? | ||
+ | [rotation_demo] | ||
+ | ; These steps are rotated. The single steps may have optional prefixes like " | ||
+ | ; which are used as display text on the index pages rotation list. | ||
+ | ; You may also add external URLs as steps. Simply enclose the url using [] | ||
+ | ; instead of the map name. | ||
+ | maps=" | ||
+ | ; rotation interval (seconds) | ||
+ | interval=15 | ||
+ | |||
+ | ; ---------------------------- | ||
+ | ; Action definitions | ||
+ | ; ---------------------------- | ||
+ | ; Since NagVis 1.7.6 it is possible to use so called actions to extend the | ||
+ | ; default context menu. This enables users to connect directly to the monitored | ||
+ | ; hosts from the NagVis context menu. Here you can configure those actions. | ||
+ | ; | ||
+ | ; It is possible to add such actions to the context menus of service and host | ||
+ | ; objects. They are not added blindly to all objects of those types, you can | ||
+ | ; use the attribute " | ||
+ | ; specific actions. By default we use Nagios custom macros of the host object | ||
+ | ; to make the actions visible/ | ||
+ | ; to custom macros, you can also use regular host attributes which are available | ||
+ | ; within NagVis. | ||
+ | ; With the option " | ||
+ | ; on the clients which have a listed operating system running. | ||
+ | |||
+ | ; Adds the action " | ||
+ | ; has the string " | ||
+ | ; When clicking on the link, NagVis generates a .rdp file which contains makes | ||
+ | ; the client connect to the given host via RDP. | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | |||
+ | ; Adds the action " | ||
+ | ; string " | ||
+ | ; detects that the client watching the map uses windows. | ||
+ | ; When clicking on the link, NagVis generates a .cmd file which contains a | ||
+ | ; call to putty which makes putty connect via SSH to this host. | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | |||
+ | ; Adds the action " | ||
+ | ; string " | ||
+ | ; detects that the client watching the map uses linux or mac os. | ||
+ | ; When clicking on the link, the browser opens the URL ssh://< | ||
+ | ; you need to configure your clients browser to handle these urls correctly. | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | |||
+ | ; Adds the action " | ||
+ | ; string " | ||
+ | ; When clicking on the link, the browser opens a new window with the URL | ||
+ | ; http://< | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | |||
+ | ; Adds the action " | ||
+ | ; string " | ||
+ | ; When clicking on the link, the browser opens a new window with the URL | ||
+ | ; https://< | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | |||
+ | ; ------------------------------------------------------------------------------ | ||
+ | ; Below you find some advanced stuff | ||
+ | ; ------------------------------------------------------------------------------ | ||
+ | |||
+ | ; Configure different state related settings | ||
+ | [states] | ||
+ | ; State coverage/ | ||
+ | ; a critical state will cover a warning state and an acknowledged critical | ||
+ | ; state will not cover a warning state. | ||
+ | ; | ||
+ | ; These options are being used when calculating the summary state of the map | ||
+ | ; objects. The default values should fit most needs. | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ;error=4 | ||
+ | ; | ||
+ | ; | ||
+ | ;up=2 | ||
+ | ;ok=1 | ||
+ | ; | ||
+ | ;pending=0 | ||
+ | ; | ||
+ | ; Colors of the different states. The colors are used in lines and hover menus | ||
+ | ; and for example in the frontend highlight and background event handler | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; Sound of the different states to be used by the sound eventhandler in the | ||
+ | ; frontend. The sounds are only being fired when changing to some | ||
+ | ; worse state. | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ;up_sound= | ||
+ | ;ok_sound= | ||
+ | ; | ||
+ | ; | ||
+ | |||
+ | ; ------------------------- | ||
+ | ; EOF | ||
+ | ; ------------------------- | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ===== Icinga Web 2 Modul ===== | ||
+ | ==== Installation ==== | ||
+ | Für das Einbetten der NagVis-Karten in **Icinga Web2** greifen wir auf das Modul **[[https:// | ||
+ | |||
+ | Als erstes holen wir uns das Modul von der **[[https:// | ||
+ | # wget https:// | ||
+ | |||
+ | Dann entpacken wir das ZIP-Archiv. | ||
+ | # unzip master.zip -d / | ||
+ | |||
+ | Abschließend verschieben wir das Unterverzeichnis **nagvis** in das Icinga Web 2 Modulverzeichnis. | ||
+ | # mv / | ||
+ | |||
+ | ==== Konfiguration ==== | ||
+ | Zur Konfiguration von **Icinga Web 2** öffnen wir die URL unserer Icinga-Installation. | ||
+ | $ firefox https:// | ||
+ | |||
+ | Hier melden wir uns nun wie gewohnt an. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Auf der linken Seite klicken wir auf den Menüpunkt **System**. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Hier licken wir nun auf den Menüpunkt **Module**. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | In diesem Fenster wählen wir dann unser neues Modul **nagvis** an. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Zum aktivieren klicken wir auf der rechten Bildschirmseite auf den Schriftzug **enable**. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Zur abschließenden Modulkonfiguration klicken wir nun rechts oben auf den Reiter **Nagvis**. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Hier tragen wir nun die URL bzw. das Verzeichnis unserer **NagVis**-Installation ein und klicken abschließend auf die Schaltfläche **Save Changes**. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | ===== Start der NagVis-Anwendung ===== | ||
+ | Da wir die initiale Konfiguration abgeschlossen haben, können wir nun Das Modul **NagVis** aufrufen. Hierzu klicken wir im Menü links auf den Menüpunkt **Nagvis**. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Zur Erstanmeldung am Modul **Nagvis** geben wir als Anmeldedaten jeweils **admin** ein und klicken dann auf die Schaltfläche **Einloggen**. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Einen ersten Eindruck können wir uns mit Hilfe der bei der Erstinstallation angelegten Demo-Karten verschaffen. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | |||
+ | |||
+ | ===== individuelle Konfiguration ===== | ||
+ | ==== User ==== | ||
+ | Bei der Installation von NagVis mit Hilfe des Installationsscriptes werden neben dem Admin-User noch ein Gast-Zugang angelegt. | ||
+ | Hier legen wir nun für unsere(n) Icinga 2 Admin(s) jeweils einen User an. Dazu tragen wir Nutzernamen und Passwort in die zugehörigen Felder ein und klicken dann auf die Schaltfläche **Nutzer erstellen**. | ||
+ | {{ : | ||
+ | Anschließend weißen wir dem zuständigen Administrator die Anmin-Rechte an NagVis zu. Nach Auswahl des Benutzerkontos und Zuweisung der Rechte klicken wir auf die Schaltfläche **Nutzer bearbeiten**. | ||
+ | Den ungenutzten Gastzugang löschen wir nun noch, indem wir den Nutzernamen beim Menüpunkt **//Nutzer löschen// | ||
- | ==== muell ==== | + | Zu guter Letzt ändern wir das Standardpasswort des Accounts **admin** noch ab. Dazu wählen wir aus dem **Nutzermenü** rechts oben den Menüpunkt **// |
- | + | {{ :centos: | |
- | Diese Anweisungen gelten für eine Neuinstallation. | + | |
- | Wenn Sie Ihre alte NagVis-Installation aktualisieren, | + | |
- | SCHRITT 0: das System vorbereiten | + | |
- | Stellen Sie sicher, dass Ihr System den Systemanforderungen entspricht. | + | |
- | SCHRITT 1: NagVis herunterladen | + | |
- | Holen Sie sich NagVis, die neueste Version finden Sie unter www.nagvis.org. | + | |
- | SCHRITT | + | |
- | tar xvzf nagvis-1.8.x.tar.gz | + | Nach Eingabe des alten Passwortes **admin** tragen wir 2x unser neues Passwort ein und klicken dann auf die Schaltfläche **Passwort ändern**. |
- | SCHRITT 3: verschieben Sie das entpackte NagVis-Verzeichnis | + | {{ :centos: |
- | Platzieren Sie den NagVis-Verzeichnisbaum irgendwo in Ihrem System. In den meisten Fällen ist / | + | |
- | mv nagvis-1.8.x / | + | ==== Demokartenmaterial ==== |
+ | Die mitgelieferten Karten dienen unter anderem dazu, sich über die Möglichkeiten von **NagVis** zu informieren bzw. dienen als Vorlagen für eigene Karten. Wir löschen daher die Kartendefinitionen **__nicht__**, | ||
- | Sie sollten mindestens die folgenden Dateien und Verzeichnisse unter dem nagvis-Verzeichnis | + | Als erstes legen wir uns das Backup-Verzeichnis |
+ | # mkdir / | ||
- | ls -l /usr/local/nagvis | + | Dann verschieben wir die map-Konfigurationsdateien in dieses Verzeichnis. |
- | | + | # mv /usr/share/nagvis/etc/maps/* / |
- | LICENSE | + | |
- | README | + | |
- | share | + | |
- | var | + | |
- | Verschieben Sie KEINE Dateien oder Verzeichnisse innerhalb | + | Abschließend deaktivieren wir noch die Parameter |
- | SCHRITT 4: konfigurieren Sie NagVis | + | # vim / |
- | Wechseln Sie zur neuen Position des NagVis-Verzeichnisses | + | |
- | cd / | + | < |
- | Eine Beispiel-Hauptkonfigurationsdatei finden Sie als etc/ | + | ; ---------------------------- |
+ | ; Rotation pool definitions | ||
+ | ; ---------------------------- | ||
- | cp etc/ | + | ; in this example the browser switches between the maps demo and demo2 every 15 |
+ | ; seconds, the rotation is enabled by url: index.php? | ||
+ | ; Django : 2015-04-20 | ||
+ | ; default: [rotation_demo] | ||
+ | ; These steps are rotated. The single steps may have optional prefixes like " | ||
+ | ; which are used as display text on the index pages rotation list. | ||
+ | ; You may also add external URLs as steps. Simply enclose the url using [] | ||
+ | ; instead of the map name. | ||
+ | ; Django : 2015-04-20 | ||
+ | ; default: maps=" | ||
+ | ; rotation interval (seconds) | ||
+ | ; Django : 2015-04-20 | ||
+ | ; default: interval=15 | ||
- | Nun können Sie dieses Datei mit Ihrem bevorzugten Texteditor ändern � ich benutze vi: | + | ...</ |
- | vi etc/nagvis.ini.php | + | ==== Automap ==== |
+ | Im folgendem Konfigurationsbeispiel, | ||
- | Die meisten Zeilen in der frisch kopierten nagvis.ini.php sind auskommentiert (beginnen mit einem Semikolon). Wenn Sie verschiedene Einstellungen setzen möchten, dann entfernen Sie das Kommentarzeichen und ändern Sie den Wert. | + | Als erstes wählen wir aus dem NagVis-Menü **Optionen** den Menüpunkt |
- | Informationen zu allen möglichen Werten finden Sie in der Formatbeschreibung der Hauptkonfigurationsdatei. | + | |
- | SCHRITT 5: konfigurieren des Web-Servers | + | |
- | Seit NagVis 1.5 ist es notwendig, den Web-Server zu konfigurieren, | + | {{ : |
- | Kopieren Sie einfach die Datei in das conf.d-Verzeichnis Ihres Web-Servers. Dies ist z.B. / | + | |
- | cp etc/apache2-nagvis.conf-sample / | + | Hier wählen wir dann die **Standard-Datenquelle** aus und klicken anschließend auf die Schaltfläche **Speichern**. |
- | Nun müssen Sie die Datei öffnen und auf Ihre Anforderungen anpassen. Es ist wichtig, die Makros @NAGVIS_WEB@ und @NAGVIS_PATH@ durch die korrekten Werte zu ersetzen. | + | {{ : |
- | In diesem Beispiel müssen Sie @NAGVIS_WEB@ durch /nagvis und @NAGVIS_PATH@ durch / | + | |
- | SCHRITT 6: Berechtigungen | + | Nun definieren wir uns eine eigene Karte vom Typ **automap**; |
- | Dies ist sehr wichtig für eine funktionierende Installation. | + | |
- | Prüfen Sie zuerst, welcher Unix-Account für Ihren Webserver benutzt wird (in meinem Fall wwwrun). Wenn Sie nicht wissen, mit welchem Benutzer der Webserver läuft, dann werfen Sie einen Blick in die Webserver-Konfiguration. Im Falle von Apache können Sie dies mit dem folgenden Befehl tun: | + | {{ : |
- | Ubuntu | + | Zum Generieren der Automap befüllen wir beim Menüpunkt **Karte erstellen** die Felder **//ID (Interner Name)//** und **// |
- | grep -e ' | + | {{ : |
- | SuSE/ | + | Basieren auf den Monitoringkonfiguration unserer **Icinga 2** Umgebung wird nach einer kurzen Zeit die generierte **automap** angezeigt. |
- | grep -e ' | + | {{ : |
- | Wenn Ihre Konfigurationsdatei an anderer Stelle liegt, dann passen Sie den obigen Befehl an. | + | Sobald wir mit der Maus übe einen der überwachten Host streichen, werden weitere Details des Hosts eingeblendet. |
- | Gewähren Sie nun dem Webserver-Benutzer Berechtigungen für das NagVis-Verzeichnis (in meinem Fall sind die Pfade wie folgt): | + | |
- | chown wwwrun:www / | + | {{ :centos: |
- | chmod 664 / | + | |
- | chmod 775 / | + | |
- | chmod 664 / | + | |
- | chmod 775 / | + | |
- | chmod 664 / | + | |
- | chmod 775 / | + | |
- | chmod 664 / | + | |
- | chmod 775 / | + | |
- | chmod 664 / | + | |
- | chmod 775 / | + | |
- | chmod 664 / | + | |
- | Es ist möglich, restriktivere Berechtigungen für die Dateien zu setzen, aber für die meisten Setups sollten die Beispiele ausreichen. Verändern Sie die Werte nur dann, wenn Sie wissen, was Sie tun! | + | Klicken wir auf einen Host, gelangen wir direkt auf die Icinga Web 2 Detailseite des Hosts. |
- | SCHRITT 7: konfigurieren Sie die Maps | + | |
- | Es gibt zwei Wege, NagVis zu konfigurieren. Der erste ist die web-basierte Konfiguration mit Hilfe des NagVis-Frontends (http://< | + | {{ : |
- | Beim zweiten Weg bearbeiten Sie direkt die Konfigurationsdateien mit dem Text-Editor Ihrer Wahl. Die Map-Konfigurationsdateien befinden sich in etc/maps/. Gültige Formate und Werte finden Sie unter Map Config Format Description. | ||
- | SCHRITT 8: betrachten Sie die Maps | ||
- | Sie sollten nun in der Lage sein, Ihre definierten Maps in Ihrem Browser anzusehen: | ||
- | http://< | + | ====== Links ====== |
+ | * **⇐ [[centos:web_c7: | ||
+ | * **[[centos: | ||
+ | * **[[wiki: | ||
+ | * **[[http://dokuwiki.nausch.org/doku.php/ | ||
- | (z.B. http:// | ||
- | Viel Spaß und bitte melden Sie Bugs! |