diff --git a/pkg/datasource/zabbix.go b/pkg/datasource/zabbix.go index d8032c4..0cb64e5 100644 --- a/pkg/datasource/zabbix.go +++ b/pkg/datasource/zabbix.go @@ -97,7 +97,11 @@ func (ds *ZabbixDatasourceInstance) ZabbixRequest(ctx context.Context, method st } result, err = ds.zabbixAPI.Request(ctx, method, params) - if err == zabbixapi.ErrNotAuthenticated || isNotAuthorized(err) { + notAuthorized := isNotAuthorized(err) + if err == zabbixapi.ErrNotAuthenticated || notAuthorized { + if notAuthorized { + ds.logger.Debug("Authentication token expired, performing re-login") + } err = ds.login(ctx) if err != nil { return nil, err