
Community Archive (Customer) asked a question.
This integration works by logging WhatsUp Gold alerts to a file containing JSON formatted for PagerDuty's Events API. A VBScript then iterates through every file in the queue directory where alerts are written to and sends the JSON to PagerDuty, deleting the alert file after it has been accepted by the server.
In PagerDuty
1. Go to the Configuration menu and select Services.
2. On the Services Page:
- If you are creating a new service for your integration, click Add New Service
3. Select your app from the Integration Type menu and enter an Integration Name.
- If you are creating a new service for your integration, in General Settings, enter a Name for your new service. Then, in Incident Settings, specify the Escalation Policy, Notification Urgency, and Incident Behavior for your new service.
4. Click the Add Service or Add Integration button to save your new integration. You will be redirected to the Integrations page for your service.
5. Copy the Integration Key for your new integration.
On Your WhatsUp Gold Server
1. Create the following directories on your WhatsUp Gold server's C: drive:
2.Download the attached VBScript, saving it to C:\PagerDuty on your WhatsUp Gold server.
3. Log in to the WhatsUp Gold web console as admin, then go to Settings-> Actions & Alerts -> Actions and Policies
4. Create a new Log to Text File action in the Action Library.
5. Give the new action a Name such as “Log Alert to PagerDuty Queue”, set the Log file path to C:\PagerDuty\Queue\%Device.HostName_Down.txt, change the Log file write mode to Overwrite, then copy and paste the following into the Log Message field:
{
"service_key": "YOUR-INTEGRATION-KEY-HERE",
"incident_key": "%Device.Address Monitors Down",
"event_type": "trigger",
"description": "%Device.ActiveMonitorDownNames %Device.State on %Device.HostName",
"details": {
"Monitors that are down": "%Device.ActiveMonitorDownNames",
"Monitors that are up": "%Device.ActiveMonitorUpNames",
"Host Name": "%Device.HostName",
"IP Address": "%Device.Address"
}
}
Be sure to replace YOUR-INTEGRATION-KEY-HERE with the PagerDuty integration key you created earlier.
6. Create another new Log To Text File action in the Action Library. Give this new action a Name such as “Log Recovery to PagerDuty Queue”, set the Log file path to
C:\PagerDuty\Queue\%Device.HostName_Up.txt, change the Log file write mode to Overwrite, then copy and paste the following into the Log Message field:
{
"service_key": "YOUR-INTEGRATION-KEY-HERE",
"incident_key": "%Device.Address Monitors Down",
"event_type": "resolve",
"description": "%Device.ActiveMonitorDownNames %Device.State on %Device.HostName"
}
Be sure to replace YOUR-INTEGRATION-KEY-HERE with the PagerDuty integration key you created earlier.
7. Create a new Program Action and give the new action a Name such as “Execute PagerDuty VBScript”, set the Program file name to C:\Windows\System32\cscript.exe, the Working path to C:\PagerDuty, and the Program arguments to //B "C:\PagerDuty\PagerDuty.vbs".
8. Create a new Action Policy and give it a Name such as “PagerDuty” (or edit an existing policy already in use by the devices you want to start triggering alerts for in PagerDuty) then add the PagerDuty actions you created for both Up and Down states. The Log Alert action should be performed for the Down state, and the Log Recovery action should be performed for the Up state, while the Program Action (VBScript execution) should be performed for both states, but after the Log Alert or Log Recovery action has been performed.
9. Configure your devices to use this Action Policy by going to My Network, selecting a device, and clicking Properties. Go to the Actions tab and select Edit next to Apply the following Action Policy, then choose the Action Policy you created or updated in the previous step.
(continued in next post)
This is not Officially Supported by WhatsUp Gold