Elastic Observability

Create Elastic Alerting Rule with Pagerly Webhook Integration

1. Go to your ES Cloud Console and on the menu plane, Click "Management"

2. Click "Stack Management"

3. Click "Connectors"

4. Click "Create connector"

5. Click "Webhook"

6. Click the "Connector name" field.

Create Elastic Webhook in Pagerly

7. Create Integration on Pagerly - Go to workspace.pagerly.io

8. Click "My Integrations"

9. Click "Incidents"

10. Click "Add Inbound Integration"

11. Click "Select team..."

12. Click "Elastic" under Integration .

13. Click "Add Integration"

14. Go to Your Integrations and click the integration created under your team

15. Copy the generated Webhook URL

16. Switch to tab Connectors - Elastic"

17. Paste the Webhook under URL under Connector Settings

18. Click "None"

19. Add HTTP Header

20. Click the "Key" field.

21. Add Key as Content-Type and Value as application/json

22. Enter Connector Name as per your choice

23. Click "Save" and your Webhook Setting is Created

Trigger Webhook on Alerts

24. Click "Alerts"

25. Click "Manage Rules"

26. Click "Create rule"

27. Choose a rule type as you need. For the purpose of example we are choosing Metric Threshold

28. Click "Select a field"

29. Configure your Alert

30. Under Actions, click on Add Action

31. Choose the Webhook Connector you created previously

  1. Add the following body payload in the message

33.

34. Click "Settings"

35. Under Settings , make sure the action frequency is set for each alert : on status changes. and Run when: Alert

36. Create another action for the same alert. This time for resolution

37. Add the same body payload in the message

{
  "rule_url": "{{rule.url}}",
  "rule_name": "{{rule.name}}",
  "rule_type": "{{rule.type}}",
  "rule_params": "{{rule.params}}",
  "alert_id": "{{alert.id}}",
  "alert_uuid": "{{alert.uuid}}",
  "alert_actionGroup": "{{alert.actionGroup}}",
  "alert_actionGroupName": "{{alert.actionGroupName}}",
  "context_alertDetailsUrl": "{{context.alertDetailsUrl}}",
  "context_alertState": "{{context.alertState}}",
  "context_reason": "{{context.reason}}",
  "context_value": "{{context.value}}",
  "context_metric": "{{context.metric}}",
  "context_tags": "{{context.tags}}",
  "context_group": "{{context.group}}",
  "context_threshold": "{{context.threshold}}"
}

38. Click "Settings"

39. Under Settings , make sure the action frequency is set for each alert : on status changes. and Run when: Recovered

40. Click "Create rule" and You are good to go!

41. Switch to workspace.pagerly.io

42. Click "PAYLOAD MAPPING" to update any mappings for incident creation

Last updated

Was this helpful?