diff options
author | mintsoft | 2013-08-28 09:03:17 +0000 |
---|---|---|
committer | mintsoft | 2013-08-28 09:03:17 +0000 |
commit | 02b1e78cecde5c695deea1b6e6d6991dbda65cbb (patch) | |
tree | 94c2e4063b7f9e837fd38342d27c18cb97d4ec1c /check_postgres.pl | |
parent | f24ab83d14ec1648117260ea08363abe6e18edc4 (diff) |
Update check_postgres.pl
Fixing issue with SQL steps in check_pgagent_jobs for jobs which perform deletes, these return non-0 yet are still successful.
Behaviour should now be that <>0 on batch is a failure, but only -1 is a failure for sql steps.
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-x | check_postgres.pl | 2 |
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 }; |