grafana-sync
grafana-sync copied to clipboard
Work with ServiceAccounts bearer tokens in place of API Keys
In latest Grafana version, we longer has the API Keys
available. Was wondering if there is a hack/update to make this amazing tool to work with the alternative "ServiceAccounts bearer tokens"
What error you are getting when trying to use it with service account token? I don't expect it to work differently
Error:
./grafana-sync push-dashboards --apikey="SERVICE_ACCOUNT_TOKEN_HERE=" --directory="dashboards" --url http://my-domain.com
2024/02/01 15:12:53 error on importing dashboard my-dashboard
...
The token has necessary permissions and has been tested using grafana api.
But I suppose the problem might be also transparent from the command, it is supposed to be working with just apikey
?
I will try to look at this. But if new token is not supported, not sure if i will be able to do something. Looks like grafana sdk is no longer active
https://github.com/grafana-tools/sdk
@vineethvijay7 i tried on grafana 10.2, service account with editor role. And i was able to pull folder, dashboards
Also tried grafana 10.3. Service account with editor permissions, was able to do pull and push