Can I automate component/incident rule creation for my pagerduty services via the Statuspage API?
Asked by Joey Bloom:

My company is investigating whether we can use Atlassian Statuspage for our internal microservices. Our plan is to set up a private status page with a component for each microservice, and automate the component statuses via the Pagerduty integration.

Our set of microservices is constantly evolving; we regularly create new ones and decommission old ones. We'd like to automate this by using the Statuspage API to keep our set of components up to date. To complete our system we'd need to also keep our Pagerduty component rules up to date.

To illustrate, when we create a new microservice we'd like to automatically create

- a Pagerduty service

- a Statuspage component

- three incident templates - for incident creation, update, and resolution.

- a component rule to mark an outage on the microservice's component when there's a Pagerduty incident in its Pagerduty service

- Incident rules using the three incident templates

However I don't see any way to automatically manage component or incident rules for the Pagerduty Integration. I'm looking in the API docs here <https://developer.statuspage.io/>.

Can Statuspage support this level of automation?


Answers:
author: Travers
body: Hi Joey,

Happy to answer your questions on Component automation for Statuspage using PagerDuty!

First, I would take a look at our documentation on configuring the [PagerDuty integration](https://support.atlassian.com/statuspage/docs/set-up-a-pagerduty-integration/). This will allow you to setup Component rules for PagerDuty Incidents to automate resource outages.

Second, I would use the following documentation to create the appropriate [Statuspage Incident templates .](https://support.atlassian.com/statuspage/docs/create-an-incident-template/)

Last, you may use our documentation on supported [PagerDuty mustache tags](https://support.atlassian.com/statuspage/docs/pagerduty-mustache-tags/) to automate the use of Incident templates.

I hope this information was helpful!

comments: author: Joey Bloom
body: Hi Travers, this does not answer my question. I've read all that documentation and the steps you describe are all manual configuration (i.e. a human needs to click things in a web browser). I'm specifically calling out missing functionality from the Statuspage API (<https://developer.statuspage.io/>): I need to be able to automatically (via an API) configure the component rules and incident rules for my statuspage-pagerduty integration.


author: Travers
body: Hi Joey,

Thank you for the clarification! Currently, Statuspage API does not have the desired functionality.

However, there is an exiting feature request for the ability to manage Pagerduty service rules via the Statuspage API. I have added this Community post as a support case in the request.

Should the feature request be added to the Statuspage development roadmap, Support will reach out with more details.

I hope this information was helpful!


author: Anuj Tyagi
body: Hi Travers, Do you know when are we expecting the feature request to be available? Any plans for this year?


author: Travers
body: Hi Anuj,

Welcome to the Statuspage Community! The feature request to manage PagerDuty service rules via Statuspage API was not added to the development roadmap for this year. So, I do not have an estimated time of release.

However, I have added this Community post as a support case in the request.

Should the feature request be added to the Statuspage development roadmap, Support will reach out with more details.

I hope this information was helpful!


author: Anuj Tyagi
body: Also, do you know if we can monitor only subset of PagerDuty services from StatusPage instead of pulling all of them?

When I am trying currently, Statuspage pull all the PagerDuty services but I want to only add few of them. Any way to control that? Also, any suggestions to automate Pagerduty service rules configuration? Adding/updating hundreds of service rules would be very difficult to do manually.


author: Anuj Tyagi
body: I was going through documentation but couldn't find any way to limit subset of services to monitor.

I found this on another similar tool called statuspal: <https://help.statuspal.io/article/61-pagerduty-statuspal-status-page>

##### **PagerDuty Integration Rules** {#toc-hId-2014477490}

In order to automate incident creation and closure from PagerDuty **you need to configure what services and severity of PagerDuty incidents should be monitored** and what services and severity should the corresponding Statuspal incident be created with.

Does Statuspage support incident creation and monitoring for only specific Pagerduty services based on severity?


author: Travers
body: Anuj,

You can automate just component status changes, just incident creation/updating, or both component and incident changes.

Statuspage lets you map PagerDuty services to Statuspage components, so this may require you to make your PagerDuty services more granular. As an example, you could split out your 'Pingdom' service into 'Pingdom - API' and 'Pingdom - Dashboard'.

This will give you greater control over your Statuspage automation and will also give you better reporting and analytics within PagerDuty.

Here is out full documentation on our [Statuspage PagerDuty Integration.](https://support.atlassian.com/statuspage/docs/set-up-a-pagerduty-integration/)

I hope this information was helpful!


Tags: cloud