Smarts Integration

❗️

*DEPRECATED
Smarts Integration package will not be served for a while. Hence, integration will be unavailable during this time.*

Introduction

EMC Smarts (Ionix) Service Assurance Manager (SAM) “tools” enable operators to execute custom actions from Smarts console interactively, and “escalation policies” enable implementation of automated responses to problems detected by Smarts root-cause analysis engines. OpsGenie is a cloud based service that provides rich alert notifications and mobile response capabilities.

Leveraging Smarts tools and escalation policies, OpsGenie extends Smarts’ root cause analysis capabilities into mobile users. When Smarts detects a critical problem that requires attention, OpsGenie notifies the users through multiple notification channels (SMS, mobile push, voice, etc.), and enables the recipients to view the alert directly from their mobile devices.

Deploy Smarts Integration on the Smarts SAM Server

You need to apply deployment step for all scenarios :

  • Download OpsGenie Smarts Integration files, which includes :
    • Lamp - OpsGenie command line utility to create alerts
    • Marid - OpsGenie Integration Server ( will only be used in Scenario 3 )
    • Smarts Integration shell scripts
  • Unzip Smarts Integration File
  • Lamp Installation :
    • Smarts Integration Files contains a customized version of lamp , you need to install this version.
    • Install lamp by referring to Lamp: Command Line Documentation - Installation steps. Do not download lamp again.
    • Make sure your smarts shell scripts have correct LAMP_HOME, your lamp installation directory
    • Create an OpsGenie API Integration, copy the integration apiKey, put into the opsgenie-integration/conf/opsgenie-integration.conf file.
    • Verify Lamp is working : Create a test alert, using the lamp utility from the command line , make sure your alert is visible on OpsGenie dashboard . Please refer to Lamp: Command Line for more information.
  • Prepare smartsShellScripts/ogNotifyUsers shell script :
    • Modify ogNotifyUsers script : LAMP_HOME should have the value of your lamp directory
    • Copy ogNotifyUsers script to SM_HOME/smarts/local/actions/server directory.
    • For Linux : Make script executable : chmod +x ogNotifyUsers.sh
  • Prepare OpsGenie Groups & Users
    • Create groups or users that you want to notify from Smarts
    • Make sure groups have at least one user

Scenario 1: Simple Alerts - Notify group of users from Smarts

Scenario 1 shows how Smarts to OpsGenie Alert Creation can be done via different methods.

ogNotifyUsers is a shell script provided with Smarts Integration files. It can be used as a server tool from Smarts Console , also it can be used as a Smarts escalation tool . Script uses lamp utility to create an alert in OpsGenie. ogNotifyUsers is available for:

  • Windows ( ogNotifyUsers.cmd )
  • Linux (ogNotifyUsers.sh)
740

Scenario 1.a : Notify group of users from Smarts Console using a server tool

  1. Make sure you have completed "Deploy Smarts Integration on the Smarts SAM Server" steps.
  2. Create a server tool in Smarts Global Manager Administration Console.
257

2.a

203

2.b

  1. On the next screen :
  • Configure Program
  • Configure Timeout
  • Enable Display Output
  • Select User Profiles that will use the tool
485
  1. On the next two screens ( Context & Status ) , select ICIM_Notification for Context object.
369
  1. On the next screen , Optionally, define a prompt for the server tool to enable users to enter recipients interactively :
  • Enter Title
  • Click on Add Parameter
  • Recipients as name , User or Group for Text
  • Configure the Width to the value you need
444
  1. Click on the Finish Button on bottom of screen.
  2. Make sure the tool is created by selecting it from Domain > Tools > Server > Tool List .
  3. In Smarts console, right click to a notification and execute the tool you've created (for example "Notify Users"). If you have defined a prompt for the tool, enter the name of the OpsGenie group as the recipient. (Create a Group in OpsGenie if there isn't one already created)
    * Info : If Recipients is not entered from the Prompt Dialog ogNotifyUsers shell script will use "all" as Recipients.
599 459

And that's it; an alert will be created in OpsGenie and users in web_operations group will be notified according to their notifications preferences. You can use OpsGenie dashboard or OpsGenie mobile applications to view the alert and all the activity around the alert.

A sample alert from OpsGenie Dashboard created by Integration :

619

Scenario 1.b: Automated notifications via Smarts escalations

Smarts escalations allow executing shell scripts that pass a specified filter. Using escalations and OpsGenie, we can notify users automatically for subset of Smarts events.

  1. Make sure you have completed "Deploy Smarts Integration on the Smarts SAM Server" steps.
  2. Create a new Escalation Policy in Smarts Global Manager Administration Console.
195

2.a

259

2.b

  1. Add Path : after Notify Users escalation policy created , click on "Add Path" button below
349
  1. Insert Level :
  • When web_operations Path is created it will be gray ,
  • left click on the gray box ,
  • the box will be blue when selected
  • While the path is selected insert a level
390
  1. Level Tool Wizard : On Insert Level Dialog , Click on Tool Wizard
462 482
  1. Add Tool to your level :
  • Select Notify Users tool add to Invoked Tools
  • Click on OK
801
  1. Enable Path
  • Right click on the Level created
  • Select Path
  • Click on Enable
554

* Info : ogNotifyUsers shell script will use "all" as Recipients.

