You've already forked postgres_exporter
mirror of
https://github.com/prometheus-community/postgres_exporter.git
synced 2025-08-11 02:43:02 +03:00
Add warning if Postgres Version is lower then the minimum version.
This commit is contained in:
@@ -881,6 +881,9 @@ func (e *Exporter) checkMapVersions(ch chan<- prometheus.Metric, db *sql.DB) err
|
|||||||
return errors.New(fmt.Sprintln("Error scanning version string:", err))
|
return errors.New(fmt.Sprintln("Error scanning version string:", err))
|
||||||
}
|
}
|
||||||
semanticVersion, err := parseVersion(versionString)
|
semanticVersion, err := parseVersion(versionString)
|
||||||
|
if semanticVersion.LT(lowestSupportedVersion) {
|
||||||
|
log.Warnln("PostgreSQL version is lower then our lowest supported version! Got", semanticVersion.String(), "minimum supported is", lowestSupportedVersion.String())
|
||||||
|
}
|
||||||
|
|
||||||
// Check if semantic version changed and recalculate maps if needed.
|
// Check if semantic version changed and recalculate maps if needed.
|
||||||
if semanticVersion.NE(e.lastMapVersion) || e.metricMap == nil {
|
if semanticVersion.NE(e.lastMapVersion) || e.metricMap == nil {
|
||||||
|
Reference in New Issue
Block a user