Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Gatherer - ignore time based gathering warnings when monitored PG ver…
Browse files Browse the repository at this point in the history
… is too old

so that it does not have a definition
  • Loading branch information
kmoppel committed Jul 10, 2020
1 parent 553b76d commit 60cdd38
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pgwatch2/pgwatch2.go
Original file line number Diff line number Diff line change
Expand Up @@ -2274,8 +2274,6 @@ func DetectPrivilegeChanges(dbUnique string, vme DBVersionMapEntry, storage_ch c
var first_run bool
var change_counts ChangeDetectionResults

// TODO also track superusers added / removed and group belongings

log.Debugf("[%s][%s] checking object privilege changes...", dbUnique, SPECIAL_METRIC_CHANGE_EVENTS)
if _, ok := host_state["object_privileges"]; !ok {
first_run = true
Expand Down Expand Up @@ -3105,7 +3103,7 @@ func IsMetricCurrentlyDisabledForHost(metricName string, vme DBVersionMapEntry,

mvp, err := GetMetricVersionProperties(metricName, vme, nil)
if err != nil {
if isSpecialMetric {
if isSpecialMetric || strings.Contains(err.Error(), "too old") {
return false
}
log.Warningf("[%s][%s] Ignoring any possible time based gathering restrictions, could not get metric details", dbUniqueName, metricName)
Expand Down

0 comments on commit 60cdd38

Please sign in to comment.