# 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!

## Object types

- Global
- Host
- Service
- Hostgroup
- Servicegroup
- Map
- Textbox
- Shape
- Line (New in 1.5)
- Template

## 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 {
     map_image=lan.png
    }

Value | Default | Description
--- | --- | ---
allowed_for_config |  | Comma separated list of Nagios users who are allowed to edit this map. Can be "EVERYONE" for no permission check. (Deprecated in 1.5)
allowed_user |  | Comma separated list of Nagios users who are allowed to view this map. Can be "EVERYONE" for no permission check. (Deprecated in 1.5)
map_image |  | The name of the map image displayed in the background of the NagVis map, for example a Visio (TM) drawing. The value can even be "none" or empty for no background image. New in 1.5: It is also possible to add URLs here. The URL has to be surrounded by [ and ].
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.
context_menu | inherited (nagvis.ini.php) | Enable/Disable the context menu on your map objects.
context_template | inherited (nagvis.ini.php) | Default context template to be used on this map
event_background | inherited (nagvis.ini.php) | Enable/Disable changing background color on state changes (Configured color is shown when summary state is PENDING, OK or UP).
event_highlight | inherited (nagvis.ini.php) | Enable/Disable highlighting of the state changing object by adding a flashing border.
event_highlight_duration | inherited (nagvis.ini.php) | Set the highlight duration in milliseconds
event_highlight_interval | inherited (nagvis.ini.php) | Set the highlight interval in milliseconds
event_log | inherited (nagvis.ini.php) | Enable/Disable the eventlog in the new javascript frontend. The eventlog keeps track of important actions and information.
event_log_level | inherited (nagvis.ini.php) | Loglevel of the eventlog (Available: debug, info, warning, critical).
event_log_height | inherited (nagvis.ini.php) | Height of the javascript eventlog in px
event_log_hidden | inherited (nagvis.ini.php) | Hide/Show the eventlog on map loading
event_scroll | inherited (nagvis.ini.php) | Enable/Disable scrolling to the icon which changed the state when the icon is out of the visible scope.
event_sound | inherited (nagvis.ini.php) | Enable/Disable sound signals on state changes.
grid_show | inherited (nagvis.ini.php) | Enable/Disable a grid to make the alignment of objects easier in the WUI. Objects are aligned to the upper left corner after moving. (New in 1.5)
grid_color | inherited (nagvis.ini.php) | The color of the grid lines. (New in 1.5)
grid_steps | inherited (nagvis.ini.php) | Scale of the grid in px. (New in 1.5)
header_menu | inherited (nagvis.ini.php) | Enable/Disable the header menu
header_template | inherited (nagvis.ini.php) | header template to be used on ths map
header_fade | inherited (nagvis.ini.php) | Enable/Disable the fade effect of the submenus in the header menu (When the used header menu supports that option). (New in 1.5.2)
hover_menu | inherited (nagvis.ini.php) | Enable/Disable the hover menu
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 (Deprecated in 1.4)
hover_childs_show | inherited (nagvis.ini.php) | Enable/Disable displaying child objects
hover_childs_limit | inherited (nagvis.ini.php) | Number of maximum children to be displayed. Set to -1 to disable the limit.
hover_childs_order | inherited (nagvis.ini.php) | Order direction of child objects
hover_childs_sort | inherited (nagvis.ini.php) | Sort method of child objects
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. The color should be given in hexcode. Can also be "transparent".
label_border | #000000 | Default border color of the labels. The color should be given in hexcode. Can also be "transparent".
label_style |  | Custom styling for the label text. To be given like HTML style attribute contents. E.g. `font-family:sans;font-weight:bold;` (New in 1.5)
line_type |  | Specifies the type of line when view_type=line. Valid values are: "11" for lines with one arrow at the end of a line. "10" for lines with two arrows pointing to each other in the middle of the line. "12" for plain lines without arrow. (New in 1.5)
line_arrow | forward | This defines the arrows at the end of the line. At the moment this attribute is only being used for the lines between hosts on the automap. Possible values: forward, back, both, none (New in 1.5.2).
line_width | 3 | This defines the width of the line in px when this object is being displayed as line.
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 objects should be recognised. 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, ...)
stylesheet | inherited (nagvis.ini.php) | Filename of the custom stylesheet to use on the maps (The file needs to be located in the share/nagvis/styles directory) (New in 1.5)
url_target | _self | Target of the Icon link, this option adapts <a target=""> (_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) (Deprecated in 1.4)

