Is there any PD plugin to get all service's integration keys for Sensu directly to filter these out?

I want to get all services and their integration keys using pd plugin and need to filter when creating alert for sensu. any plugin is there ?

HI,

We have the Sensu core integration and the Sensu Enterprise Integration for Pagerduty.

Regarding Integration and Service listings, you can use our API call here to achieve this. If you have any more specific questions about listing this out, as it will most likely contain sensitive information and IDs related to your account, please reach out on Support@pagerduty.com if you have any more questions.

Kind regards,
John

1 Like

Welcome @itsmesyam,

To go into more detail on doing this using the REST API: first, iterate through services (i.e. GET /services?offset=0&limit=100, GET /services?offset=100&limit=100 etc. until the more property is false). That will get you all services.

Then for each service, iterate through its integrations property, which should be an array of objects.

Then, for each object (representing an integration), you will want to include it or filter it out from the final list of results based on the vendor property that defines what kind of integration it is. Sensu’s vendor ID is PF8FPF1. So, putting it all together, in the integration object will be a vendor property, and this will be an object that has an id property, and if it’s a Sensu integration, this property will equal PF8FPF1.

For each matching integration, yield its integration_key property, and then the result is a list of Sensu-only integration keys.

2 Likes

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.