SolarWinds NPM Integration

SolarWinds® Network Performance Monitor (NPM) is powerful and affordable network monitoring software that enables you to quickly detect, diagnose, and resolve network performance problems & outages. With SolarWinds NPM's quick installation, you can discover your devices and start to monitor them. SolarWinds NPM Monitors & displays response time, availability, and performance of network devices. It also has an intelligent alerting system and executes actions (sending email, using Get or Post URL Functions etc.) on alert creation and reset.

A SolarWinds alert is an automated notification that a network event has occurred, such as a server becoming unresponsive. The network event that triggers an alert is determined by conditions set up when alert configuration.

What does OpsGenie offers to SolarWinds users?

OpsGenie provides a two-way rich integration for SolarWinds. Integration leverages SolarWinds's Send a Get or Post Request to a Web Server functionality and marid utility to automatically create alerts and synchronizes alert status between SolarWinds and OpsGenie.

With SolarWinds NPM Integration, OpsGenie acts as a dispatcher for these alerts, determining the right people to notify based on on-call schedules, notifying them using email, text messages (SMS), phone calls and iPhone & Android push notifications, and escalating alerts until the alert is acknowledged or closed.

OpsGenie has a specific API for SolarWinds NPM Integration, SolarWinds sends alerts to OpsGenie and OpsGenie handles automatic creation of alerts.


Functionality of the integration

  • SolarWinds triggers an alert when a monitored object satisfies the alert's conditions. When an alert is created in SolarWinds, an alert is also created in OpsGenie automatically through the integration.
  • When the alert is acknowledged in OpsGenie, alert is acknowledged automatically in SolarWinds as well, by executing the script in Marid.
  • When a note added to the alert in OpsGenie, a note is also added to the alert in SolarWinds as well, by executing the script in Marid.

Important Note: Make sure that your Microsoft servers have the following update installed: https://support.microsoft.com/en-us/kb/3109853
Microsoft servers (.NET based apps, MS S Channel, etc.) have problems with handling TLS(https) against Cloudflare; connection failures occur every one hour. You should install this update for the integration to work more stable.

Add SolarWinds NPM Integration in OpsGenie

  1. Please create an OpsGenie account if you haven't done already
  2. Go to OpsGenie SolarWinds NPM Integration page,
  3. Specify who should be notified for SolarWinds NPM alerts using the "Teams" and "Recipients" fields. Auto-complete suggestions will be provided as you type. 
  4. Copy the Api Key by clicking on the copy button or selecting.
  5. Click on "Save Integration".

Configuration in SolarWinds NPM

  1. In SolarWinds NPM, navigate to Alert Manager from "Settings" -> "Manage Alerts"

  2. In "Alert Manager" click "Add New Alert"

  3. Set alert properties. Provide information about the alert, including its name, severity, how frequently you want to evaluate the conditions, and if you want to restrict access to the alert using account limitations.

  4. Set trigger conditions. Trigger action will be executed when trigger conditions meet. SolarWinds NPM have a strong conditioning mechanism that gives users the opportunity to build complex conditions. All fields available in database can be used in these conditions. Because of available variable variety and flexibility, building conditions in SolarWinds rather than OpsGenie is highly recommended.

  5. Set reset condition. Reset action will be executed when reset condition meet.

  6. Set the time interval that your alert will monitor your network. It can be always enabled or can be restricted to specified time.

  7. Set the trigger action. With trigger action, SolarWinds NPM posts alert data to OpsGenie and an alert will be created in OpsGenie. To POST data to OpsGenie, trigger action should be Send a Get or Post Request to a Web Server.

    Choose Post Method, paste Integration URL you copied while saving SolarWinds NPM Integration in OpsGenie.
    Then, enter the variables that you want to send to OpsGenie with the format variable1=val1&variable2=val2. All variables you send with Trigger action to OpsGenie can be used in alerts field of "Create Alert Action" of your SolarWinds NPM Integration.
    You can specify teams, recipients and tags by putting them into the content. You can find the default trigger action body can be send from SolarWinds here.

    alias field in example content, becomes the SolarWinds alerts alias field. If you want to make differen alias configuration, you can change the value of alias field in post content. Make sure alias configurations in both Trigger and Reset are the same.

    OpsGenie parses incoming data and creates robust alerts according to the incoming content. Modifying alert fields with the incoming data can be done via draggable fields.

    Alerts can be created for any monitored object (Nodes, Volumes, Interfaces etc.) in SolarWinds. While using Send Http Request action, common fields and monitored object specific fields can be send. In OpsGenie SolarWinds NPM Integration, alert specific fields are available as custom integration fields. But it still supports dynamic fields to be send to OpsGenie.

    Let's say you want to put NodeID variable to your alert in OpsGenie. It's not in available integration fields but if you send it from SolarWinds NPM, you can use it in your alert configuration dynamically. Just make sure the variable name you use in OpsGenie and SolarWinds NPM is the same.
    You can add NodeID variable to Http Post Body like:
    NodeID=${N=SwisEntity;M=NodeID} and then use it your SolarWinds NPM Integration Create Alert Action's alert fields like following {{NodeID}}

  8. Set the reset action. With reset action, SolarWinds NPM posts the data that will close the corresponding alert in OpsGenie. Reset action should be configured with Send a Get or Post Request to a Web Server option. You can find the default reset action body can be send from SolarWinds here.

  9. After reviewing alert, click SUBMIT

Configure OpsGenie to SolarWinds Integration (Optional)

