[check_postgres] RFC: New Actions
David E. Wheeler
david.wheeler at pgexperts.com
Wed Jan 19 20:02:05 UTC 2011
On Jan 18, 2011, at 3:15 PM, David E. Wheeler wrote:
> On Jan 17, 2011, at 1:05 PM, Greg Sabino Mullane wrote:
>
>>> Ah, yeah, good thinking. Since --warning and --critical are times,
>>> perhaps add --warning-count and --critical-count for the numbers? So
>>
>> Maybe a better name, one that doesn't share the first letters with
>> existing names? Getopt::Long is going to barf on --warn and --crit
>> where it did not before.
>
> Oh, wasn't aware of that feature. Erm, how about --and-critical --and-warning?
I know that's awful. Was just thinking about the bloat query and being able to specify both a size and a percentage, when Jeff Frost suggested making the options accept booleans. So you could do:
--critical 100MB # same as now
--critical 50% # same as now
--critical '100MB && 50%' # 100MB AND 50% bloat
--critical '100MB || 50%' # 100MB OR 50% bloat
I think this is kind of neat, and could easily apply to the idle transaction stuff, too:
--critical '15 seconds' # same as now
--critical 20 # 20 or more idle transactions
--critical '15 seconds && 20' # 20 or more idle for 15s or longer
--critical '15 seconds || 20' # 20 or more idle or one or more idle 15s or longer.
Thoughts?
David
More information about the Check_postgres
mailing list