grafana / oncall

Developer-friendly incident response with brilliant Slack integration
GNU Affero General Public License v3.0
3.55k stars 294 forks source link

How to initialize Grafana oncall to the specified organization #5251

Closed zt4123 closed 1 week ago

zt4123 commented 4 weeks ago

What went wrong?

What happened:

curl -X POST 'http://admin:admin@localhost:3000/api/plugins/grafana-oncall-app/resources/plugin/install'

Orgs other than Main org will prompt out "Unauthorized/Forbidden while accessing OnCall engine: /api/internal/v1/plugin/v2/status, status code: 403, check token" or "jsonData.stackId is not set", and there's no token created under Service Account section.

What did you expect to happen: I know the Grafana OnCall engine only support one instance of the Grafana OnCall plugin at a time.

How do we reproduce it?

  1. Install grafana oncall plugin through DashBoard CRD.
  2. Enable oncall plugin in GUI.
  3. Make API calls to install as suggested in [https://github.com/grafana/oncall/issues/4960#issuecomment-2335048517]
  4. Config OnCall API URL: http://oncall-engine:8080/, click Connect.
  5. Only Main org will connected successfully, other orgs will prompt out like "jsonData.stackId is not set" or "Unauthorized/Forbidden while accessing OnCall engine: /api/internal/v1/plugin/v2/status, status code: 403, check token"

Grafana OnCall Version

v1.12.1

Product Area

Helm/Kubernetes/Docker

Grafana OnCall Platform?

Kubernetes

User's Browser?

No response

Anything else to add?

Grafana v11.2.3 (b37c88c4ec)

feature_toggles |   accessControlOnCall | false enable | externalServiceAccounts

Image

Let me know if I'm wrong, I beliew the expected procedure is something like: We don't use API call to initialize, we install oncall in the org we want, token created automatically, we provide oncall-engine url, then everything should be done?

joeyorlando commented 1 week ago

hello 👋 It sounds like you want to connect mutilple grafana orgs to a single OnCall setup? This is not supported, see https://github.com/grafana/oncall/issues/598#issuecomment-1267051624