diff --git a/check_psqlserver b/check_psqlserver index e840f52d000a5fdd571261a3bbe0efb213c64883..4415a4ec8604334a7b51d46c0ca48c6b36b334cd 100755 --- a/check_psqlserver +++ b/check_psqlserver @@ -247,7 +247,7 @@ case "${sMode}" in "conflicts") deltaunit=min - descr="Detected conflicts (from pg_stat_database_conflicts)" + descr="(from pg_stat_database_conflicts)" renderCounters "select \ sum(confl_tablespace) as confl_tablespace, \ sum(confl_lock) as confl_lock, \ @@ -259,7 +259,10 @@ case "${sMode}" in # sum of 7th column (with delta per sec) typeset -i iTotal; iTotal=$( echo "$out" | awk '{ sum+=$7} END { print sum;}' ) if [ $iTotal -gt 0 ]; then - ph.setStatus "critical" + ph.setStatus "critical" + descr+=" ... $iTotal conflicts detected" + else + descr+=" ... OK, nothing was found" fi descr+=" - currently $iTotal per ${deltaunit}" ;; @@ -297,7 +300,10 @@ case "${sMode}" in # sum of 7th column (with delta per sec) typeset -i iTotal; iTotal=$( echo "$out" | awk '{ sum+=$7} END { print sum;}' ) if [ $iTotal -gt 0 ]; then - ph.setStatus "critical" + ph.setStatus "critical" + descr+="... $iTotal Problems and troublemakers were found" + else + descr+=" ... OK, nothing was found" fi descr+=" - currently $iTotal per ${deltaunit}" ;;