This page describes two topics:
Display an additional tab “Monitoring”, containing an IFRAME to the status of the device in the monitoring system (Nagios or equivalent). This extra tab is automatically displayed on all devices in production.
Version | Release Date | Comments |
---|---|---|
1.0.0 | 2016-09-23 | First version |
Because of the browser's security rules, the content of the Monitoring iframe will not display at all in iTop if either:
https
(secure) connection whereas the pages from the monitoring application are served in http
(non-secure), orX-Frame-Options
header with either DENY
or SAMEORIGIN
(refer to X-Frame-Options definition for more information)The integration does not take care of the authentication to the Monitoring system. Depending on the configuration of your monitoring system, you may need to authenticate in order to see the content of the “Monitoring” tab.
You must have an up and running monitoring system providing a status web page, per device, accessible via a “direct” URL with the name (or the IP address) of the monitored device as a parameter in the URL.
Put the content of the downloaded .zip
into the extensions
folder (check the rights !) and run the setup again to pick the new extension for installation.
This module has only two parameters nagios_url
and target_classes
.
Parameter | Type | Usage | Default value |
---|---|---|---|
nagios_url | String | URL to display the nagios status web page for the device. The placeholder $this->name$ in the URL is replaced by name of the CI. | https://nagios_server/cgi-bin/status.cgi?host=$this->name$ |
target_classes | Array | A list of classes for which to display the “Monitoring” tab. Child classes of the specificed classes also inherit the tab. | array('ConnectableCI') |
target_classes
must be classes derived from FunctionalCI
, since the code looks for the status
of the CI.
The following configuration:
'itop-nagios-integration' => array ( 'nagios_url' => 'https://mynagios.mycompany.com/cgi-bin/status.cgi?host=$this->name$', ),
Will display the page at the location https://mynagios.mycompany.com/cgi-bin/status.cgi?host=server4.demo.com
as an extra tab “Moniting” in the details of the Server server4.demo.com
.
Navigate to a device in production (status == production) to see the extra “Monitoring” tab in the details of the device.
chmod +x <create-ticket-script>
)commands.cfg
)# Create incident tickets in iTop command definition define command{ command_name create-iTop-ticket command_line <yourDirectory>/<create-ticket-script> \"$HOSTNAME$\" \"$SERVICEDESC$\" \"$SERVICESTATE$\" \"$SERVICESTATETYPE$\"
where <your_directory>
is the path where you copied the script and <create-ticket-script> is either create-ticket.php
, create-ticket.py
, create-ticket.pl
or create-ticket.bash
.
Step 4: Use this command in an event handler option for each host or service template that should trigger a ticket creation:
You can define it globally for all hosts and services using following options defined most of the time in nagios.cfg:
global_host_event_handler=create-iTop-ticket global_service_event_handler= create-iTop-ticket
Or for each host and services using following options:
event_handler create-iTop-ticket event_handler_enabled 1
if you choose the latter option, you will have to configure the handler for each host and service templates you create.
Once done, next time you will have a HARD alarm in Nagios it will create a ticket automatically in iTop !