diff options
author | Greg Sabino Mullane | 2014-07-03 10:53:16 +0000 |
---|---|---|
committer | Greg Sabino Mullane | 2014-07-03 10:53:16 +0000 |
commit | a2373c12dfc4212e4ad4fcff08062770dffaa67f (patch) | |
tree | 574c59ce69f645681151c5a48c99dc8e9086a7e7 /check_postgres.pl | |
parent | 54d647f774a9c88a196031d405c9d04967d72c5e (diff) | |
parent | f958d61e84212de92079401fbc29a183850cce73 (diff) |
Merge branch 'query-time-show-query' of https://github.com/petere/check_postgres
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-x | check_postgres.pl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/check_postgres.pl b/check_postgres.pl index 214e7c8ff..9759f1c77 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -212,6 +212,7 @@ our %msg = ( 'qtime-for-msg' => q{$1 queries longer than $2s, longest: $3s$4 $5}, 'qtime-msg' => q{longest query: $1s$2 $3}, 'qtime-none' => q{no queries}, + 'query' => q{query}, 'queries' => q{queries}, 'query-time' => q{query_time}, 'range-badcs' => q{Invalid '$1' option: must be a checksum}, @@ -464,6 +465,7 @@ our %msg = ( 'qtime-for-msg' => q{$1 requêtes plus longues que $2s, requête la plus longue : $3s$4 $5}, 'qtime-msg' => q{requête la plus longue : $1s$2 $3}, 'qtime-none' => q{aucune requête}, + 'query' => q{requête}, 'queries' => q{requêtes}, 'query-time' => q{durée de la requête}, 'range-badcs' => q{Option « $1 » invalide : doit être une somme de contrôle}, @@ -7692,13 +7694,14 @@ sub check_txn_idle { ## Details on who the top offender was if ($max > 0) { - $whodunit = sprintf q{%s:%s %s:%s %s:%s%s%s}, + $whodunit = sprintf q{%s:%s %s:%s %s:%s%s%s %s:%s}, msg('PID'), $maxr->{pid}, msg('database'), $maxr->{datname}, msg('username'), $maxr->{usename}, $maxr->{client_addr} eq '' ? '' : (sprintf ' %s:%s', msg('address'), $maxr->{client_addr}), ($maxr->{client_port} eq '' or $maxr->{client_port} < 1) - ? '' : (sprintf ' %s:%s', msg('port'), $maxr->{client_port}); + ? '' : (sprintf ' %s:%s', msg('port'), $maxr->{client_port}), + msg('query'), $maxr->{query} || $maxr->{current_query}; } ## For MRTG, we can simply exit right now |