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

Cédric Villemain cedric.villemain.debian at gmail.com
Thu Jan 19 19:49:32 UTC 2012


Le 19 janvier 2012 19:33, Cédric Villemain
<cedric.villemain.debian at gmail.com> a écrit :
> Le 19 janvier 2012 19:24, David E. Wheeler
> <david.wheeler at pgexperts.com> a écrit :
>> On Jan 19, 2012, at 10:21 AM, Cédric Villemain wrote:
>>
>>> I didn't understand this any_warning. What is it for again ?
>>> I believe, all check_postgres need is sometime more in line with
>>> nagios plugin guidelines, not the opposite.
>>> I'll check further, but I would like you to see my mail before committing ;)
>>
>> I expect it to be used something like this:
>>
>>    check_postgres_pgagent_jobs --critical 2h --warning 4h
>>
>> So it will warn for any failures in the last four hours, and error for any failures in the last 2 hours.
>>
>> However, by default validate_range() rejects this, saying that warning cannot be greater than critical. So I added a param to disable that error. The only check that uses it is pgagent_jobs.
>>
>> Make sense?
>
> it makes sense, but it also make something resurect from memory about
> check_postgres command line options.
> It might be better to re-work the command line arguments...
> I have to dive into check_postgres anyway for another minor patch, so
> I'll review that at once.
>
> Please wait until tomorow for a commit...

I am unsure to understand the interest to get a WARNING, but what it
does require looks more something like that :

check_postgres_pgagent_jobs --critical 0h:2h --warning 2h:4h
(and performance data must output in seconds : 3600s so that nagios
graphers can understand it)

I think this range argument is not yet handled by check_postgres, but
should be, and fix your issue thanks to a side effect of a cleaner -w
and -c parsing.
Correct ?

-- 
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