Alert List Timing (Paused for 20 hours)

Our Grafana Alert List shows how long Alerts have been “OK”, “PAUSED”, or “ALERTING”.

However, the time shown is incorrect.

For example: I paused the Artifactory - Critical alert two seconds before this screenshot was taken, but it shows “PAUSED for 20 hours”.

I have been unable to find the same issue reported online or in the community. Looks like it may be a bug in Grafana because the settings can’t be changed. I would appreciate any insight if any one has seen this before.

If your using sqlite3 as grafana database you need to make sure the timezone of the server running grafana is UTC

Our server is set to CST, which is the time zone we are in.
I don’t believe the time zone would be causing the time difference.

@torkel here is the behavior I see:

Alert is set to paused: State is changed to Paused, NewStateDate is NOT updated.
Alert is set to unpause: State changes to Pending, NewStateDate is NOT updated.
Alert moves (automatically) from Pending to ok, NewStateDate IS updated.

I think because NewStateDate is not being updated when moving to Paused, the time in the UI is off.

loadAlerts() {
this.backendSrv.get(’/api/alerts’, this.filters).then(result => {
this.alerts = _.map(result, alert => {
alert.stateModel = alertDef.getStateDisplayModel(alert.state);
alert.newStateDateAgo = moment(alert.newStateDate).fromNow().replace(" ago", “”);
if (alert.evalData && alert.evalData.no_data) {
alert.no_data = true;
}
return alert;
});
});
}