### 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.
context_menu | inherited (nagvis.ini.php) | Enable/Disable the context menu for this object.
context_template | inherited (nagvis.ini.php) | Context template for this object.
hover_menu | inherited (nagvis.ini.php) | Enable/Disable the hover menu
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
hover_url |  | URL which should be displayed in hover menu instead of standard information. There are some macros available: [host_name]: This macro stands for the object name.
hover_childs_show | inherited (nagvis.ini.php) | Enable/Disable displaying child objects
hover_childs_sort | inherited (nagvis.ini.php) | Sort method of child objects
hover_childs_order | inherited (nagvis.ini.php) | Order direction of child objects
hover_childs_limit | inherited (nagvis.ini.php) | Maximum number of children to be displayed. Set to -1 to disable the limit.
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], [alias], [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. The color should be given in hexcode. Can also be "transparent".
label_border | inherited (global) | Border color of the labels. The color should be given in hexcode. Can also be "transparent".
label_style | inherited (global) | Custom styling for the label text. To be given like HTML style attribute contents. E.g. `font-family:sans;font-weight:bold;` (New in 1.5)
line_type | inherited (global) | Specifies the type of line when view_type=line. Valid values are: "11" for lines with one arrow at the end of a line. "10" for lines with two arrows pointing to each other in the middle of the line. "12" for plain lines without arrow. (New in 1.5)
line_arrow | inherited (global) | This defines the arrows at the end of the line. At the moment this attribute is only being used for the lines between hosts on the automap. Possible values: forward, back, both, none (New in 1.5.2).
line_width | inherited (global) | This defines the width of the line in px when this object is being 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. Macros [host_name], [htmlcgi] and [htmlbase] are available. The value can be set to "#" to disable the link.
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 objects
view_type | icon | This option defines the type of view for this object. Possible values are: "icon" or "line". Before NagVis 1.4 you could change the view of an object by setting the line_type. Since NagVis 1.4 you need to set the view_type for changing icons to lines.
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. Note: To prevent conflicts with the header navigation you should keep this value below 100.

### 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.
context_menu | inherited (nagvis.ini.php) | Enable/Disable the context menu for this object.
context_template | inherited (nagvis.ini.php) | Context template for this object.
gadget_url |  | The value can be a gadget script in gadget path (`nagvis/gadgets`) e.g. "std_speedometer.php" or a full URI to a gadget like script surrounded by brackets e.g. "[http://127.0.0.1/nagvis/gadgets/std_speedometer.php]". For details about gadgets see here. This option is only recognised when view_type="gadget" is set.
gadget_scale | 100 | The scale of the gadget. Default scale is 100 (percent). The gadgets should be able to be resized by this parameter
gadget_opts |  | Optional gadget specific params. The contents can be freely defined for each gadget. The value is processed as GET param "opts". We recommend to use a var/val format like this: key1=val1,key2=val2. Then you can easily split this string to an array in the gadget.
hover_menu | inherited (nagvis.ini.php) | Enable/Disable the hover menu
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
hover_delay | inherited (nagvis.ini.php) | Delay of hover menu appearance in seconds
hover_url |  | URL which should be displayed in hover menu instead of standard information. There are some macros available: [host_name]: This macro stands for the object name. [service_description]: This macro stands for the service description and will only be replaced in service objects.
hover_childs_show | inherited (nagvis.ini.php) | Enable/Disable displaying child objects
hover_childs_sort | inherited (nagvis.ini.php) | Sort method of child objects
hover_childs_order | inherited (nagvis.ini.php) | Order direction of child objects
hover_childs_limit | inherited (nagvis.ini.php) | Maximum number of children to be displayed. Set to -1 to disable the limit.
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], [alias], [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. The color should be given in hexcode. Can also be "transparent".
label_border | inherited (global) | Border color of the labels. The color should be given in hexcode. Can also be "transparent".
label_style | inherited (global) | Custom styling for the label text. To be given like HTML style attribute contents. E.g. `font-family:sans;font-weight:bold;` (New in 1.5)
line_type | inherited (global) | Specifies the type of line when view_type=line. Valid values are: "11" for lines with one arrow at the end of a line. "10" for lines with two arrows pointing to each other in the middle of the line. "12" for plain lines without arrow. (New in 1.5)
line_arrow | inherited (global) | This defines the arrows at the end of the line. At the moment this attribute is only being used for the lines between hosts on the automap. Possible values: forward, back, both, none (New in 1.5.2).
line_width | inherited (global) | This defines the width of the line in px when this object is being displayed as line.
line_cut | 0.5 | Lines with two parts have the cut in the middle of the line. This equates to a line cut value of "0.5". It is possible to relocate the cut by changing this value. Valid values are 0.0 to 1.0. (New in 1.5.2)
line_label_pos_in | 0.5 | Weathermap lines have their labels in the middle of the line by default. This equates to a value of "0.5". It is possible to relocate the cut by changing this value. Valid values are 0.0 to 1.0. (New in 1.5.2)
line_label_pos_out | 0.5 | Weathermap lines have their labels in the middle of the line by default. This equates to a value of "0.5". It is possible to relocate the cut by changing this value. Valid values are 0.0 to 1.0. (New in 1.5.2)
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. Macros [host_name], [htmlcgi] and [htmlbase] are available. The value can be set to "#" to disable the link.
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 objects
view_type | icon | This option defines the type of view for this object. Possible values are: "icon" or "line". Before NagVis 1.4 you could change the view of an object by setting the line_type. Since NagVis 1.4 you need to set the view_type for changing icons to lines.
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. Note: To prevent conflicts with the header navigation you should keep this value below 100.

### 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.
context_menu | inherited (nagvis.ini.php) | Enable/Disable the context menu for this object.
context_template | inherited (nagvis.ini.php) | Context template for this object.
hover_menu | inherited (nagvis.ini.php) | Enable/Disable the hover menu
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
hover_url |  | URL which should be displayed in hover menu instead of standard information. There are some macros available: [hostgroup_name]: This macro stands for the object name.
hover_childs_show | inherited (nagvis.ini.php) | Enable/Disable displaying child objects
hover_childs_sort | inherited (nagvis.ini.php) | Sort method of child objects
hover_childs_order | inherited (nagvis.ini.php) | Order direction of child objects
hover_childs_limit | inherited (nagvis.ini.php) | Maximum number of children to be displayed. Set to -1 to disable the limit.
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], [alias], [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. The color should be given in hexcode. Can also be "transparent".
label_border | inherited (global) | Border color of the labels. The color should be given in hexcode. Can also be "transparent".
label_style | inherited (global) | Custom styling for the label text. To be given like HTML style attribute contents. E.g. `font-family:sans;font-weight:bold;` (New in 1.5)
line_type | inherited (global) | Specifies the type of line when view_type=line. Valid values are: "11" for lines with one arrow at the end of a line. "10" for lines with two arrows pointing to each other in the middle of the line. "12" for plain lines without arrow. (New in 1.5)
line_arrow | inherited (global) | This defines the arrows at the end of the line. At the moment this attribute is only being used for the lines between hosts on the automap. Possible values: forward, back, both, none (New in 1.5.2).
line_width | inherited (global) | This defines the width of the line in px when this object is being displayed as line.
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. Macros [host_name], [htmlcgi] and [htmlbase] are available. The value can be set to "#" to disable the link.
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 objects
view_type | icon | This option defines the type of view for this object. Possible values are: "icon" or "line". Before NagVis 1.4 you could change the view of an object by setting the line_type. Since NagVis 1.4 you need to set the view_type for changing icons to lines.
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. Note: To prevent conflicts with the header navigation you should keep this value below 100.

### 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.
context_menu | inherited (nagvis.ini.php) | Enable/Disable the context menu for this object.
context_template | inherited (nagvis.ini.php) | Context template for this object.
hover_menu | inherited (nagvis.ini.php) | Enable/Disable the hover menu
hover_url |  | URL which should be displayed in hover menu instead of standard information. There are some macros available: [servicegroup_name]: This macro stands for the object name.
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
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
hover_childs_sort | inherited (nagvis.ini.php) | Sort method of child objects
hover_childs_order | inherited (nagvis.ini.php) | Order direction of child objects
hover_childs_limit | inherited (nagvis.ini.php) | Number of maximum children to be displayed. Set to -1 to disable the limit.
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], [alias], [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. The color should be given in hexcode. Can also be "transparent".
label_border | inherited (global) | Border color of the labels. The color should be given in hexcode. Can also be "transparent".
label_style | inherited (global) | Custom styling for the label text. To be given like HTML style attribute contents. E.g. `font-family:sans;font-weight:bold;` (New in 1.5)
line_type | inherited (global) | Specifies the type of line when view_type=line. Valid values are: "11" for lines with one arrow at the end of a line. "10" for lines with two arrows pointing to each other in the middle of the line. "12" for plain lines without arrow. (New in 1.5)
line_arrow | inherited (global) | This defines the arrows at the end of the line. At the moment this attribute is only being used for the lines between hosts on the automap. Possible values: forward, back, both, none (New in 1.5.2).
line_width | inherited (global) | This defines the width of the line in px when this object is being 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. Macros [host_name], [htmlcgi] and [htmlbase] are available. The value can be set to "#" to disable the link.
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 objects
view_type | icon | This option defines the type of view for this object. Possible values are: "icon" or "line". Before NagVis 1.4 you could change the view of an object by setting the line_type. Since NagVis 1.4 you need to set the view_type for changing icons to lines.
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. Note: To prevent conflicts with the header navigation you should keep this value below 100.

### 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 extension)
x |  | X axis coordinate
y |  | Y axis coordinate
context_menu | inherited (nagvis.ini.php) | Enable/Disable the context menu for this object.
context_template | inherited (nagvis.ini.php) | Context template for this object.
hover_menu | inherited (nagvis.ini.php) | Enable/Disable the hover menu
hover_url |  | URL which should be displayed in hover menu instead of standard information. There are some macros available: [map_name]: This macro stands for the object name.
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
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
hover_childs_sort | inherited (nagvis.ini.php) | Sort method of child objects
hover_childs_order | inherited (nagvis.ini.php) | Order direction of child objects
hover_childs_limit | inherited (nagvis.ini.php) | Number of maximum children to be displayed. Set to -1 to disable the limit.
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], [alias], [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. The color should be given in hexcode. Can also be "transparent".
label_border | inherited (global) | Border color of the labels. The color should be given in hexcode. Can also be "transparent".
label_style | inherited (global) | Custom styling for the label text. To be given like HTML style attribute contents. E.g. `font-family:sans;font-weight:bold;` (New in 1.5)
line_type | inherited (global) | Specifies the type of line when view_type=line. Valid values are: "11" for lines with one arrow at the end of a line. "10" for lines with two arrows pointing to each other in the middle of the line. "12" for plain lines without arrow. (New in 1.5)
line_arrow | inherited (global) | This defines the arrows at the end of the line. At the moment this attribute is only being used for the lines between hosts on the automap. Possible values: forward, back, both, none (New in 1.5.2).
line_width | inherited (global) | This defines the width of the line in px when this object is being 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. Macros [host_name], [htmlcgi] and [htmlbase] are available. The value can be set to "#" to disable the link.
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 objects
view_type | icon | This option defines the type of view for this object. Possible values are: "icon" or "line". Before NagVis 1.4 you could change the view of an object by setting the line_type. Since NagVis 1.4 you need to set the view_type for changing icons to lines.
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. Note: To prevent conflicts with the header navigation you should keep this value below 100.

### Textbox

Example with all possible options:

    define textbox {
      text="This is an informational text which can be placed anywhere on the map, HTML can also be used for formatting purposes"
     x=200
     y=100
     w=200
    }

Value | Default | Description
--- | --- | ---
text |  | Your own text, HTML is possible. There are some macros: [refresh_counter]: Shows the time until the next reload/rotate dynamically [worker_last_run]: Shows the time of the last worker run
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. The color should be given in hexcode. Can also be "transparent".
border_color | #000000 | Background color of the textbox. The color should be given in hexcode. Can also be "transparent".
h | auto | Height of the textbox in px (pixels). Set to "auto" for auto scaling. (New in 1.5)
style |  | Custom styling for the text. To be given like HTML style attribute contents. E.g. `font-family:sans;font-weight:bold;` (New in 1.5)
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. Note: To prevent conflicts with the header navigation you should keep this value below 100.

### Shape

Basicaly shapes are simple images which can be moved and positioned on the map. The shapes are meant to be layout elements. The shapes were added to give the users the option to create less static maps.

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
enable_refresh | 0 | This option activates the shape for regular updates in the frontend. This is only needed for dynamic shape images which change once in a while.
hover_menu | 0 | Enable/Disable the hover menu
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. The value can be empty to disable the 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. Note: To prevent conflicts with the header navigation you should keep this value below 100.

### Line (New in 1.5)

The line is a stateless layout element to connect elements and visualize stateless connections between other objects. The objecttype has been created to make the design less static.

Example with all values which have to be set:

    define line {
    	line_type=1
    	x=200
    	y=100
    }

Value | Default | Description
--- | --- | ---
line_type |  | Specifies the type of line when view_type=line. Valid values are: "11" for lines with one arrow at the end of a line. "10" for lines with two arrows pointing to each other in the middle of the line. "12" for plain lines without arrow. (New in 1.5)
x |  | X axis coordinate
y |  | Y axis coordinate
line_arrow | inherited (global) | This defines the arrows at the end of the line. At the moment this attribute is only being used for the lines between hosts on the automap. Possible values: forward, back, both, none (New in 1.5.2).
line_width | 3 | The width of the line in pixels.
line_color | #ffffff | The fill color of the line in hex form. Can also be "transparent".
line_color_border | #000000 | The border color of the line in hex form. Can also be "transparent".
hover_menu | 0 | Enable/Disable the hover menu
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. The value can be empty to disable the 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. Note: To prevent conflicts with the header navigation you should keep this value below 100.

### Template

In NagVis 1.2 there is a new object type named `template`. With this object you have the ability to define all values except 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