azure-monitor-datasource
azure-monitor-datasource copied to clipboard
ExpiredAuthenticationToken error, doesn't appear to renew token
Plugin Version: 0.3.0 Grafana Version: 5.4.2
Steps to reproduce
- Set up Azure Monitor plugin and configure a dashboard to consume data from it.
- Everything works great.
- Leave the dashboard open in a browser tab, suspend your PC and go home for the night.
- Return to work, resume your PC and open the browser tab.
- Tab is showing old data, so hit the refresh button in the top right corner of the dashboard. All graphs show a red warning exclamation mark in the top left corner.
- Refresh the entire page with F5. Page loads fine (so Grafana session is still active), but warnings still show.
- Log out of Grafana and back in again. Warnings still show.
- Go into the Azure Monitor data source configuration and hit the Save and Test button. All the graphs start working again.
When the warnings appear, the browser console shows requests returning a 401 Unauthorized response:
http://localhost:3000/api/datasources/proxy/1/azuremonitor/subscriptions/2033cfb3-5ad3-40ba-95e4-d496b086c3cf/resourceGroups/<omitted>/metrics?api-version=2018-01-01×pan=2019-01-15T14:31:29Z/2019-01-15T20:31:29Z&interval=PT1M&aggregation=Average&metricnames=storage_limit
{
"error": {
"code": "ExpiredAuthenticationToken",
"message": "The access token expiry UTC time '1/15/2019 1:35:15 AM' is earlier than current UTC time '1/15/2019 8:31:54 PM'."
}
}
It's possibly a time zone issue, as I'm located in New Zealand (UTC +13).
Sounds like a time zone issue - will have to investigate this further but I think this might be a bug in core Grafana rather than this plugin.