diff options
author | Greg Sabino Mullane | 2011-02-09 04:53:07 +0000 |
---|---|---|
committer | Greg Sabino Mullane | 2011-02-09 04:53:07 +0000 |
commit | 7e2a5daf498e7da9a53cbe356bd0b39a48ac35a5 (patch) | |
tree | 0b5f8d89c3237f72e7087ccbbf3c5d5c77f1599b /check_postgres.pl | |
parent | 52cf54e10c6234dba565eab54efc3bd46ea358b5 (diff) |
Clean up hot_standby_delay perfdata
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-x | check_postgres.pl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/check_postgres.pl b/check_postgres.pl index 8112cb4c1..cbe3c37d8 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -137,6 +137,8 @@ our %msg = ( 'fsm-rel-msg' => q{fsm relations used: $1 of $2 ($3%)}, 'hs-no-role' => q{Not a master/slave couple}, 'hs-no-location' => q{Could not get current xlog location on $1}, + 'hs-receive-delay' => q{receive-delay}, + 'hs-replay-delay' => q{replay_delay}, 'invalid-option' => q{Invalid option}, 'invalid-query' => q{Invalid query returned: $1}, 'listener-count' => q{ listening=$1}, ## needs leading space @@ -362,6 +364,8 @@ our %msg = ( 'fsm-rel-msg' => q{relations tracées par la FSM : $1 sur $2 ($3%)}, 'hs-no-role' => q{Pas de couple ma??tre/esclave}, 'hs-no-location' => q{N'a pas pu obtenir l'emplacement courant dans le journal des transactions sur $1}, +'hs-receive-delay' => q{receive-delay}, +'hs-replay-delay' => q{replay_delay}, 'invalid-option' => q{Option invalide}, 'invalid-query' => q{Une requête invalide a renvoyé : $1}, 'listener-count' => q{ en écoute=$1}, ## needs leading space @@ -4002,8 +4006,10 @@ sub check_hot_standby_delay { $MRTG and do_mrtg({one => $rep_delta, two => $rec_delta}); - $db->{perf} = qq{replay_delay=$rep_delta;$warning;$critical}; - $db->{perf} .= qq{ receive_delay=$rec_delta;$warning;$critical}; + $db->{perf} = sprintf '%s=%s;%s;%s', + perfname(msg('hs-replay-delay')), $rep_delta, $warning, $critical; + $db->{perf} .= sprintf '%s=%s;%s;%s', + perfname(msg('hs-receive-delay')), $rec_delta, $warning, $critical; ## Do the check on replay delay in case SR has disconnected because it way too far behind my $msg = qq{$rep_delta}; |