Sidebar

Combodo

iTop Extensions

Alarm Console

Combodo's customers only

name:
Alarm Console
description:
A lightweight console for managing alarms coming from monitoring systems
version:
1.1.1
release:
2022-02-09
code:
combodo-alarm-console
diffusion:
ITSM Designer
php-version-max:
PHP 8.1

This extension provides a new type of object: Alarm and a simple user interface to list the alarms and either acknowledge them or create a ticket from one or more alarm.

A simple command line PHP script to create an alarm is also provided by the extension.

Features

  • Automatic refresh of the list of alarms, with user defined filtering
  • One click acknowledgment of multiple alarms. (Only allowed to users having the profile Alarms Manager“)
  • Creation of a ticket from several alarms (and automatic acknowledgment of the alarms) in one operation
  • Automatic (in the background) deletion of acknowledged alarms after a configurable retention delay

Revision History

Version Release Date Comments
1.1.1 2022-11-10 * Add compatibility with iTop 3.1 (remove deprecated imports)
* N°5508 Add compatibility with PHP 8.0
1.1.0 2022-02-09 * Fix compatibility with iTop 3.0
* Change Version Min iTop to 2.5.0
1.0.3 2018-10-02 Fix compatibility with iTop 2.5
1.0.2 2016-11-03 Fix sorting on a column in the console was breaking the multi-selection (buttons remained disabled when selecting an alarm). Compatibility with iTop 2.3.0.
1.0.1 2015-10-02 Enhancements: new profile “Alarms Manager” to allow acknowledging alarms without creating a ticket. Added various parameters to customize the format the message and initialize the new ticket with default values. Hilighting of the alarms is now optional. Compatibility with iTop 2.2.0.
1.0.0 2015-02-19 First version

Limitations

  • The total count of alarms is not properly updated when the list of alarms is refreshed.
  • The sort order of the list of alarms is not preserved during the refresh when using a version of iTop lower than 2.1.0.
  • Version 1.0.0 of this extension is not compatible with iTop 2.2.0.

Requirements

This extension has no specific external dependencies.

Installation

Use the Standard installation process for this extension.

Configuration

Parameter Type Description Default value
refresh_delay integer The number of seconds to wait before automatically refreshing the console. The minimum value is 10 seconds. Any value lower than 10 will result in a refresh interval of 10 seconds. 60
alarms_hilighting bool Since 1.0.1: whether or not to “higlight” the alarms in the list, based on their status and severity. If set to true, acknowledged alarms appear as green, warning as yellow and down/critical alarms as red. false
alarm_retention_delay integer The number of days to keep the acknowledged alarms into the database. After this period they will be deleted by the background process. 30
watchdog_delay integer The interval used by the watchdog mechanism to keep the session open. In seconds. 300
target_class string The type of Ticket to create when the user clicks on the “Create Ticket…” button. Adjust this value to suit the data model of iTop if needed. UserRequest
cis_attcode string The name of the field which holds the list of CIs in the ticket. Adjust this value to suit the data model of iTop if needed. functionalcis_list
description_attcode string The name of the field which holds the description of the ticket. Adjust this value to suit the data model of iTop if needed. description
message_line_template string Since 1.0.1: the template to use for generating each line of text (in the “description”) for each CI/Alarm. The possible placeholders are the attributes of the Alarm object. $alarm->functionalci_name$: $alarm->message$
message_text_format string Since 1.0.1: the overall format of the “description” when creating a ticket from one or more alarms. The only possible placeholder is %1$s which correspond to the list of CI/Alarm information produced by the message_line_template for each alarm. %1$s
ticket_default_values array Since 1.0.1: a hash array (format: 'attcode' ⇒ 'value') to specify default values to be preset in the ticket creation form. array()

Example of custom configuration