And that's it; Whenever a notification is created on Smarts , an alert will be created in OpsGenie automatically. Then default recipients (all) in ogNotifyUsers shell script will be notified according to their notification preferences. You can use OpsGenie dashboard OpsGenie mobile applications to view the alert and all the activity around the alert.

Scenario 2 : Rich Alerts - Notify group of users from Smarts with attaching device details to alert

Installation is very similar to Scenario 1 , except the shell script , ogNotifyUsersRich will be used in Scenario 2 :

  • Do your installation Similar to Scenario 1
  • Configure ogNotifyUsersRich shell script instead of ogNotifyUsers
  • Use ogNotifyUsersRich.cmd on Smarts Tool configurations instead of ogNotifyUser.cmd
  • For Windows use ogNotifyUsersRich.cmd , For Linux use : ogNotifyUsersRich.sh
  • For Linux : Make script executable : chmod +x ogNotifyUsersRich.sh
  • If Recipients is entered from Prompt Dialog that value will be used , if not "all" will be used as Recipients
  • Modify opsgenie-integration/conf/opsgenie-integration.conf , update Smarts Broker configuration :
    • smarts.username
    • smarts.password
    • smarts.brokerUsername
    • smarts.brokerPassword
    • No need to configure broker url because it is passed from smarts to the scripts automatically
    • This information will be used to get object details from Smarts Servers and attach to the OpsGenie alert

OpsGenie lamp utility allow executing groovy or ruby scripts ( with --executeScript switch ) to interact with the OpsGenie API and create richer notifications that provide context for the alert.

517

For example, in the groovy script, we can retrieve details of the object(router, switch, etc.) the notification is about, create html file and attach it to the alert in OpsGenie. We can also add logic to the script in order to determine who should be notified, etc. ogNotifyUsers.groovy script included in OpsGenie Smarts integration files can be used to retrieve object details from Smarts servers using Java API, and attach them to the OpsGenie alert as an html file. Credentials to access to the Smarts servers need to be provided in the configuration section of the script. Recipients can be hard coded, retrieved from interactive tool input, or driven from other alert properties.

792

As a result, the recipients will not only get a notification that indicates that there is a problem (for example router is down) but can also have direct access to supporting information such as device details from Smarts servers, performance charts, configuration/change records, event history, etc., empowering the recipients to assess the problem and determine the right course of action.

669 619

Scenario 3 : Executing Smarts User Actions from Mobile Devices & Web

OpsGenie enables users to execute customer actions directly on OpsGenie apps: Iphone, Android, OpsGenie Dashboard. For example, users may execute actions like acknowledge, take ownership to update notifications in Smarts. OpsGenie service can pass action data initiated by the user to Marid or a customer specified web application through a webhook.

Scenario 3.1 : Delegating OpsGenie user actions back to Smarts

OpsGenie provides a tool named Marid, which can retrieve user actions from OpsGenie. Marid does not have to be accessible from the web. It subscribes to OpsGenie and retrieves actions. Marid executes a groovy or ruby script for each action executed by the user. OpsGenie Smarts integration files comes with scripts for common Smarts actions like Acknowledge/Unacknowledge, and Take/Release Ownership. By using this feature actions executed via OpsGenie apps will be delegated to Smarts servers.

Deploy Marid For OpsGenie to Smarts Action Integration

  • Make sure you have completed Scenario 1 or Scenario 2 :
    • Make sure that you have at least one alerts created on OpsGenie from Smarts
    • Verify that alerts created on OpsGenie with Smarts Integration have actions acknowledge , unacknowledge , take ownership , release ownership on OpsGenie alert details.
  • Marid Installation :
    • Smarts Integration Files contains a customized version of Marid, you need to install this version.
    • Install Marid by referring to Marid Documentation - Installation steps. Do not download marid again.
    • Create an OpsGenie Marid Integration, make sure your Marid integration Alert Filter processes only Smarts alerts.
    • Copy Marid Integration apiKey into the opsgenie-integration/conf/opsgenie-integration.conf file as described in Marid Installation steps.
  • Modify opsgenie-integration/conf/opsgenie-integration.conf , update Smarts Broker configuration :
    • smarts.broker
    • smarts.username
    • smarts.password
    • smarts.brokerUsername
    • smarts.brokerPassword
    • This information will be used to execute actions on Smarts server.
  • Make sure that Marid is running by referring to Marid Documentation - Installation steps :
    • Marid should be started

📘

By defaul Marid executes a seperate script for each action by using action name. But Marid Smarts Integration uses a single groovy script file for all actions : smartsActionExecutor.groovy. This is achieved by using Marid action to script mapping, you might check opsgenie-integration/conf/opsgenie-integration.conf

Testing Actions from OpsGenie to Smarts

  • Go to any OpsGenie app Iphone, Android, OpsGenie Dashboard . Find an alert created with Smarts Integration.
  • Execute acknowledge, unacknowledge , release ownersip , take ownership actions in order on OpsGenie app
  • Verify that actions are visible on Smarts notification audit log . Result should look like

Executing actions from OpsGenie app :

330 330

Action Result on Smarts Notification audit log :

559

Scenario 3.1 : Processing user actions with Webhook

OpsGenie service can pass action data initiated by the user to a customer specified web application through a webhook. The webhook can be created at OpsGenie Webhook Integration page, the url specified in webhook needs to be accessible from the internet. The host application to serve the webhook url can be written using any programming language.

2150