Skip to main content

Hello!

Below is what I’m i’m being faced with, however if there’s simply a link to any example app configs to make sure I’m not doing anything daft, then I’m happy to start there.

I’m presently trying to get the plugin working on a local test I have set up in the hopes we can use it on our production system. I’ve followed the guides in the documentation, going down the events API v2 route however I’m getting the following errors

r1] 2024-09-12T13:08:40.054Z pagerduty warn No PagerDuty accounts configuration found in config file. Reverting to legacy configuration. 
i1] 2024-09-12T13:08:40.054Z pagerduty warn No PagerDuty API token found in config file. Trying OAuth token instead... 


Which then goes on to fail as I’ve not set things up as per the legacy method. This is what I have in the app config (and also the local as this is where I’m running it from):

pagerDuty:
oauth:
clientId: ${PD_CLIENT_ID}
clientSecret: ${PD_CLIENT_SECRET}
subDomain: ${PD_ACCOUNT_SUBDOMAIN}
region: ${PD_ACCOUNT_REGION}

Is there something obvious I’m missing? I’ve installed the front end & back end plugins and the app has all the relevant permissions via the pagerduty portal.

 

Thanks in advance

Ben

Hi Ben

How are you passing the environment variables? Are they exported to the environment or included on the command line? If they are exported to the environment and you are using sudo, some systems will wipe the environment variables and include a fresh shell configuration.

You could try running with the variables on the same command line to see if they are picked up that way. The docs have an example at https://pagerduty.github.io/backstage-plugin-docs/getting-started/backstage/#for-scoped-oauth


Thanks for the response @mwalls 

Unfortunately this doesn’t seem to be an environment variable issue as I can pass the API key instead, which authenticates and successfully displays the card on a sample service I’m using the test with, although this has highlighted another weird behaviour when I attempt to incorporate the integration page, which I’ll most likely raise as an additional issue in Github (I raised this request there as well).

I will try adding sudo prior, but as my methods work when passing the API key without sudo, I doubt this is the issue.

One thing I’m not 100% sure on is the references to an account integration key (not to be confused with the integration key of the service integration I set up when running through the steps, here’s the quote I’m referring to:

To setup the PagerDuty plugin on Backstage you need to have an API Key - or client id and client secret for OAuth to generate an access token - and an Integration Key generated both for your account and service

 

Thanks again for the response, I’ll play around a little bit more and add an issue to the plugin page regarding the other weird behaviour I’m experiencing.


Reply