summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcheck_postgres.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/check_postgres.pl b/check_postgres.pl
index e57b54ea2..99b8d857d 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -5531,7 +5531,7 @@ sub check_pgagent_jobs {
JOIN pgagent.pga_joblog jlog ON job.jobid = jlog.jlgjobid
JOIN pgagent.pga_jobstep step ON job.jobid = step.jstjobid
JOIN pgagent.pga_jobsteplog slog ON jlog.jlgid = slog.jsljlgid AND step.jstid = slog.jsljstid
- WHERE slog.jslresult <> 0
+ WHERE ((slog.jslresult = -1 AND step.jstkind='s') OR (slog.jslresult <> 0 AND step.jstkind='b'))
AND EXTRACT('epoch' FROM NOW() - (jlog.jlgstart + jlog.jlgduration)) < $seconds
};