NagVis Main Configuration File Format Description

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.

Semicolons (;) are used to mark comments.

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.

Description of the single sections in detail

global

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
headercount=4
usegdlibs=1 
refreshtime=60
Value Default Description
language english Select language
rotatemaps 0 Rotate maps
maps demo,demo2 Maps to rotate if map rotation is active
displayheader 1 Show header menu
headercount 4 Options per line in header
usegdlibs 1 Use gdlibs (if set to 0, lines will not work, all other types should work fine)
refreshtime 60 Refresh time of pages

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 all values of the defaults section:

[defaults]
backend="ndomy_1"
icons="std_medium"
recognizeservices=1
onlyhardstates=0
backgroundcolor="#fff"
Value Default Description
backend ndomy_1 default backend (id of the default backend)
icons std_medium default iconset
recognizeservices 1 recognize service states in host/hostgroup objects
onlyhardstates 0 recognize only hard states (not soft)
backgroundcolor #fff background color of maps

wui

This are the options for the WUI.

This example shows all values of the wui section:

[wui]
autoupdatefreq=25
Value Default Description
autoupdatefreq 25 Auto update frequency

paths

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

backend_*

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 of the NDO Database in Seconds

includes

Include files needed by NagVis

[includes]
header="header.nagvis.inc"
Value Default Description
header header.nagvis.inc Header include file is searched in nagvis/etc path