Sending NetCrunch alerts to PagerDuty

See how you can configure your NetCrunch to forward alerts and convert them into incidents in the PagerDuty

In this article, we will explain how to set-up the two-way integration of NetCrunch with PagerDuty. The result will allow you to forward alerts from NetCrunch to PagerDuty and also use webhook to send 'ticket closed' messages back to NetCrunch. This will close the relevant alert in NetCrunch after it has been closed in PagerDuty.

Enable NetCrunch to post alerts to PagerDuty

To enable NetCrunch to post important alerts to PagerDuty, you need to first set up an Integration Profile for PagerDuty. To do so, click MonitoringIntegration Profiles at the top of the NetCrunch application.

In the editor, you will be asked for a Service Integration Key and a PagerDuty API Key. To create a Service Integration Key, create an integration on a PagerDuty service, and select "NetCrunch" as the type:

Add Service Integration Key
PagerDuty API Key

Next, have a PagerDuty admin generate a REST API token on the API Access page and paste this into your NetCrunch Integration Profile under "PagerDuty API Key". For more information on how to generate an API key, follow this link: Generating an API Key

Integration Profile

Create an alert that sends messages to PagerDuty

To allow NetCrunch to utilize this integration, it's necessary to create an alerting script (or edit an already existing one). The steps below explain how to create a new alerting script.

  • Click Monitoring Alerting Escalation Scripts
  • In the Alerting Scripts Window click Add Alerting Script
  • Click Add and select Action to Run Immediately
  • Click the Integrations tab and select PagerDuty Incident
Create alerting Script

A new window will appear, but there's not much to configure here. Make sure that you are using the correct profile. Test sending messages to PagerDuty by clicking Test. A small window with the test procedure will appear, and if everything is configured properly, the test should finish with "Successfully executed" and a test message should now appear in the PagerDuty Service.

Test the Integration

However, this will not work with the "Resolve Incident" operation. To test the "Resolve Incident" operation you need to create an alerting script with a "Create Incident" operation as an Action to Run Immediately and the "Resolve Incident" operation as Action to Run on Alert Close. Select a node and create an alert (for example Node Monitoring Disabled) to test and assign the alerting script to. The following steps explain how to create a "Node Monitoring Disabled" alert for a single node.

  • Right-click the node where you want to create an alert
  • Select the Node Settings and click Alerts&Reports in the node settings window
  • Click Add Alert, select the Basic tab and choose Node monitoring is disabled
  • Right-click the new Alert and select Assign Predefined Alerting Script Your Script name
Assign the alerting Script

If you now trigger the alert (Disable the Node Monitoring), you will create an Incident. If this alert is closed (Node Monitoring Enabled) the Incident will be Resolved. When such an alerting script is attached to various alerts, NetCrunch will send messages to PagerDuty each time the given alert is generated.

Result

It is also possible to send alerts to different services, but you have to create a new profile for each new service you want to address and you have to make sure that their "Integration Settings" are correct.

WebHooks (Two-way-integration)

PagerDuty is just one of our many two-way-integrations available in NetCrunch. You can easily configure a WebHook that sends information back to NetCrunch when the Incident is Resolved in PagerDuty so that the respective alert in NetCrunch is closed as well. This does not resolve the problem which caused the alert, but it will close the alert generated by NetCrunch (i.e. Node will still be down even though the alert is closed).

To receive WebHooks from PagerDuty, you need to configure the NetCrunch API Key access. To do so, go to the PagerDuty Integration Profile and click "Open API Key Manager". Copy the WebHook URL and replace the [Web_Access_address] with your Web access address (i.e.https://123.456.789.0/ncinf/rest...).

API Key Manager

Go to PagerDuty, select the Integrations tab, and add a new Extension. select Generic V1 WebHook as Extension Type, name it and add the URL with your replaced Web_Access_Address in the field for the URL.

Now, when NetCrunch creates a ticket and it is resolved by a PagerDuty agent, the alert in NetCrunch will be closed as well.

Alert closed

Here you can sign up for PagerDuty 14-day trial and test it in your network environment.


integrationpagerduty

NetCrunch Network Monitoring

Network Maps, Dashboards, and Alerts.
Monitor anything. Network, cloud, config.