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 nagvis/etc/config.ini.php
which has stored configuration informations it will override the default configurations.
There is a file nagvis/etc/config.ini.php.dist
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" rotatemaps=0 maps="demo,demo2" displayheader=1 refreshtime=60
Value | Default | Description |
---|---|---|
language | english | Select language (german and english aviable by default) |
rotatemaps | 0 | Enable/Disable map rotation. This value can be overridden on loading a map by the HTTP-GET parameter rotate=1/0 (e.g. index.php?map=demo&rotate=1 ). |
maps | demo,demo2 | Maps to rotate if map rotation is active. Can also be external URLs here. The external URLs must be surrounded by [], e.g. [http://localhost/nagios/nagvis/externalpage.html] |
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" 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
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. |
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_<backend-id>]
. 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
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. |