Marid utility with a SolarWinds specific script can be used to update the state of the alerts in SolarWinds when they get updated in OpsGenie. For example, when a SolarWinds alert is acknowledged in OpsGenie from their mobile devices using the OpsGenie app, alert gets acknowledged in SolarWinds, and when users add comments to alerts in OpsGenie, comments get posted to SolarWinds as well. Marid subscribes to alert actions in OpsGenie and reflects these actions on Solarwind by using SolarWinds API.

You can download Marid zip file including solarwind specific script from downloads page.

For 32 bit systems

  • To install Marid as a service in your Windows server:
    marid.exe -install
  • To start Marid, run the following command:
    marid.exe -start
  • To stop Marid, run the following command:
    marid.exe -stop

For 64 bit systems

  • To install Marid as a service in your Windows server:
    marid_64.exe -install
  • To start Marid, run the following command:
    marid_64.exe -start
  • To stop Marid, run the following command:
    marid_64.exe -stop

Marid is a java application; therefore requires the Java Runtime version 1.6+ Both the Open JDK and Oracle JVMs can be used.

In order to use this feature "Send Alert Actions To SolarWinds" checkbox should be enabled in OpsGenie SolarWinds Integration.
To set JAVA_HOME environment variable, refer to Setting JAVA_HOME for more information.

To be able to execute actions in SolarWinds, Marid gets the configuration parameters from <MARID_HOME>/conf/marid.conf file.

Configuration Parameters
solarwinds.url URL to update SolarWinds alerts when alerts get acknowledged, commented, etc.
solarwinds.host SolarWinds host.
solarwinds.login Credentials to authenticate SolarWinds web server to get update alerts when alerts get acknowledged, commented, etc.
solarwinds.password

For more information refer to Marid Integration Server and Alert Action Execution

SolarWinds integration package does not support SSL v1.0. If your SolarWinds Server has SSL v1.0, we suggest you to upgrade your SSL server.

Sample parameters sent from SolarWinds to OpsGenie

Trigger Action Parameters:

ActionType:Create
alias:1
ObjectID:1
NodeName:172.31.14.211
Acknowledged:Not Acknowledged
AcknowledgedBy:
AcknowledgedTime:Never
AcknowledgeUrl:http://WIN-PM7542TQNF9:8787/Orion/Netperfmon/AckAlert.aspx?AlertDefID=1
AlertDefID:e896e98d-b36b-4d7d-a32b-d6016269841d
AlertDescription:default description
AlertDetailsUrl:http://WIN-PM7542TQNF9:8787/Orion/View.aspx?NetObject=AAT:1
AlertID:49
AlertMessage:deneme was triggered
AlertName:deneme
AlertTriggerCount:312
AlertTriggerTime:Tuesday, January 5, 2016 8:16 AM
Application:SolarWinds.Core.Common
DateTime:Tuesday, January 5, 2016 8:16 AM
DownTime:0
LastEdit:Tuesday, January 5, 2016 8:16 AM
ObjectType:Node
Severity:Critical
TimeOfDay:Alert is always enabled
teams:team1, team2
recipients:test@abc.com, test2@abc.com
tags:tag1,tag2
                        

This parameters are parsed by OpsGenie as

[
    "ActionType": "Create",
    "ObjectID": "1",
    "NodeName": "172.31.14.211",
    "AlertDefID": "e896e98d-b36b-4d7d-a32b-d6016269841d",
    "DownTime": 0,
    "AlertTriggerTime": "Tuesday, January 5, 2016 8:16 AM",
    "DateTime": "Tuesday, January 5, 2016 8:16 AM",
    "AlertTriggerCount": 312,
    "ObjectType": "Node",
    "AlertID": "49",
    "alias": "1",
    "AcknowledgedTime": "Never",
    "AlertMessage": "deneme was triggered",
    "TimeOfDay": "Alert is always enabled",
    "AcknowledgedBy": "",
    "AlertName": "deneme",
    "teams": "[team1, team2]",
    "originalTags": "[tag1, tag2]",
    "AcknowledgeUrl": "http://WIN-PM7542TQNF9:8787/Orion/Netperfmon/AckAlert.aspx?AlertDefID=1",
    "Severity": "Critical",
    "originalExtraProperties": "[AlertDefinitionID:e896e98d-b36b-4d7d-a32b-d6016269841d, ObjectType:Node, ObjectID:1]",
    "tags": "[tag1, tag2]",
    "AlertDescription": "default description",
    "LastEdit": "Tuesday, January 5, 2016 8:16 AM",
    "recipients": "[test@abc.com, test2@abc.com]",
    "AlertDetailsUrl": "http://WIN-PM7542TQNF9:8787/Orion/View.aspx?NetObject=AAT:1",
    "Application": "SolarWinds.Core.Common",
    "Acknowledged": "Not Acknowledged"
]

Troubleshooting

SolarWinds NPM sends body without making any escaping on data. So, if any of your variables contains any characters that needs to be escaped (like &), please send your data in advanced mode. Use µ#µ instead of = and §#§ instead of &. You can find troubleshooting version of the default content for trigger action here and reset action here.

Sending the data from SolarWinds NPM to OpsGenie following two formats will produce the same result in OpsGenie.

Please make sure that your Body to Post text matches with the one in here to be able to Acknowledge/Close/AddNote actions on SolarWinds side.

Source

The source code of the marid script is also available at GitHub OpsGenie Integration repository.