grafana / oncall

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

Allow editing the schedule for sync_organization command #4309

Closed gavinwoolley closed 1 month ago

gavinwoolley commented 6 months ago

What would you like to see!

I'd like to be able to configure the frequency of when the organizations sync from Grafana to Oncall or ideally be able to hit an API to trigger the sync on demand.

Product Area

Alert Flow & Configuration, Helm, Other

Anything else to add?

We progamatically manage all of our users, teams, integrations etc Currently we have to wait for the users to sync, before we can create integrations that are team scoped, it took 24 hrs yesterday. Unless of course we hit the plugin screen, then it syncs.

We'd like to be able to trigger the sync, or at least configure the frequency of when it happens if possible.

v.1.4.3

github-actions[bot] commented 6 months ago

The current version of Grafana OnCall, at the time this issue was opened, is v1.4.4. If your issue pertains to an older version of Grafana OnCall, please be sure to list it in the PR description. Thank you :smile:!

mderynck commented 2 months ago

Specific to this issue we added an API endpoint to trigger sync on demand (there is a timeout on it so that it does not run more frequently than 5 mins). You can use a service account token as well to call this (see Grafana docs). Also note this caches a copy locally and it will not send anything to the OnCall backend if it does not detect any changes.

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

Recently we made some changes to the way Grafana OnCall is initialized. Use 1.9.22, there were quite a few changes along the way from 1.9.0-1.9.22 to get things working.