From b4717b61631c4b64d7d6e35992ca86ef96af9a16 Mon Sep 17 00:00:00 2001 From: Jehan-Guillaume de Rorthais Date: Thu, 30 Jun 2022 19:52:18 +0200 Subject: [PATCH] Show autovac max_workers only on compatible versions --- check_pgactivity | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/check_pgactivity b/check_pgactivity index 7d27da2..2a129aa 100755 --- a/check_pgactivity +++ b/check_pgactivity @@ -2153,7 +2153,9 @@ sub check_autovacuum { @perfdata = map { [ $_, $activity{$_} ] } keys %activity; push @perfdata, [ 'oldest_autovacuum', $oldest, 's' ]; - push @perfdata, [ 'max_workers', $max_workers ]; + push @perfdata, [ 'max_workers', $max_workers ] + if $hosts[0]->{'version_num'} >= $PG_VERSION_83; + push @msg, "Number of autovacuum: $numautovac"; push @msg, "Oldest autovacuum: " . to_interval($oldest) if $oldest ne "NaN";