The Main Configuration file is designed in plain text "ini"-like format.
There are sections which are marked by the surrounding [] and variables which have an asigned value. The variables has to be in the correct section so you have to ensure to have uncommented the section too.
Semicolons (;
) are used to mark comments.
Sections and variables with a semicolon before it are commented out and won't be recognized by NagVis.
In a fresh NagVis installation, there is no file with the default configuration. The default configuration is stored in the PHP-Code. If there is a file etc/nagvis.ini.php
which has stored configuration informations it will override the default configurations.
There is a file etc/nagvis.ini.php-sample
with sample configuration values. All values are commented out.
All values which are used in whole NagVis are stored in the global section.
This example shows all values of the global section:
[global] language="english" displayheader=1 refreshtime=60
Value | Default | Description |
---|---|---|
language | english | Select language (german and english aviable by default) |
displayheader | 1 | Show header menu in maps |
refreshtime | 60 | Refresh time of maps or reloading the next map in map rotation |
Default values, which are applied to the maps you use. If there is no value set in the map or an element on the map the default value is used.
This example shows all values of the defaults section:
[defaults] backend="ndomy_1" icons="std_medium" recognizeservices=1 onlyhardstates=0 usegdlibs=1 backgroundcolor="#fff" headertemplate="default" hovertemplate="default" hoverdelay=0 showinlists=1 urltarget="_self"
Value | Default | Description |
---|---|---|
backend | ndomy_1 | Default backend (ID of the backend - copy the text from which <backend-id> stands for in [backend_<backend-id>] ) |
icons | std_medium | Default iconset |
recognizeservices | 1 | Recognize service states in host/hostgroup objects |
onlyhardstates | 0 | Recognize only hard states (not soft) |
backgroundcolor | #fff | Default background color of maps |
usegdlibs | 1 | Use gdlibs (if set to 0, lines will not work, all other types should work fine) |
headertemplate | default | Default header template |
hovertemplate | default | Default hover template |
hoverdelay | 0 | Delay of hover menu appearance in seconds |
showinlists | 1 | Show the maps in lists (dropdowns,index page,...) |
urltarget | _self | Target of the Icon link, this option adapts <a target=""> (_self is same window) |
This are the options for the WUI.
This example shows all values of the wui section:
[wui] autoupdatefreq=25 maplocktime=5 allowedforconfig=EVERYONE
Value | Default | Description |
---|---|---|
autoupdatefreq | 25 | In this interval the map get's backuped by the WUI. |
maplocktime | 5 | Time in minutes a map is locked by an editing user. |
allowedforconfig | EVERYONE | Users which are allowed to change the NagVis configuration (comma seperated list) or EVERYONE (New in 1.2) |
In this section are all needed path variables defined.
This example shows all values of the paths section:
[paths] base="/usr/local/nagios/share/nagvis/" htmlbase="/nagios/nagvis" htmlcgi="/nagios/cgi-bin"
Value | Default | Description |
---|---|---|
base | /usr/local/nagios/share/nagvis/ |
Absolute physical NagVis path |
htmlbase | /nagios/nagvis |
Absolute html NagVis path |
htmlcgi | /nagios/cgi-bin |
Absolute html NagVis cgi path |
The backend sections for define the backends are all named [backend_
.
In the example the backend_id
is ndomy_1
.
Depending on the value in backendtype the valid values for the backends has to be set. In this example it is the ndomy backend.
[backend_ndomy_1] backendtype="ndomy" ; the following options depend on the selected backendtype, in this case it is ndomy dbhost="localhost" dbport=3306 dbname="db_nagios" dbuser="root" dbpass="xxx" dbprefix="nagios_" dbinstancename="default" maxtimewithoutupdate=181 htmlcgi="/nagios/cgi-bin"
Value | Default | Description |
---|---|---|
backendtype | ndomy | type of backend - MUST be set |
dbhost | localhost | Hostname of the NDO Database |
dbport | 3306 | Port of the NDO Database |
dbname | db_nagios | Name of the NDO Database |
dbuser | root | Username for Database Access (only needs read permissions) |
dbpass | root | Password for Database Access (only needs read permissions) |
dbprefix | nagios_ | Prefix of the tables in NDO Database (like defined in ndo2db.cfg) |
dbinstancename | default | Name of the Nagios instance in NDO Database (like defined in ndomod.cfg) |
maxtimewithoutupdate | 180 | Maximum delay in seconds after last update in NDO. NagVis will report Nagios is not running if the delay is reached. |
htmlcgi | /nagios/cgi-bin | Path to the cgi-bin directory of this backend (interesting for multiple NDO backends) (New in 1.2) |
Defines several map rotation pools. In this example the browser switches between the maps demo and demo2 every 15 seconds. The rotation is enabled by url: index.php?rotation=<rotation-id> in this case the rotation id is: "demo"
[rotation_demo] maps="demo,demo2" interval=15
Value | Default | Description |
---|---|---|
maps | List of maps to rotate in this pool. You can also add external URLs surrounded by [ and ] (e.g. maps="demo1,[http://localhost/test.php]". The URL has to be reachable by the server which NagVis is running on. | |
interval | 15 | Map rotation interval in seconds |