Main configuration format description

General Informations

The Main Configuration file is designed in plain text "ini"-like format. There are sections which are marked by the surrounding brackets [] and variables which have an assigned value. The variables have 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 leading semicolon 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 information it will override the default configurations. There is a file etc/nagvis.ini.php-sample with sample configuration values. All values are commented out.

Description of the sections in detail

global

All values which are used througout NagVis are stored in the global section. This example shows all values of the global section:
[global]
language="english"
displayheader=1
refreshtime=60
dateformat="Y-m-d H:i:s"
Value Default Description
language english Select language (german and english available by default)
displayheader 1 Show header menu in maps
refreshtime 60 Refresh time of maps or reloading the next map in map rotation
dateformat Y-m-d H:i:s The format of date and time shown in NagVis. Available options like in date() function of php (New in 1.3)

defaults

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 some 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
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)
hovermenu 1 Enable/Disable the hover menu (New in 1.3)
hovertemplate default Default hover template
hovertimeout 5 Default hover menu ajax request timeout in seconds (New in 1.3)
hoverdelay 0 Delay of hover menu appearance in seconds
hoverchildsshow 1 Enable/Disable the child objects in hover menu (New in 1.3)
hoverchildssort a Sort method of the child objects (Available: "s": State, "a": Alphabet ) (New in 1.3)
hoverchildsorder asc Order of the child objects (Available: asc/desc) (New in 1.3)
hoverchildslimit 10 Limit hover child objects to this maximum value (New in 1.3)

wui

These 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 gets backuped by the WUI.
maplocktime 5 Time in minutes a map is locked by an editing user.
allowedforconfig EVERYONE Users who are allowed to change the NagVis configuration (comma seperated list) or EVERYONE

paths

In this section all needed path variables are 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

backend_*

The backend sections to 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 have 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)

rotation_*

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= 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

automap

(New in 1.3) Sets the automap options.
[automap]
showinlists=1
defaultroot="localhost"
graphvizpath="/usr/local/bin"
defaultparams="&maxLayers=2"
Value Default Description
showinlists 1 Enable/Disable the automap in map lists (map index page, dropdown menus in header)
defaultroot localhost Default value for the root object. For details see Automap documentation
graphvizpath /usr/local/bin If the graphviz binaries (dot,neato,twopi,...) could not be found in the PATH the path has to be set here
defaultparams &maxLayers=2 These are the parameters for the automap views and links in the lists (map index page, dropdown menus in header)