See www.zabbix.com for the official Zabbix site.

Docs/specs/ZBXNEXT-2033

From Zabbix.org
Jump to: navigation, search

Remedy integration

ZBXNEXT-2033

Status: v0.3

Owner: Andris Zeila

Summary

Provide Zabbix alert integration with Remedy incidents. Zabbix must provide automatic and semi-automatic Remedy incident creation and update

Automatic incident creation and update

Integrate Remedy support as a new media type which can be used to send alerts from actions.

Semi-automatic incident creation and update

Add a checkbox to event acknowledgment page. If checked Zabbix will create/update corresponding incident when the 'acknowledge' button is clicked.

(Detailed frontend specifications to follow later)

Specification

The Remedy Service must be added as a media type for action Send Message operations. The Remedy Service media type will contain the following fields:

  • Remedy Service URL - the URL of Remedy web service
  • User name - the Remedy Service user name
  • Password - the Remedy Service user password
  • Login ID - the Remedy Service login ID
  • Company name - the Company name (stored into Remedy incident Customer_Company field)
  • Network group - the name of group mapped to Remedy 'Networks & Telecomms' service CI. Hosts belonging this group will use 'Networks & Telecomms' service CI in Remedy while the rest of hosts will use 'Server & Storage' service CI.

When a new trigger problem event with warning or higher severity is generated and an action is configured to send a message with Remedy Service, Zabbix Server must either:

  1. reopen the incident which was created to the last event generated by the same trigger if the incident is in resolved state
  2. or create a new incident otherwise and store it's number in ticket table in database.

Additionally all events must update Work Info data of corresponding Remedy incident if the incident exists and is not closed.

When interacting with Remedy Service the returned errors must be passed back and stored into alerts table error field.

Server

  • Add support for Remedy Service media type (mediatypeid 101) and implement integration with Remedy web services.
  • Add support for external (frontend) requests of event related Remedy incident querying, creating and updating.
  • Remedy service default timeout is set to 20 seconds.

Process flow

ZBXNEXT-2033.process flow.jpg

Get incident number

Get the number of last incident created in response to the event source trigger. This number is stored in database table ticket.

Get incident data

Retrieves incident data from Remedy service. Calls HPD_IncidentInterface_WS service HelpDesk_Query_Service method. It passes Incident_Number and reads the following fields from response to reuse them for later HelpDesk_Modify_Service calls:

  • Categorization_Tier_1
  • Categorization_Tier_2
  • Categorization_Tier_3
  • Closure_Manufacturer
  • Closure_Product_Category_Tier1
  • Closure_Product_Category_Tier2
  • Closure_Product_Category_Tier3
  • Closure_Product_Model_Version
  • Closure_Product_Name
  • Company
  • Summary
  • Notes
  • Impact
  • Manufacturer
  • Product_Categorization_Tier_1
  • Product_Categorization_Tier_2
  • Product_Categorization_Tier_3
  • Product_Model_Version
  • Product_Name
  • Reported_Source
  • Resolution
  • Resolution_Category
  • Resolution_Category_Tier_2
  • Resolution_Category_Tier_3
  • Resolution_Method
  • Service_Type
  • Status
  • Urgency
  • Status_Reason
  • ServiceCI
  • ServiceCI_ReconID
  • HPD_CI
  • HPD_CI_ReconID
  • HPD_CI_FormName
  • z1D_CI_FormName
Reopen incident

Reopens resolved Remedy incident. Calls HPD_IncidentInterface_WS service HelpDesk_Modify_Service method with fields returned by (get incident data) and the following fields set to new values:

Status “Assigned”
Action “MODIFY”
Work_Info_Summary Alert subject, configurable for each action in Zabbix
Update incident

Updates an open incident by adding work info summary. Calls HPD_IncidentInterface_WS service HelpDesk_Modify_Service method with fields returned by (get incident data) and the following fields set to new values:

Action “MODIFY”
Work_Info_Summary Alert subject, configurable for each action in Zabbix
Create incident

Creates a new Remedy incident. Calls HPD_Incident_Interface_Create_Monitor_WS service HelpDesk_Submit_Service method with the following fields:

Assigned_Group “Control Center”
First_Name Empty
Impact Mapped to Zabbix event severity
Last_Name Empty
Reported_Source “Systems Management”
Service_Type “Infrastructure Event”
Status “New”
Action “CREATE”
Summary Alert subject, configurable for each action in Zabbix
Notes Alert message, configurable for each action in Zabbix
Urgency Mapped to Zabbix event severity
ServiceCI 'Networks & Telecomms' if the host belongs to the Network group specified in Remedy configuration or 'Server & Storage' otherwise
ServiceCI_ReconId The corresponding Remedy reconciliation identity of ServiceCI field value
HPD_CI Zabbix host name
HPD_CI_ReconId Host inventory 'tag' field of Zabbix host
Login_ID User specific, configurable in Zabbix for user media
Customer_Company Configurable in Zabbix Remedy Service media
CSC_INC Empty
Service_Class Host inventory 'serialno_b' field of Zabbix host

