Extension:NagVis

Check extension with Icinga Check extension with Nagios

NagVis is an extension for add NagVis maps to MediaWiki pages. Icons map will be updated automatically and status will be pull from Nagios/Icinga/NagVis servers. NagVis is a visualization addon for the well known network management systems Nagios and Icinga.

Introduction
Usually people monitor a lot of host/services, system administrators spend a lot of time solving trivial problems and a lot alarms/warning can be solved by end user.

If we join a wiki (Mediawiki) for documentation and Icinga/Nagios/NagVis for monitoring, we obtain a powerful tool. System administrator can create instructions, Icinga/Nagios/NagVis reports status and end user can adapt instructions to their needs.

Check usage

 * Mediawiki (1.18), Icinga (1.6.1), NagVis (1.6.3) and extension 1.06.1)
 * Mediawiki (1.18), Nagios (3.3.1), NagVis (1.6.3) and extension 1.06.1)

Installation

 * 1) Download the extension (tgz) or (zip).
 * 2) Upload NagVis directory to your extensions directory from the root of your MediaWiki installation.
 * 3) Add   to your LocalSettings.php file (near the end).
 * 4) Done

Usage
To insert a NagVis map add the tag on any page (only one tag per wiki page):

 Header map title 

Tag attributes
The following arguments (tag attributes) can be used to control &lt;NagVis&gt; tags:


 * showheader (yes/no): Show header with time to refesh map, links to NagVis map and Nagios/Icinga server.
 * urlnagvis: NagVis url (Extension will check if it's a correct NagVis site)
 * urlmonitor: Nagios/Icinga url ( Mandatory from NagVis 1.6 )
 * map:       Map name in NagVis
 * nagvispath: Web path to NagVis  (optional)
 * system:    Icon for monitoring system. (Values: nagios/icinga and default value is icinga)  (optional)

Example
 Title map (NagVis with Mediawiki) 

Notes about authentication
* Important: Before making changes you must read Apache, Nagios, Icinga and NagVis about security risks and recomendations.

MediaWiki must be able to pull status without user authentication so you must change your webserver setup. There are several solutions and your configuration could be different depending on your security needs.

Configuration: example for connecting NagVis without password

 * 1) Create a NagVis user with role Users (read only)
 * 2) Add user to nagvis.conf (in Debian/Ubuntu is located on /etc/apache/conf.d)  SetEnv REMOTE_USER user

...    SetEnv REMOTE_USER user

See NagVis FAQ

1. Create guest user for Icinga (Debian/Ubuntu)
Add guest user:

htpasswd /usr/local/icinga/etc/htpasswd.users guest

Enable guest user for Icinga at /usr/local/icinga/etc/cgi.cfg, uncomment following:

default_user_name=guest

add guest in followings lines:

authorized_for_all_services=icingaadmin,guest authorized_for_all_hosts=icingaadmin,guest

Restart icinga:

/etc/init.d/icinga restart

2. Create guest user for Nagios (Debian/Ubuntu)
Add guest user:

htpasswd /usr/local/nagios/etc/htpasswd.users guest

Enable guest user for Nagios at /usr/local/nagios/etc/cgi.cfg, uncomment following:

default_user_name=guest

add guest in followings lines:

authorized_for_all_services=nagiosadmin,guest authorized_for_all_hosts=nagiosadmin,guest

Restart nagios:

/etc/init.d/nagios restart

Configuration: example for connecting Nagios/Icinga without password
Modify nagios.conf or icinga.conf for apache (ex: Debians servers: /etc/apache2/conf.d/nagios.conf) in all your Nagios/Icinga servers:

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"  Options ExecCGI AllowOverride All Order allow,deny AuthName "Nagios Access" AuthType Basic AuthUserFile /usr/local/nagios/etc/htpasswd.users Require valid-user Allow from  MediaWiki_Server_IP, Authorized_Users_IP SetEnv REMOTE_USER guest Satisfy Any  Alias /nagios "/usr/local/nagios/share"  Options None AllowOverride All Order allow,deny AuthName "Nagios Access" AuthType Basic AuthUserFile /usr/local/nagios/etc/htpasswd.users Require valid-user Allow from  MediaWiki_Server_IP, Authorized_Users_IP SetEnv REMOTE_USER guest Satisfy Any 

Allow From:
 * MediaWiki_Server_IP : IP address of your MediaWiki Server
 * Authorized_Users_IP : IP address of users who connect to Nagios/Icinga without password

IP's not included in Allow from  should introduce an authorized (Nagios/Icinga) user for pages with NagVis Tag

Screenshots (Examples)

 * NagVis tag with argument showheader=yes:


 * NagVis tag with argument showheader=no


 * When you move the mouse over icons in the maps you get data from Nagios/Icinga/NagVis server:

Versions
Download

1.06:
 * Tested on:


 * Mediawiki: 1.7, 1.13, 1.14 and 1.18
 * NagVis:   1.6.5, 1.6.4, 1.6.3, 1.6.2, 1.6.1, 1.6, 1.4.5, 1.4.4, 1.4.3, 1.4.2, 1.4.1, 1.4rc1, 1.4rc2, 1.4rc3, 1.3.2, 1.3.2rc3

1.04:
 * Tested on:


 * Mediawiki: 1.7, 1.13, 1.14
 * NagVis:   1.4.5, 1.4.4, 1.4.3, 1.4.2, 1.4.1, 1.4rc1, 1.4rc2, 1.4rc3, 1.3.2, 1.3.2rc3

1.02:
 * Tested on:


 * Mediawiki: 1.7, 1.13
 * NagVis:   1.3.2, 1.3.2rc3

1.0:


 * Tested on:


 * Mediawiki: 1.7 and 1.13
 * NagVis: 1.3rc3

If you test other versions, please send an email to