Start Using PagerDuty Today
Try PagerDuty free for 14 days — no credit card required.
WhatsUp Gold provides a unified view and fully encompasses heterogeneous environments and vendors so you can see everything on your network. Improve your network performance and improve uptime throughout today’s diverse networks by monitoring and analyzing everything from one actionable, unified dashboard.
This integration works by logging WhatsUp Gold alerts to a file containing JSON formatted for our 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.
This guide and VBScript were written and tested on Windows Server 2012 R2 with WhatsUp Gold 2017. Earlier versions of WhatsUp Gold which do not support logging alerts to a file in the required format can be configured to send alerts to PagerDuty using an email integration instead.
C:
drive:
C:\PagerDuty
C:\PagerDuty\Queue
C:\PagerDuty
on your WhatsUp Gold server.
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.
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.
C:\Windows\System32\cscript.exe
, the Working path to C:\PagerDuty
, and the Program arguments to //B "C:\PagerDuty\PagerDuty.vbs"
.C:\Windows\System32\cscript.exe
and Add arguments to //B "C:\PagerDuty\PagerDuty.vbs"
, then click OK.You can customize the alert data sent to PagerDuty by changing the Log Message in your Log To Text File action. The file should be logged to C:\PagerDuty\Queue
with a .txt
file extension, and the content should be JSON that is formatted for our Events API.
Special Characters: If you have an alert which uses characters that will affect the JSON output, such as a quotation mark, then you will need to escape those characters with a backslash, or modify the VBScript to handle them. For example, if you add quotation marks to an alert, add a backslash (\
) before them so they look like \"
in your Log To Text File action. Other special characters can be escaped if needed by modifying the VBScript and using the Replace method, which is what we use in the script to escape backslashes, as backslashes have a special purpose in JSON as the escape character, but are also used in alerts containing Windows paths.
Lastly, you’ll want to make sure there is a Program Action configured that executes "C:\PagerDuty\PagerDuty.vbs"
using the CScript.exe
interpreter. This allows WhatsUp Gold to send the alert to PagerDuty immediately, rather than having to wait for the scheduled task to run before it gets sent to us.
Yes. Simply duplicate your Log To Text File actions and modify them to use a different PagerDuty integration key, create a new Action Policy that uses these new actions, then configure the desired devices to use this alternate Action Policy.
The VBScript will log errors to the Windows Application Event Log to help resolve problems with alerts not being sent to PagerDuty. You can also manually execute the VBScript via Command Prompt using CScript.exe "C:\PagerDuty\PagerDuty.vbs"
to see what happens to alert files in the queue step-by-step.
C:\PagerDuty
?If you would like the VBScript and alert queue directory to reside somewhere other than C:\PagerDuty
, you will need to modify the QueuePath
variable in the VBScript from C:\PagerDuty\Queue
to point to the location where you would like the alert queue to reside.
Although the VBScript can be executed from a shared folder or mapped network drive, we recommend using a local copy and alert queue on each system in case the host with the script becomes unavailable.
For example, if you configure WhatsUp Gold to write alerts to a queue on a file server and execute the VBScript hosted on that server, and that server goes down for any reason, WhatsUp Gold will not be able to write alert files or execute the VBScript to trigger an incident in PagerDuty for any WhatsUp Gold alerts until the file server is available again.
If PagerDuty can’t be reached for any reason, events will be stored in C:\PagerDuty\Queue
. The scheduled task to execute the VBScript will attempt to re-send the events at one minute intervals, so your WhatsUp Gold server should begin sending incidents to PagerDuty within a minute of being able to access the internet again.
Try PagerDuty free for 14 days — no credit card required.