Media protocol

Zabbix server provides support for manual event acknowledgment with JSON based media protocol. The media protocol timeout is set to 25 seconds by default.

Querying incident

Querying an incident is done with media.query command. This request will return the last incidents related (created in response to the same source trigger) to the specified events.

REQUEST

  {
     "request":"media.query",
     "sid":"<session id>",
     "eventids":[<eventid1>, <eventid2>,...]
  }

Where:

  • <eventidX> - corresponding event id

RESPONSE

  {
      "response":"success",
      "data":[
      {
          "eventid":"<eventid>",
          "externalid":"<incident number>",
          "status":"<incident status>",
          "clock":<incident creation timestamp>,
          "assignee":"<assignee>",
          "error":"<error message>"
      },
     ...
  }

Where:

  • <eventid> - corresponding event id
  • <incident number> - the number of the last incident created by an event of the same type. If there were no incidents created by same type event the <incident number> is an empty string.
  • <incident status> - Remedy incident status in text format (New, Assigned etc).
  • <incident creation timestamp> - the number of seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
  • <assignee> - the assigned person in Remedy.
  • <error message> - contains error message and is returned only if the incident querying failed

Creating/updating incident

Creating/updating an incident is done with media.acknowledge command. It will either create a new incident or update an existing one based on the status of the last created incident.

REQUEST

  {
     "request":"media.acknowledge",
     "sid":"<session id>",
     "events":[
      {
           "eventid":"<eventid>",
           "subject":"<alert subject>",
           "message":"<alert message>"
      }
      ...
     ]
  }

Where:

  • <eventid> - corresponding event id
  • <alert subject> - short summary of the event
  • <alert message> - detailed alert message

RESPONSE

  {
      "response":"success",
      "data":[
      {
          "eventid":"<eventid>",
          "externalid":"<incident number>",
          "status":"<incident status>",
          "clock":<incident creation timestamp>,
          "assignee":"<assignee>",
          "new":"<new>",
          "error":"<error message>"
      },
     ...
  }

Where:

  • <eventid> - corresponding event id
  • <incident number> - the number of the created or modified incident.
  • <incident status> - Remedy incident status in text format (New, Assigned etc)
  • <incident creation timestamp> - the number of seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
  • <assignee> - the assigned person in Remedy.
  • <new> - true if a new incident was created, false if an existing incident was updated
  • <error message> - contains error message and is returned only if the incident querying failed

Front-end

Add support for Remedy Service media type (Administration/Media Types) with the following fields (corresponding field in media_type table):

  • Remedy Service URL - the URL of Remedy web service (smtp_server)
  • User name - the Remedy Service user name (username)
  • Password - the Remedy Service user password (passwd)
  • Proxy - the proxy connection string (smtp_helo)
  • Company name - the Company name (exec_path)
  • Network group - the name of group mapped to Remedy 'Networks & Telecomms' service CI (smtp_email)

The Login ID field will be stored in user media configuration (media table sendto field)

Remedy service information will be show only to users that have media type set to "Remedy Service".

Acknowledging events

Acknowledging an event in Zabbix must also create or update the corresponding ticket in Remedy.

  • When opening the even acknowledgement form, an additional checkbox must be displayed below the text area. If no ticket for this event exist, the label of the checkbox should be "Create ticket", otherwise - "Update ticket ###" where "###" is a link to the ticket.
  • After acknowledging an event, a message saying that "Ticket ### has been created." or "Ticket ### has been updated." should appear under the "Event acknowledged" message.
  • If an event is registered in Remedy, a "Ticket ###" header must be displayed above the acknowledgement message, where "###" is a link to the ticket which opens in new window.

For bulk acknowledging this option is not available.

Event details

Additional information about the Remedy ticket must be displayed on the event details page.

  • An additional "Ticket details" block must be added below the "Event details" block. It should only be displayed if a ticket is registered for this event.
  • The block should contain the following rows:
    • Ticket - ID of the ticket with a link which should open in new window;
    • Created - date and time when the ticket was created.

Event severity

User must be able to create ticket only if it has corresponding severity enabled in media settings. If user does not have enabled required severity level for Remedy media, then Remedy integration must work in 'read-only' mode - user must be able to view ticket details and additional information in event details, but the 'Create ticket' checkbox will be disabled (or hidden).

Database changes

A new table must be added to associate Remedy incident numbers with Zabbix events

 TABLE|ticket|ticketid|0
 FIELD		|ticketid	|t_id		|	|NOT NULL	|0
 FIELD		|externalid	|t_varchar(255)	|	|NOT NULL	|0
 FIELD		|eventid	|t_id		|	|NOT NULL	|0
 FIELD		|triggerid	|t_id		|	|NOT NULL	|0
 FIELD		|clock		|t_time		|	|NOT NULL	|0
 FIELD		|new		|t_integer	|	|NOT NULL	|0
 INDEX		|1		|eventid,clock
 INDEX		|2		|triggerid,clock
 INDEX		|3		|externalid,new

Changelog

  • v0.3 - added requirement for fronted to check security level for Remedy media type