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 recognised by NagVis.
In a fresh NagVis installation there is no file with the default configuration. The default configuration is stored in the PHP-Code of NagVis. 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.
All values which are used througout NagVis are stored in the global section.
Value | Default | Description |
---|---|---|
audit_log | 1 | Enable/Disable logging of security related user actions in Nagvis. For example user logins and logouts are logged in var/nagvis-audit.log. |
authmodule | CoreAuthModSQLite | Defines the authentication module to use. By default NagVis uses the built-in SQLite authentication module. On delivery there is no other authentication module available. It is possible to add own authentication modules for supporting other authentication mechanism. For details have a look at the authentication module documentation. |
authorisationmodule | CoreAuthorisationModSQLite | Defines the authorisation module to use. By default NagVis uses the built-in SQLite authorisation module. On delivery there is no other authorisation module available. It is possible to add own authorisation modules for supporting other authorisation mechanism. For details have a look at the authorisation module documentation. |
controls_size (new in 1.6) | 10 | The size (in pixels) of object controls in unlocked (edit) mode in the frontend. Object controls are for example the modify, delete and move icons. |
dateformat | Y-m-d H:i:s | The format of date and time shown in NagVis. Available options like in date function of php |
dialog_ack_sticky | 1 | Is set to 1 by default to enable the preselection of the "sticky acknowledgement" checkbox in the problem acknowledgement dialog. |
dialog_ack_notify | 1 | Is set to 1 by default to enable the preselection of the "notify acknowledgement" checkbox in the problem acknowledgement dialog. |
dialog_ack_persist | 0 | Is set to 0 by default to disable the preselection of the "persist comment" checkbox in the problem acknowledgement dialog. |
geomap_server (new in 1.7) | http://geomap.nagvis.org/ | The server to use as source for the NagVis geomaps. Must implement the API which can be found here |
http_proxy (new in 1.6) | The proxy server to use for external HTTP request. | |
http_timeout (new in 1.6) | 10 | The timeout in seconds for external HTTP requests. |
language | en_US | Select default language to use in NagVis. There are several translations delivered by default: en_US (English), de_DE (German), fr_FR (French) and pt_BR (Brazilian Portuguese; since 1.4.4). Since NagVis 1.4 you have to select the languages in a new format ("en_US" instead of "english") |
language_available | de_DE,en_US,es_ES,fr_FR,pt_BR | You may want to give your users a limited number of languages to choose from. You can control the behaviour without deleting the language files from your NagVis installation. If this value is left empty NagVis will fallback to all configured in languages. If you like to add a new language to your NagVis installation you need to add it to the list here. |
language_detection | user,session,browser,config | This controls how NagVis tries to detect the language of the user to translate NagVis. NagVis knows several mechanisms to detect the language: - user: Explicit user selected language - session: When the user selects a language it is stored in the current session - browser: NagVis tries to detect the user language by the browser agent - config: The installation default language The order you set the options determines how NagVis uses the different mechanisms. |
logonmodule | LogonMixed | Defines the logon module to use. By default NagVis uses the mixed auth module which trusts the username given in REMOTE_USER or displays a HTML logon dialog for requesting authentication information from the user when REMOTE_USER is not set. On delivery there are the following modules available: LogonMixed: The mixed logon module uses the LogonEnv module as default and the LogonDialog module as fallback when LogonEnv returns no username. This should fit the requirements of most environments. LogonDialog: This is an HTML logon dialog for requesting authentication information from the user. LogonEnv: It is possible to realise a fully "trusted" authentication mechanism like all previous NagVis versions used it before. This way the user is not really authenticated with NagVis. NagVis trusts the provided username implicitly. NagVis uses the configured environment variable to identify the user. You can add several authentication mechanisms to your webserver, starting from the basic authentication used by Nagios (.htaccess) to single sign-on environments. Simply set logonmodule to "LogonEnv", put the environment variable to use as username to the option logonenvvar and tell the authentication module to create users in the database when provided users do not exist. The option logonenvcreaterole tells the module to assign the new user to a specific role; set to empty string to disable that behaviour. LogonMultisite: This module uses the authentication provided by auth_* cookies which have been generated by Check_MK multisite when using the cookie based authentication. It is possible to add own logon modules for serving other dialogs. For details take a look at the logon module documentation. |
logonenvvar | REMOTE_USER | Defines the environment variable to be used for fetching the authenticated user from the webservers environment. This option is only used with the logon modules LogonEnv and LogonMixed. |
logonenvcreateuser | 1 | Tells the LogonEnv/LogonMixed module to create a user account for each unknown user who opens the NagVis pages. This option is only used with the logon modules LogonEnv and LogonMixed. |
logonenvcreaterole | Guests | Tells the LogonEnv/LogonMixed module to create the user accounts with the given role associated. This option is only used with the logon modules LogonEnv and LogonMixed. |
logon_multisite_htpasswd | The path to the htpasswd file which is used by multisite. Only used by the LogonMultisite module. | |
logon_multisite_secret | The path to the auth secret file which is used by multisite. Only used by the LogonMultisite module. | |
logon_multisite_createuser | 1 | Same as the above "logonenvcreateuser" option. Only used by the LogonMultisite module. |
logon_multisite_createrole | Guest | Same as the above "logonenvcreaterole" option. Only used by the LogonMultisite module. |
refreshtime | 60 | Refresh time of maps or reloading the next map in map rotation |
sesscookiedomain | auto-detect | You may need to control for which domain NagVis will store the session cookie. By default NagVis tries to auto detect this option value by using the webservers environment variables. This should work in most environments but may be changed e.g. when using url rewriting. |
sesscookiepath | auto-detected | You may need to control the path on which the cookie will be set. By default NagVis uses the paths/htmlbase value for setting the cookie. This should work in most environments but may be changed e.g. when using url rewriting. |
sesscookieduration | 86400 | Lifetime of the NagVis session cookie in seconds. The default value is set to 24 hours. The value of the NagVis session cookie contains will be renewed on every page visit. If a session is idle for more time than configured here it will become invalid. |
startmodule | overview | The default module to show when none is given by the user |
startaction | view | The default action to do when none is given by the user |
startshow | The startshow parameter is only used by some views at the moment. It is used by the Map and the AutoMap modules. |
Value | Default | Description |
---|---|---|
base | /usr/local/nagvis/share/ | Absolute physical NagVis path |
htmlbase | /nagvis | Absolute html NagVis path |
htmlcgi | /nagvis/cgi-bin | Absolute html NagVis cgi path |
Value | Default | Description |
---|---|---|
backend | live_1 | Default backend (ID of the backend - copy the text from which <backend-id> stands for in [backend_<backend-id>] ) |
backgroundcolor | transparent | Default background colour of maps |
contextmenu | 0 | Enable/Disable the context menu on your map objects. |
contexttemplate | default | Default context template. |
event_on_load | 0 | Enabled/disables event handling on page loading. Initial problematic states will raise events in frontend during page rendering. (New in 1.7b3) |
event_repeat_interval | 0 | Repeat frontend events in the given interval. The interval is configured in seconds. Set value to 30 to let NagVis re-raise events for problematic objects every 30 seconds. Setting this value smaller than [worker] interval will have no effect. (New in 1.7b3) |
event_repeat_duration | -1 | The time in seconds to repeat alerts for a problematic ojects for as configured in event_repeat_interval. This value defaults to -1, this leads to repeated events until the problematic state has been fixed. (New in 1.7b3) |
eventbackground | 0 | Enable/Disable changing background colour on state changes (configured colour is shown when summary state is PENDING, OK or UP) |
eventhighlight | 1 | Enable/Disable highlighting of the state changing object by adding a flashing border |
eventhighlightduration | 10000 | Duration of the highlighting in milliseconds |
eventhighlightinterval | 500 | Interval of the highlighting in milliseconds |
eventlog | 0 | Enable/Disable the eventlog in the new javascript frontend. The eventlog keeps track of important actions and information |
eventlogevents | 24 | Number of events in the eventlog scrollback |
eventloglevel | info | Loglevel of the eventlog (Available: debug, info, warning, critical) |
eventlogheight | 100 | Height of the javascript eventlog in px |
eventloghidden | 1 | Hide/Show the eventlog on map loading |
eventscroll | 1 | Enable/Disable scrolling to the icon which changed the state when the icon is out of the visible scope |
eventsound | 1 | Enable/Disable sound signals on state changes |
headerfade | 0 | Enable/Disable the fade effect of the submenus in the header menu (When the used header menu supports that option) |
headermenu | 1 | Enable/Disable the header menu |
headertemplate | default | Default header template |
hoverchildslimit | 10 | Limit hover child objects to this maximum value |
hoverchildsorder | asc | Order of the child objects (Available: asc/desc) |
hoverchildsshow | 1 | Enable/Disable the child objects in hover menu |
hoverchildssort | a | Sort method of the child objects (available: "s": state, "a": alphabet ) |
hoverdelay | 0 | Delay of hover menu appearance in seconds |
hovermenu | 1 | Enable/Disable the hover menu |
hovertemplate | default | Default hover template |
| | |
icons | std_medium | Default iconset |
onlyhardstates | 0 | Recognize only hard states (not soft) |
recognizeservices | 1 | Recognize service states in host/hostgroup objects |
showinlists | 1 | Show the maps in lists (dropdowns,index page,...) |
showinmultisite | 1 | Show the maps in multisite snapin |
stylesheet | Filename of the custom stylesheet to use on the maps (the file needs to be located in the share/nagvis/styles directory) | |
urltarget | _self | Target of the Icon link, this option adapts <a target=""> (_self is same window) |
hosturl | [htmlcgi]/status.cgi?host=[host_name] | The default url to follow when a user left-clicks on a host object. Available macros: [htmlcgi], [htmlbase], [host_name], [backend_id] |
hostgroupurl | [htmlcgi]/status.cgi?hostgroup=[hostgroup_name] | The default url to follow when a user left-clicks on an hostgroup object. Available macros: [htmlcgi], [htmlbase], [hostgroup_name], [backend_id] |
serviceurl | [htmlcgi]/extinfo.cgi?type=2&host=[host_name]&service=[service_description] | The default url to follow when a user left-clicks on an service object. Available macros: [htmlcgi], [htmlbase], [host_name], [service_description], [backend_id] |
servicegroupurl | [htmlcgi]/status.cgi?servicegroup=[servicegroup_name] | The default url to follow when a user left-clicks on an servicegroup object. Available macros: [htmlcgi], [htmlbase], [servicegroup_name], [backend_id] |
mapurl | [htmlbase]/index.php?mod=Map&act=view&show=[map_name] | The default url to follow when a user left-clicks on an map object. Available macros: [htmlcgi], [htmlbase], [map_name] |
view_template | default | Templates to be used for the different views. |
label_show | 0 | New in 1.6.4: Show the objects labels or not. |
line_weather_colors | 10:#8c00ff,25:#2020ff,40:#00c0ff,55:#00f000,70:#f0f000,85:#ffc000,100:#ff0000 | New in 1.6.5: This defines the colours of weathermap lines in the different percentage levels. For example above 10% load it will be coloured #8c00ff. |
Value | Default | Description |
---|---|---|
backgroundcolor | #fff | Configure the background colour of the overview page |
cellsperrow | 4 | Maps per row in map listing |
headermenu | 1 | Enable/Disable the header menu |
headertemplate | default | Default header template |
showautomaps | 1 | Enable/Disable the listing of automaps |
showmaps | 1 | Enable/Disable the listing of maps |
showmapthumbs | 0 | Enable/Disable the listing of map thumbnails |
showrotations | 1 | Enable/Disable the listing of defined rotations |
Value | Default | Description |
---|---|---|
defaultparams | &childLayers=2 | These are the parameters for the automap views and links in the 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 |
1 | Enable/Disable the automap in map lists (map index page, dropdown menus in header) (Deprecated in 1.7) |
Value | Default | Description |
---|---|---|
25 | In this interval the map gets backuped by the WUI. (Deprecated in 1.6) | |
grid_show | 0 | Enable/Disable a grid to make the alignment of objects easier in the WUI. Objects are aligned to the upper left corner after moving. |
grid_color | #F7F7F7 | The colour of the grid lines. |
grid_steps | 32 | Scale of the grid in px. |
1 | Enable/Disable the header menu in the WUI. (Deprecated in 1.6) | |
default | Default header template to use in the WUI. (Deprecated in 1.5) | |
maplocktime | 5 | Time in minutes a map is locked by an editing user. |
Value | Default | Description |
---|---|---|
interval | 5 | The interval in seconds in which the worker will check for objects which need to be updated. |
requestmaxparams | 0 | The maximum number of parameters used in ajax http requests. Some intrusion detection/prevention systems have a problem with too many parameters in the url. Set to 0 for no limit. |
requestmaxlength | 1900 | The maximum length of http request urls during ajax http requests. Some intrusion detection/prevention systems have a problem with queries being too long. |
updateobjectstates | 15 | The retention time of the states in seconds in the frontend. The state information will be refreshed after this time is over on next worker interval. |
The backend sections to define the backends are all named [backend_<backend-id>]
.
In the example the backend_id
is live_1
.
Depending on the value in backendtype the valid values for the backends have to be set. In this example it is the MKLivestatus backend.
[backend_live_1] backendtype="mklivestatus" htmlcgi="/nagios/cgi-bin" ; the following options depend on the selected backendtype, in this case it is MKLivestatus socket="unix:/usr/local/nagios/var/rw/live"
Value | Default | Description |
---|---|---|
backendtype | mklivestatus | type of backend - MUST be set |
statushost | The status host can be used to prevent annoying timeouts when a backend is not reachable. This is only useful in multi backend setups. It works as follows: The assumption is that there is a "local" backend which monitors the host of the "remote" backend. When the remote backend host is reported as UP the backend is queried as normal. When the remote backend host is reported as "DOWN" or "UNREACHABLE" NagVis won't try to connect to the backend anymore until the backend host gets available again. The statushost needs to be given in the following format: "<backend_id>:<hostname>" -> e.g. "live_2:nagios" The host needs to be in another backend than the current one to work correctly. |
|
htmlcgi | /nagios/cgi-bin | Path to the cgi-bin directory of this backend (interesting for multiple backends) |
custom_1 | First custom variable which is available in the context and hover menus. With this option different custom URLs can be added to the context/hover menus based on the backend used. Might be interesting when adding links to different Nagios instances. | |
custom_2 | Second custom variable. Same as above. | |
custom_3 | Third custom variable. Same as above. |
For the backendtype specific options see the backends documentation.
[rotation_demo] maps="demo,demo2" interval=15
Value | Default | Description |
---|---|---|
interval | 15 | Map rotation interval in seconds |
maps |
Comma separated 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 and accessible by the server which NagVis is running on. You can add labels in the following format <label>:<map> and <label>:<[url]>. The labels are displayed in the rotation list. |
Since NagVis 1.7.6 it is possible to use so called actions to extend the
default context menu. This enables users to connect directly to the monitored
hosts from the NagVis context menu. The configuration is done using
[action_*]
sections in the main configuration.
It is possible to add such actions to the context menus of service and host
objects depending on the "obj_type" option. They are not added blindly to all
objects of those types, you can use the attribute "condition" to configure
which objects shall have the specific actions. By default we use Nagios custom
macros of the host object to make the actions visible/invisible. This filtering
mechanism is not limited to custom macros, you can also use regular host
attributes which are available within NagVis.
With the option "client_os" you can configure the option to only be available
on the clients which have a listed operating system running.
Here is an example for such a section, taken from the sample config:
; Adds the action "connect via ssh" to service/host objects which have the ; string "unix" in the TAGS Nagios custom macro. Is only added when NagVis ; detects that the client watching the map uses linux or mac os. ; When clicking on the link, the browser opens the URL ssh://<address>/, ; you need to configure your clients browser to handle these urls correctly. [action_ssh_url] action_type="ssh_url" obj_type="host,service" client_os="mac,lnx" condition="TAGS~unix"
Value | Default | Description |
---|---|---|
action_type | The type of the custom action (used as reference to the optional custom
action script files located in share/server/core/actions ). |
|
obj_type | host,service | Comma separated list of object types to display this custom action for |
client_os | Comma separated list of client operating systems to display this custom action for. You can
use the values win , lnx and/or mac here. |
|
condition | You can use some sort of filtering mechanism to display the action not on all
objects of that type. The example above can be read like this: "Add this filter to all host and
service objects which contain the string You can use regular attributes or even custom macros of the objects as keys.
At the moment you can use the operator |
An action can be constructed out of three parts:
share/server/core/actions
).The sample configuration defines several sample actions, which might be useful for some users. Here is the list and a short description of the actions:
Action Id | Description |
---|---|
rdp | Adds the action "connect via rdp" to service/host objects where the host object has the string "win" in the TAGS Nagios custom macro. When clicking on the link, NagVis generates a .rdp file which contains a call to make the client connect to the given host via RDP. |
win_ssh | Adds the action "connect via ssh" to service/host objects which have the string "unix" in the TAGS Nagios custom macro. Is only added when NagVis detects that the client watching the map uses windows. When clicking on the link, NagVis generates a .cmd file which contains a call to putty which makes putty connect via SSH to this host. |
ssh_url | Adds the action "connect via ssh" to service/host objects which have the string "unix" in the TAGS Nagios custom macro. Is only added when NagVis detects that the client watching the map uses linux or mac os. When clicking on the link, the browser opens the URL ssh://<address>/, you need to configure your clients browser to handle these urls correctly. |
http | Adds the action "connect via http" to service/host objects which have the string "web-80" in the TAGS Nagios custom macro When clicking on the link, the browser opens a new window with the URL http://<host_address>/. This can be changed by modifying the context template. |
https | Adds the action "connect via https" to service/host objects which have the string "web-443" in the TAGS Nagios custom macro When clicking on the link, the browser opens a new window with the URL https://<host_address>/. This can be changed by modifying the context template. |
Options which affect the handling and appearance of the different states in the NagVis installation.
These settings define the state handling behaviour. Mainly it is possible to configure which state will cover another state changing these values. The state with the highest value will become the "summary state" for an object. For example a critical state (5) will cover a warning state (4). Another example: An acknowledged critical state (2) will not cover a warning state (4).
Value | Default |
---|---|
down | 10 |
down_ack | 6 |
down_downtime | 6 |
unreachable | 9 |
unreachable_ack | 6 |
unreachable_downtime | 6 |
critical | 8 |
critical_ack | 5 |
critical_downtime | 5 |
warning | 7 |
warning_ack | 5 |
warning_downtime | 5 |
unknown | 4 |
unknown_ack | 3 |
unknown_downtime | 3 |
error | 4 |
error_ack | 3 |
error_downtime | 3 |
up | 2 |
ok | 1 |
unchecked (new in 1.6) | 0 |
pending | 0 |
This settings define the behaviour of states in the frontend.
Value | Default |
---|---|
unreachable_bgcolor | #F1811B |
unreachable_color | #F1811B |
unreachable_ack_bgcolor | |
unreachable_downtime_bgcolor | |
unreachable_sound | std_unreachable.mp3 |
down_bgcolor | #FF0000 |
down_color | #FF0000 |
down_ack_bgcolor | |
down_downtime_bgcolor | |
down_sound | std_down.mp3 |
critical_bgcolor | #FF0000 |
critical_color | #FF0000 |
critical_ack_bgcolor | |
critical_downtime_bgcolor | |
critical_sound | std_critical.mp3 |
warning_bgcolor | #FFFF00 |
warning_color | #FFFF00 |
warning_ack_bgcolor | |
warning_downtime_bgcolor | |
warning_sound | std_warning.mp3 |
unknown_bgcolor | #FFCC66 |
unknown_color | #FFCC66 |
unknown_ack_bgcolor | |
unknown_downtime_bgcolor | |
unknown_sound | |
error_bgcolor | #0000FF |
error_color | #0000FF |
error_ack_bgcolor | |
error_downtime_bgcolor | |
error_sound | |
ok_bgcolor | #00FF00 |
ok_color | #00FF00 |
ok | |
up_bgcolor | #00FF00 |
up_color | #00FF00 |
up_sound | |
unchecked_bgcolor (new in 1.6) | #C0C0C0 |
unchecked_color (new in 1.6) | #C0C0C0 |
unchecked_sound (new in 1.6) | |
pending_bgcolor | #C0C0C0 |
pending_color | #C0C0C0 |
pending_sound |