sentry icon indicating copy to clipboard operation
sentry copied to clipboard

PagerDuty Integration: Unable to add integration on self-hosted sentry

Open Elektordi opened this issue 5 years ago • 5 comments

Hello,

I'm unable to add a PagerDuty integration to a freshly installed self-hosted Sentry server.

After logging on pagerduty, I get this error: App not found.

The url at this moment is: https://xxxxxxx.pagerduty.com/install/integration?app_id=&redirect_url=http://x.x.x.x:9000/extensions/pagerduty/setup/&version=2 The app_id is empty. I was able to find the Sentry app_id from pagerduty, which seems to be PKAPG94. And then if I update the url, I can select projects from my pagerduty account. But still can't continue because of the error: The supplied redirect URL does not match a redirect URL configured by this app.

I think the automatic integration may not be working on self-hosted servers. Is there any way to manually add the integration (like, copy-pasting integration keys from pagerduty)? Or maybe disable the automatic integration on self-hosted by default if it's not supposed to work...

Thanks,

Elektordi avatar Jan 31 '21 19:01 Elektordi

Ok, nailed it. If anyone else needs to fake the integration, here is the url you need to call: http://x.x.x.x:9000/extensions/pagerduty/setup/?config=%7B%22account%22%3A+%7B%22name%22%3A+%22Example+company%22%2C+%22subdomain%22%3A+%22example%22%7D%2C+%22integration_keys%22%3A+%5B%7B%22type%22%3A+%22service%22%2C+%22integration_key%22%3A+%22xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%22%2C+%22id%22%3A+%22ZZZZZZZ%22%2C+%22name%22%3A+%22Test%22%7D%5D%7D

Where the parameters is the url_encoded of the json below:

{
   "account" : {
      "name" : "Example company",
      "subdomain" : "example"
   },
   "integration_keys" : [
      {
         "type" : "service",
         "integration_key" : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
         "id" : "ZZZZZZZ",
         "name" : "Test"
      }
   ]
}

Elektordi avatar Jan 31 '21 19:01 Elektordi

Looks like we need to add an integration guide here: https://develop.sentry.dev/integrations/ @manuzope

BYK avatar Feb 01 '21 11:02 BYK

2 years later and still not in the documentation. Did this not work for others? I am having a similar issue. For me sentry does not consider pagerduty installed.

mpechner-akasa avatar Feb 16 '23 19:02 mpechner-akasa

Just adding a note here. For self hosted sentry (using helm chart) setting pagerduty.app-id in config.yaml or even setting it as SENTRY_OPTIONS['pagerduty.app-id'] = <id> in pyConfig has no effect.

A pagerduty user that has permissions to create apps has to go through https://develop.sentry.dev/integrations/pagerduty create the app then for each org in sentry go through the UI workflow of setting up pagerduty.

Setting either of the mentioned parameters has no bounds on sentry.

chipzzz avatar May 10 '24 19:05 chipzzz

Routing to @getsentry/product-owners-settings-integrations for triage ⏲️

getsantry[bot] avatar May 13 '24 22:05 getsantry[bot]

@BYK , has anyone solved this for self-hosted? The only way I got it to work was as I described here. IT doesn't work deployment wide, you still have to do it per org. Also you have to create your own sentry app, self-hosted cannot use the global sentry app available on Pagerduty

https://github.com/getsentry/sentry/issues/23480#issuecomment-2105185908

chipzzz avatar Jun 25 '24 15:06 chipzzz

To add this is a multi-org environment.

chipzzz avatar Jun 25 '24 16:06 chipzzz