Map configuration format description

General Information

The NagVis configuration file format is very similiar to the format used by Nagios(TM). Configuration statements start with the keyword "define" followed by a type field and a left curly bracket ({). Every following line defines variable-value pairs, separated by a ( = ) until a right curly bracket (}) is found. Hashes (#) are used to mark comments, note that a comment line MUST start with a hash not with other chars like whitespaces!

Description of the object types

Global

The first definition in every config file should be of the special type "global". Options which are defined at this paragraph are valid for the whole map and are getting inherited to other types defined later.
Example with all options which have to be set:
define global {
  allowed_user=EVERYONE
  allowed_for_config=nagiosadmin
  map_image=lan.png
}
Value Default Description
allowed_user Comma separated list of Nagios users who are allowed to view this map. Can be "EVERYONE" for no permission check.
allowed_for_config Comma separated list of Nagios users who are allowed to edit this map. Can be "EVERYONE" for no permission check.
map_image The map image displayed in the background of the NagVis map, for example a Visio (TM) drawing.
alias map name The alias is the label for each map. If it is defined it is shown everywhere in NagVis frontend and WUI
backend_id inherited (nagvis.ini.php) Backend-ID defined in Main Configuration file where NagVis should search for the object states. If this parameter is not given, the Backend defined as "defaultbackend" at the Main Configuration file is used.
background_color inherited (nagvis.ini.php) Background color of this map. If this is not set backgroundcolor from Main Configuration file is taken.
header_template inherited (nagvis.ini.php) header template to be used on ths map
hover_menu inherited (nagvis.ini.php) Enable/Disable the hover menu (New in 1.3)
hover_delay inherited (nagvis.ini.php) Delay of hover menu appearance in seconds
hover_template inherited (nagvis.ini.php) Default hover template to be used on this map
hover_timeout inherited (nagvis.ini.php) Default hover menu ajax request timeout in seconds (New in 1.3)
hover_childs_show inherited (nagvis.ini.php) Enable/Disable displaying child objects (New in 1.3)
hover_childs_sort inherited (nagvis.ini.php) Sort method of child objects (New in 1.3)
hover_childs_order inherited (nagvis.ini.php) Order direction of child objects (New in 1.3)
hover_childs_limit inherited (nagvis.ini.php) Number of maximum children to be displayed (New in 1.3)
iconset inherited (nagvis.ini.php) Iconset to use as default for all objects placed on the map. Can be overwritten on a per object base.
In the example "std_small" is used which means an OK state will be displayed using "std_small_ok.png", a CRITICAL state will be displayed by using "std_small_critical.png" and so on.
in_maintenance 0 Enable/Disable the maintenance mode of this map. If a map is in maintenance mode only a message gets displayed instead of the map.
label_show 0 Enable/Disable labels for the maps objects
label_x -20 Default x-position of the labels in px (with prefix + or - relative to the upper left corner of the icons, otherwise absolute position)
label_y +20 Default y-position of the labels in px (with prefix + or - relative to the upper left corner of the icons, otherwise absolute position)
label_width auto Default width of the labels in px
label_background transparent Default background color of the labels
label_border #000000 Default border color of the labels
only_hard_states inherited (nagvis.ini.php) Sets whether soft states should be ignored. Default setting is 0.
recognize_services inherited (nagvis.ini.php) Sets whether the states of the services on hosts, hostgroup objetcs should be recognized. If this is not given in the config it's set to 1.
show_in_lists inherited (nagvis.ini.php) Show the maps in lists (dropdowns, index page, ...)
url_target _self Target of the Icon link, this option adapts (_self is same window)
usegdlibs inherited (nagvis.ini.php) Activates the usage of GD-Libs on this map (lines can only be used if GD-Libs are activated)

Host

Example with all options which have to be set (note that options already defined in the global section are optional):
define host {
  host_name=localhost
  x=100
  y=200
}
Value Default Description
host_name Name of the host as defined in Nagios
x X axis coordinate
y Y axis coordinate
backend_id inherited (global) Backend-ID defined in Main Configuration file where NagVis should search for the object states. If this parameter is not given, the Backend which was set in global section of the map is taken.
hover_menu inherited (nagvis.ini.php) Enable/Disable the hover menu (New in 1.3)
hover_delay inherited (nagvis.ini.php) Delay of hover menu appearance in seconds
hover_template inherited (global) Hover template for this object
hover_timeout inherited (nagvis.ini.php) Hover menu ajax request timeout in seconds for this object (New in 1.3)
hover_url URL which should be displayed in hover menu instead of standard information.
hover_childs_show inherited (nagvis.ini.php) Enable/Disable displaying child objects (New in 1.3)
hover_childs_sort inherited (nagvis.ini.php) Sort method of child objects (New in 1.3)
hover_childs_order inherited (nagvis.ini.php) Order direction of child objects (New in 1.3)
hover_childs_limit inherited (nagvis.ini.php) Number of maximum children to be displayed (New in 1.3)
iconset inherited (global) Special iconset. Is inherited from global paragraph if not specified.
label_show inherited (global) Enable/Disable label for this object
label_text [name] Text of the label. Available macros: [name], [output]
label_x inherited (global) Label X-Position (with prefix + or - relative to the upper left corner of the icons, otherwise absolute position)
label_y inherited (global) Label Y-Position (with prefix + or - relative to the upper left corner of the icons, otherwise absolute position)
label_width inherited (global) Width of the label in px
label_background inherited (global) Background color of the label
label_border inherited (global) Border color of the labels
line_type If this is set, the object will be displayed as line.
only_hard_states inherited (global) Sets whether soft states should be ignored. Default setting is 0.
recognize_services inherited (global) Defines if the services of the host affect the displayed state. If set to "1" a critical service on the host will result in a host state display as critical too. If set to "0" only the Nagios Host State (UP or DOWN) will be used and the services of the host will be ignored.
url URL where the Icon should link to. Default link is to the Nagios CGIs. Macro [host_name] is available.
url_target _self Target of the Icon link, this option adapts <a target=""> (_self is same window). Macro [name] is available.
use Comma separated list of object templates to use. For details see [[#template]]
z 1 The z option defines the order of icons which are stacked on top of each other. The highest value will be displayed on top. The background image has the value of 0. So valid values should be above or equal 1.

Service

Example with all options which have to be set (note that option already defined in the global section are optional):
define service {
  host_name=localhost
  service_description=ping
  iconset=std_big
  x=100
  y=200
}
Value Default Description
host_name Name of the host as defined in Nagios
service_description Name of the service as defined in Nagios
x X axis coordinate
y Y axis coordinate
backend_id inherited (global) Backend-ID defined in Main Configuration file where NagVis should search for the object states. If this parameter is not given, the Backend which was set in global section of the map is taken.
hover_menu inherited (nagvis.ini.php) Enable/Disable the hover menu (New in 1.3)
hover_url URL which should be displayed in hover menu instead of standard information
hover_template inherited (global) Hover template for this object
hover_timeout inherited (nagvis.ini.php) Hover menu ajax request timeout in seconds for this object (New in 1.3)
hover_delay inherited (nagvis.ini.php) Delay of hover menu appearance in seconds
hover_childs_show inherited (nagvis.ini.php) Enable/Disable displaying child objects (New in 1.3)
hover_childs_sort inherited (nagvis.ini.php) Sort method of child objects (New in 1.3)
hover_childs_order inherited (nagvis.ini.php) Order direction of child objects (New in 1.3)
hover_childs_limit inherited (nagvis.ini.php) Number of maximum children to be displayed (New in 1.3)
iconset inherited (global) Special iconset. Is inherited from global paragraph if not specified.
label_show inherited (global) Enable/Disable label for this object
label_text [name] [service_description] Text of the label. Available macros: [name], [service_description], [output]
label_x inherited (global) Label X-Position (with prefix + or - relative to the upper left corner of the icons, otherwise absolute position)
label_y inherited (global) Label Y-Position (with prefix + or - relative to the upper left corner of the icons, otherwise absolute position)
label_width inherited (global) Width of the label in px
label_background inherited (global) Background color of the label
label_border inherited (global) Border color of the labels
line_type If this is set, the object will be displayed as line.
only_hard_states inherited (global) Sets whether soft states should be ignored. Default setting is 0.
url URL where the Icon should link to. Default link is to the Nagios CGIs. Available macros: [host_name], [service_description],
url_target _self Target of the Icon link, this option adapts <a target=""> (_self is same window). Available macros: [name], [service_description],
use Comma separated list of object templates to use. For details see [[#template]]
z 1 The z option defines the order of icons which are stacked on top of each other. The highest value will be displayed on top. The background image has the value of 0. So valid values should be above or equal 1.

Hostgroup

Example with all options which have to be set (note that options already defined in the global section are optional):
define hostgroup {
  hostgroup_name=servers
  x=100
  y=200
}
Value Default Description
hostgroup_name Name of the hostgroup as defined in Nagios
x X axis coordinate
y Y axis coordinate
backend_id inherited (global) Backend-ID defined in Main Configuration file where NagVis should search for the object states. If this parameter is not given, the Backend which was set in global section of the map is taken.
hover_menu inherited (nagvis.ini.php) Enable/Disable the hover menu (New in 1.3)
hover_url URL which should be displayed in hover menu instead of standard information
hover_template inherited (global) Hover template for this object
hover_timeout inherited (nagvis.ini.php) Hover menu ajax request timeout in seconds for this object (New in 1.3)
hover_delay inherited (nagvis.ini.php) Delay of hover menu appearance in seconds
hover_childs_show inherited (nagvis.ini.php) Enable/Disable displaying child objects (New in 1.3)
hover_childs_sort inherited (nagvis.ini.php) Sort method of child objects (New in 1.3)
hover_childs_order inherited (nagvis.ini.php) Order direction of child objects (New in 1.3)
hover_childs_limit inherited (nagvis.ini.php) Number of maximum children to be displayed (New in 1.3)
iconset inherited (global) Special iconset. Is inherited from global paragraph if not specified.
label_show inherited (global) Enable/Disable label for this object
label_text [name] Text of the label. Available macros: [name], [output]
label_x inherited (global) Label X-Position (with prefix + or - relative to the upper left corner of the icons, otherwise absolute position)
label_y inherited (global) Label Y-Position (with prefix + or - relative to the upper left corner of the icons, otherwise absolute position)
label_width inherited (global) Width of the label in px
label_background inherited (global) Background color of the label
label_border inherited (global) Border color of the labels
line_type If this is set, the object will be displayed as line.
only_hard_states inherited (global) Sets whether soft states should be ignored. Default setting is 0.
recognize_services inherited (global) Defines if the services of the hosts affect the displayed state. If set to "1" a critical service on one of the host will result in a hostgroup state display as critical too. If set to "0" only the Nagios Host State (UP or DOWN) will be used and the services of the hosts will be ignored.
url URL where the Icon should link to. Default link is to the Nagios CGIs. Available macros: [hostgroup_name]
url_target _self Target of the Icon link, this option adapts <a target=""> (_self is same window). Available macros: [name]
use Comma separated list of object templates to use. For details see [[#template]]
z 1 The z option defines the order of icons which are stacked on top of each other. The highest value will be displayed on top. The background image has the value of 0. So valid values should be above or equal 1.

Servicegroup

Example with all options which have to be set (note that options already defined in the global section are optional):
define servicegroup {
  servicegroup_name=servicegroup1
  x=100
  y=200
}
Value Default Description
servicegroup_name Name of the servicegroup as defined in Nagios.
x X axis coordinate
y Y axis coordinate
backend_id inherited (global) Backend-ID defined in Main Configuration file where NagVis should search for the object states. If this parameter is not given, the Backend which was set in global section of the map is taken.
hover_menu inherited (nagvis.ini.php) Enable/Disable the hover menu (New in 1.3)
hover_url URL which should be displayed in hover menu instead of standard information
hover_template inherited (global) Hover template for this object
hover_timeout inherited (nagvis.ini.php) Hover menu ajax request timeout in seconds for this object (New in 1.3)
hover_delay inherited (nagvis.ini.php) Delay of hover menu appearance in seconds
hover_childs_show inherited (nagvis.ini.php) Enable/Disable displaying child objects (New in 1.3)
hover_childs_sort inherited (nagvis.ini.php) Sort method of child objects (New in 1.3)
hover_childs_order inherited (nagvis.ini.php) Order direction of child objects (New in 1.3)
hover_childs_limit inherited (nagvis.ini.php) Number of maximum children to be displayed (New in 1.3)
iconset inherited (global) Special iconset. Is inherited from global paragraph if not specified.
label_show inherited (global) Enable/Disable label for this object
label_text [name] Text of the label. Available macros: [name], [output]
label_x inherited (global) Label X-Position (with prefix + or - relative to the upper left corner of the icons, otherwise absolute position)
label_y inherited (global) Label Y-Position (with prefix + or - relative to the upper left corner of the icons, otherwise absolute position)
label_width inherited (global) Width of the label in px
label_background inherited (global) Background color of the label
label_border inherited (global) Border color of the labels
line_type If this is set, the object will be displayed as line.
only_hard_states inherited (global) Sets whether soft states should be ignored. Default setting is 0.
url URL where the Icon should link to. Default link is to the Nagios CGIs. Available macros: [servicegroup_name]
url_target _self Target of the Icon link, this option adapts <a target=""> (_self is same window). Available macros: [name]
use Comma separated list of object templates to use. For details see [[#template]]
z 1 The z option defines the order of icons which are stacked on top of each other. The highest value will be displayed on top. The background image has the value of 0. So valid values should be above or equal 1.

Map

Example with all options which have to be set (note that options already defined in the global section are optional):
define map {
  map_name=webserver
  x=77
  y=156
}
Value Default Description
map_name Name of the NagVis map cfg file (without .cfg extionsion)
x X axis coordinate
y Y axis coordinate
hover_menu inherited (nagvis.ini.php) Enable/Disable the hover menu (New in 1.3)
hover_url URL which should be displayed in hover menu instead of standard information
hover_template inherited (global) Hover template for this object
hover_timeout inherited (nagvis.ini.php) Hover menu ajax request timeout in seconds for this object (New in 1.3)
hover_delay inherited (nagvis.ini.php) Delay of hover menu appearance in seconds
hover_childs_show inherited (nagvis.ini.php) Enable/Disable displaying child objects (New in 1.3)
hover_childs_sort inherited (nagvis.ini.php) Sort method of child objects (New in 1.3)
hover_childs_order inherited (nagvis.ini.php) Order direction of child objects (New in 1.3)
hover_childs_limit inherited (nagvis.ini.php) Number of maximum children to be displayed (New in 1.3)
iconset inherited (global) Special iconset. Is inherited from global paragraph if not specified.
label_show inherited (global) Enable/Disable label for this object
label_text [name] Text of the label. Available macros: [name], [output]
label_x inherited (global) Label X-Position (with prefix + or - relative to the upper left corner of the icons, otherwise absolute position)
label_y inherited (global) Label Y-Position (with prefix + or - relative to the upper left corner of the icons, otherwise absolute position)
label_width inherited (global) Width of the label in px
label_background inherited (global) Background color of the label
label_border inherited (global) Border color of the labels
only_hard_states inherited (global) Sets whether soft states should be ignored. Default setting is 0.
url URL where the Icon should link to. Default link is to the Nagios CGIs. Available macros: [map_name]
url_target _self Target of the Icon link, this option adapts <a target=""> (_self is same window). Available macros: [name]
use Comma separated list of object templates to use. For details see [[#template]]
z 1 The z option defines the order of icons which are stacked on top of each other. The highest value will be displayed on top. The background image has the value of 0. So valid values should be above or equal 1.

Textbox

Example with all possible options:
define textbox {
  text="This is an informative text which is freely placeable on the map, HTML can also used for formating purposes"
  x=200
  y=100
  w=200
}
Value Default Description
text Your own text, HTML is possible. There is one macro [refresh_counter], it shows the time until the next reload/rotate dynamically.
w Width of the textbox in px (pixels). Set to "auto" for auto scaling.
x X axis coordinate
y Y axis coordinate
background_color #C0C0C0 Background color of the textbox, can also be transparent
border_color #000000 Background color of the textbox, can also be transparent (New in 1.3)
use Comma separated list of object templates to use. For details see Template
z 1 The z option defines the order of icons which are stacked on top of each other. The highest value will be displayed on top. The background image has the value of 0. So valid values should be above or equal 1.

Shape

Example with all values which have to be set:
define shape {
  icon="test"
  x=200
  y=100
}
Value Default Description
icon Filename of the shape. Shapes have to be located in the shape directory (default: nagvis/images/shapes)
x X axis coordinate
y Y axis coordinate
hover_url URL which should be displayed when hovering over the image. By default there is no action on hover.
hover_delay inherited (nagvis.ini.php) Delay of hover menu appearance in seconds
url URL where the Icon should link to. By default there is no link.
url_target _self Target of the Icon link, this option adapts <a target=""> (_self is same window)
use Comma separated list of object templates to use. For details see Template
z 1 The z option defines the order of icons which are stacked on top of each other. The highest value will be displayed on top. The background image has the value of 0. So valid values should be above or equal 1

Template

In NagVis 1.2 there is a new object type named template. With this object you have the ability to define all values expect the must-have-attributes in one object for many others. You can set all attributes to the value you need and inherit them with the use attribute to each object. At the moment the template objects have to be defined directly in the files, the WUI doesn't support it. Maybe it'll be added in following versions. Example with all values which have to be set:
define template {
  name=generic-template
}
Value Default Description
name Template name (simple string without space - has to be unique within the map)
... All values which are available in the objects which inherit this template