1. Home
  2. Integrations
  3. Solarwinds Orion Integration Guide – VictorOps

Solarwinds Orion Integration Guide – VictorOps

The following will walk you through the steps needed to integrate Solarwinds Orion alerts to VictorOps using the REST endpoint. Also see the Solar Winds Guide for integration with VictorOps

In VictorOps

  1. In your account, navigate to Settings > Alert Behavior > Integrations
  2. Select SolarWinds
  3. Enable the integration
  4. Copy the Service API Endpoint to a note.
  5. Be sure to replace $routing_key with a valid, case sensitive routing key in your account.

In SolarWinds

Create a Limited Rights User for SolarWinds Alert Management

  1. From the Main Settings & Administration section in SolarWinds go to User Accounts > Manage Accounts.
  2. Select Add New Account
  3. Select Orion individual account, click Next
  4. In the User Name field enter solarwindsapi
  5. Enter a password, click Next
  6. In the Define Settings section, scroll down to Alerts. Change the dropdown box Allow Alert Management Rights to Yes.
  7. Scroll to the bottom and click Submit.

Add the Limited Rights User to the SAM Credential Library

  1. From the Main Settings & Administration section in SolarWinds go to SAM Settings > GLOBAL SAM SETTINGS > Credential Library
  2. Add the limited user account created above. For the credential name use SolarWinds API User
  3. From the Manage Nodes page in SolarWinds, Add a new Node
  4. For the Node name enter victorops.com

Create an external node for VictorOps.com

  1. From the Manage Nodes page in SolarWinds, Add a new Node
  2. For the Node name enter victorops.com

Edit the VictorOps Ack-Back Application Template

  1. If you have not already import the VictorOps Ack-Back application template from thwack (available at the bottom of this page)
  2. Select the VictorOps Ack-Back application template under Manage Application Monitor Templates, click Edit
  3. Note the Polling Frequency
    1. The Polling Frequency is set to 60 seconds. I would recommend leaving this custom setting to avoid ack-back delays.
  4. Expand the Component Ack-Back Get Requests
  5. Change the Credential for Monitoring to the SolarWinds API User
  6. Update the PowerShell script with your VictorOps API Company ID, API Key and SolarWinds
    primary server name. You can find the API values from your VictorOps portal under Settings > API. Near the top of the powershell script you will find two variables, $API_ID and $ApiKey. Enter your API company ID and API key from VictorOps.

    #Victor Ops Company ID
    $API_ID = "Your ID"
    #Victor Ops API Key
    $ApiKey = "Your API Key"
    #Set to your SolarWinds Primary Application Server
    $SolarWindsServer = "Your Primary SolarWinds Server Name"
  7. Click Submit.
  8. Assign the VictorOps Ack-Back application template to the victoroops.com node created earlier

Configure Alerts

The application template can be assigned to any node; however, this step creates a more visually appealing look in your SolarWinds instance.

  1. Go into the Advanced Alert Managersolarwinds1
  2. Select Configure Alerts
    solarwinds2
  3. Select New to create a new alert.solarwinds3
  4. Name your new alert and then go to Trigger Actions.solarwinds4
  5. Create a new Action by selecting Trigger Actions and then Add New Action.solarwinds5
  6. Select the Get or Post a URL to a Web Server action.solarwinds6
  7. Select use HTTP POST and enter your VictorOps REST Endpoint URL.solarwinds7

Example Body Payloads

The below payloads are valid templates containing all of the required fields though they may be added to so long as the required fields remain present. Also note that a ‘\’ character cannot be user in the HTTP post. Instead use an SQL replace function in the SolarWinds Alert:

