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

David E. Wheeler david at justatheory.com
Wed Jan 18 22:44:52 UTC 2012


On Jan 18, 2012, at 2:42 PM, David E. Wheeler wrote:

> This patch adds support for checking for failed pgAgent jobs within a specified period of time. You can specify either --critical or --warning as a period of time, and it will report on failures within that period of time previous to the current time. Job failures are determined by a non-0 status in a job step record.
> 
> Using this test obviously requiers that the pgAgent schema be installed. I've also included a bunch of unit tests to make sure it works the way I would expect (the test will create a schema for testing) and documentation.
> 
> As part of this, I've introduced the `any_warning` argument to `validate_range()`. The `pgagent_jobs` test does not care if you specify a warning value greater than the critical value (indeed, I expect that if one used both at all, the warning would be much longer). So this new argument prevents the `range-warnbigtime` or `range-warnbigsize` failures from being triggered.

Assuming everyone is on board with this, I can commit it. Just let me know.

Thanks,

David



More information about the Check_postgres mailing list