The custom configuration show below has the following effect:

  • Acknowledged alarms are kept for 60 days instead of 30 (alarms_retention_delay)
  • Alarms are turned into Incident tickets instead of User Requests (target_class)
  • The description contains - for each Alarm/CI - the severity of the alarm, the name of the CI and the message of the alarm (message_line_template)
  • The descripton contains some additional text (with line breaks) to explain better the source/cause of the ticket (message_text_format). Notice how line breaks are enclosed in double quotes.
  • The ticket is pre-filled with a default urgency, impact and service (ticket_default_values)
        'combodo-alarm-console' => array (
                'refresh_delay' => 60,
                'watchdog_delay' => 300,
                'alarms_retention_delay' => 60,
                'alarms_hilighting' => true,
                'target_class' => 'Incident',
                'cis_att_code' => 'functionalcis_list',
                'description_att_code' => 'description',
                'message_line_template' => '> [$alarm->severity$] $alarm->functionalci_name$: $alarm->message$',
                'message_text_format' => 'Les informations suivantes ont été remontées par la supervision:'."\n".'%1$s'."\n".'Bonne chance !',
                'ticket_default_values' => array (
                        'urgency' => '1',
                        'impact' => 1,
                        'service_id' => 'Computers and peripherals',
                ),
        ),

Usage

Users allowed to acknowledge alarms must have the profile Alarms Manager

To display the Alarm Console, click on the “Alarm Console” menu in the “Helpdesk” section.

Alarm Console Menu

The console automatically displays the list of all “On Going” alarms. You can pull down the “Search” drawer to adjust the filter used for building the list (don't forget to click on the “Search” button to apply your search criteria).

From the list of alarms you can select one or more alar🤦s) and either:

  • Acknowledge all the selected the alarms without creating any ticket by pressing the “Acknowlegde Alar🤦s)” button. No confirmation will be asked.
  • Create a ticket (and acknowledge) the selected alarms.

The Console

While alarms are being selected in the list, the automatic refresh of the list is suspended to avoid interfering with the selection process. The refresh will automatically resume when the selection is cleared.

When creating a ticket from one or more alarms, the ticket creation form is displayed. Three fields of this form are pre-populated:

  • The Organization field is populated with the organization of the Alar🤦s). (Only if all selected Alarms are of the same Organization)
  • The Description field is populated with the concatenation of all the Alarm messages (one per line).
  • The list of attached CIs is populated with all the CIs attached to the selected Alar🤦s).

Creating a ticket

Ticket created

Once the ticket is created, all the related Alarms are automatically acknowledged.

Creating an alarms from the command line

Alarms cannot be created or edited interactively in iTop. To create an alarm an external tool must either use the REST/JSON webservice or the provided command line script create_alarm.php.

The command line script create_alarm.php uses the iTop webservices, therefore it can be run on any system having an http(s) connection to iTop.

If your connection to iTop uses HTTPS, the cUrl extension (php5-curl) is needed to run create_alarm.php
php create_alarm.php <itop_url> <itop_user> <itop_pwd> <message> <CI name> <service> <status> <organization name>

Where:

  • itop_url is the URL to the iTop application.
  • itop_user is the login for connecting to iTop.
  • itop_pwd is the password associated with the login.
  • message is the alarm message (free text)
  • CI name is the unique name of the CI associated with the alarm
  • service is the service of the alarm (free text)
  • status is the status of the alarm. one of down, critical, warning
  • organization name is the unique name of the Organization for which to create the alarm.
Use double quotes around parameters containing a space like message or organization name.
If your CI names are not globally unique (but maybe unique per organization), adjust the script by changing the query to retrieve the CI (at line 384 in create_alarm.php) from SELECT FunctionalCI WHERE name='$sCIName' to SELECT FunctionalCI WHERE name='$sCIName' AND organization_name='$sOrgName'.

Example:

php create_alarm.php https://itop.demo.com admin admin "HP Agents Status Degradated" Server4 "HP Agent" warning Demo
extensions/combodo-alarm-console.txt · Last modified: 2022/11/14 08:39 by 127.0.0.1
Back to top
Contact us