SQL: SELECT REPLACE ('''${Caption}''','\',' ')}

Node is Down

Trigger Action

1
2
3
4
5
6
7
8
9
10
11
{
  "message_type":"CRITICAL",
  "monitor_name":"SolarWinds",
  "monitoring_tool":"SolarWinds",
  "alert_rule":"${N=Alerting;M=AlertName}",
  "state_message":"${NodeName} is ${Status}",
  "entity_display_name":"${NodeName} is ${Status}",
  "entity_id":"${N=Alerting;M=AlertObjectID}",
  "host_name":"${NodeName}",
  "ip_address":"${Node.IP_Address}"
}

Recovery or Reset

1
2
3
4
5
6
7
8
9
10
11
{
  "message_type":"RECOVERY",
  "monitor_name":"SolarWinds",
  "monitoring_tool":"SolarWinds",
  "alert_rule":"${N=Alerting;M=AlertName}",
  "state_message":"${NodeName} is ${Status}",
  "entity_display_name":"${NodeName} is ${Status}",
  "entity_id":"${N=Alerting;M=AlertObjectID}",
  "host_name":"${NodeName}",
  "ip_address":"${Node.IP_Address}"
}

Volume Space Alert

Trigger Action

1
2
3
4
5
6
7
8
9
10
11
{
  "alert_rule":"${N=Alerting;M=AlertName}",
  "entity_display_name":"${NodeName} ${SQL: SELECT REPLACE ('''${Caption}''','\',' ')} has ${VolumeSpaceAvailable} free",
  "entity_id":"${N=Alerting;M=AlertObjectID}",
  "host_name":"${NodeName}",
  "ip_address":"${Node.IP_Address}",
  "message_type":"CRITICAL",
  "monitor_name":"SolarWinds",
  "monitoring_tool":"SolarWinds",
  "state_message":"${NodeName} ${SQL: SELECT REPLACE ('''${Caption}''','\',' ')} has ${VolumeSpaceAvailable} free"
}

Reset Action

1
2
3
4
5
6
7
8
9
10
11
{
  "alert_rule":"${N=Alerting;M=AlertName}",
  "entity_display_name":"${NodeName} ${SQL: SELECT REPLACE ('''${Caption}''','\',' ')} has ${VolumeSpaceAvailable} free",
  "entity_id":"${N=Alerting;M=AlertObjectID}",
  "host_name":"${NodeName}",
  "ip_address":"${Node.IP_Address}",
  "message_type":"RECOVERY",
  "monitor_name":"SolarWinds",
  "monitoring_tool":"SolarWinds",
  "state_message":"${NodeName} ${SQL: SELECT REPLACE ('''${Caption}''','\',' ')} has ${VolumeSpaceAvailable} free"
}

Component Based Alert

Trigger Action

1
2
3
4
5
6
7
8
9
10
11
{
  "message_type":"CRITICAL",
  "monitor_name":"SolarWinds",
  "monitoring_tool":"SolarWinds",
  "alert_rule":"${N=Alerting;M=AlertName}",
  "state_message":"${NodeName} ${N=SwisEntity;M=ComponentAlert.ComponentName} is ${N=SwisEntity;M=Status;F=Status}",
  "entity_display_name":"${NodeName} ${N=SwisEntity;M=ComponentAlert.ComponentName} is ${N=SwisEntity;M=Status;F=Status}",
  "entity_id":"${N=Alerting;M=AlertObjectID}",
  "host_name":"${NodeName}",
  "ip_address":"${Node.IP_Address}"
}

Reset Action

1
2
3
4
5
6
7
8
9
10
11
{
  "message_type":"RECOVERY",
  "monitor_name":"SolarWinds",
  "monitoring_tool":"SolarWinds",
  "alert_rule":"${N=Alerting;M=AlertName}",
  "state_message":"${NodeName} ${N=SwisEntity;M=ComponentAlert.ComponentName} is ${N=SwisEntity;M=Status;F=Status}",
  "entity_display_name":"${NodeName} ${N=SwisEntity;M=ComponentAlert.ComponentName} is ${N=SwisEntity;M=Status;F=Status}",
  "entity_id":"${N=Alerting;M=AlertObjectID}",
  "host_name":"${NodeName}",
  "ip_address":"${Node.IP_Address}"
}
Updated on October 26, 2017

Was this article helpful?

Related Articles