This article explains how to integrate mKC with PagerDuty.
How to Create a Custom Recipient Alarm
- Go to Alarm > Recipients > Manage Recipients Type.
- Click the Create custom recipient type button to go to the creation page.
- Enter the information in the Recipient type Config section. Provide a Custom recipient Name and Description.
If you create target in the future , the Custom Recipient Name will be displayed in the recipient type selection list. - In the Target input, enter the value of the
--url
option of thecurl
command.
https://events.pagerduty.com/v2/enqueue
Here is an example of a curl command: - Scroll down to the bottom and enter the information in the Custom fields section.
- First, press the Headers tab to enter the header information. Enter the
-header
option value of thecurl
command.
Here is an example of a curl command: - Click the plus button. Enter
Content-Type
for the Field Name andapplication/json
for the value. After entering the field information, click the Add button to add more fields. - After adding the field, you will see that the "Content-Type" field has been added, as shown in the below image.
- Next, enter body information. Click the Body Fields tab, which will enter the
-data
option value of thecurl
command.
Here is an example of a curl command: - Now, enter the values below the 'payload' object.
Click Plus button and entersummary
as the Field Name. This field must appear below 'payload,' so specify the Parent Field as the payload field you just created. EnterTest Incident
as the value and click the Add button to add the field. - Similarly, enter the severity and source fields from the
curl
command under 'payload.' Therouting_key
andevent_action
fields should be entered in the Root Field. - Once you’ve entered all fields, the following Body Fields will be complete. Click the Create button at the bottom to complete the Custom Recipient Type creation.
- You will see that the custom recipient type has been successfully created and displayed in the list, as shown below.
- You can now select the Custom Recipient Type and use it as the Recipient Type when creating an Alarm > Target.