2022-10-11 00:19:01 +05:30
## Check-System-Usage


[](https://github.com/psf/black)

### About
A Python3 script to send your desired payload to PagerDuty and create an incident
### Steps
2022-10-11 00:21:14 +05:30
* Make sure you have create a serive in your PagerDuty account. [Refer here ](https://support.pagerduty.com/docs/services-and-integrations ) if not done already
2022-10-11 00:19:01 +05:30
* Copy the Integration Key from the settings of the service as shown below and paste it in your env file
< img width = "1344" alt = "Screenshot 2022-10-11 at 12 09 33 AM" src = "https://user-images.githubusercontent.com/10003129/194933099-13dd03b8-c139-4366-bf18-272fd2ae7392.png" >
* Import the file as a module
* Send your desired payload to the module
2022-10-11 00:26:31 +05:30
* My example of payload
2022-10-11 00:27:26 +05:30
```
2022-10-11 00:26:31 +05:30
payload= {
2022-10-11 00:31:25 +05:30
"resource_id" : resource_id,
2022-10-11 00:26:31 +05:30
"system_data":"This a resource in the development system of XYZ corp.",
"tags":"'HA System','Non-critical-system','SpringBoot-App'"
2022-10-11 00:27:26 +05:30
```
2022-10-11 00:26:31 +05:30
* Finalize your payload accoring the parameters(severity,components etc .)
2022-10-11 00:19:01 +05:30
* Voila! If everything works fine you will recieve a Page