[check_postgres] [PATCH] Add `pgagent_jobs` test.

Cédric Villemain cedric.villemain.debian at gmail.com
Thu Jan 19 21:58:52 UTC 2012


Le 19 janvier 2012 22:37, David E. Wheeler
<david.wheeler at pgexperts.com> a écrit :
> On Jan 19, 2012, at 1:32 PM, Cédric Villemain wrote:
>
>> I am going to look into it, maybe I'll find a pretty way to do it.
>> If I fail we can add a TODO to accept range, it might be useful in other checks.
>
> Should be do-able by splitting on : and popping off the @, then passing each value to size_in_seconds().
>
>> for the current proposal, that should be (if I don't fail again...)
>>  -c 2h:  or -c @0h:2h  and -w @2h:4h
>
> And what would -c=2h do? That's the current syntax, and I don’t think we’d want to break backwards compatibility.

emit critical if > 2 hours (or < 0)
It breaks at least "query_runtime" and "last*analyze|vacuum" checks
for time range . but is ok for others time range check, I didn't check
others checks.

For me it is an improvement: better nagios integration, easier
documentation for check_postgres (less confusion on what -w -c mean in
this or this check).

I won't argue very strongly to break backward compatibility.
We can decide that some checks are not clean and we accept the old
syntax for them (but not your new one :p).

How to handle change in !clean checks is probably going to make it in
its own thread.

>
>> I think we should have check_postgres trying to follow that, is it a
>> big trouble for you to use this kind of arguments ?
>
> No, should be pretty simple.
>
> Best,
>
> David
>



-- 
Cédric Villemain +33 (0)6 20 30 22 52
http://2ndQuadrant.fr/
PostgreSQL: Support 24x7 - Développement, Expertise et Formation


More information about the Check_postgres mailing list