[check_postgres] --exclude behavior doesn't seem to agree with the docs

Jeff Frost jeff at pgexperts.com
Wed Sep 7 21:11:28 UTC 2011


On Sep 2, 2011, at 11:10 PM, Guillaume Lelarge wrote:

> On Thu, 2011-09-01 at 14:19 -0700, Jeff Frost wrote:
>> The docs on the website show the following example:
>>
>> Exclude all items which start with the letters 'pg_', which contain the
>> letters 'slon', or which are named 'sql_settings' or 'green'. Specifically
>> check items with the letters 'prod' in their names, and always check the item
>> named 'pg_relname':
>>
>> --exclude=~^pg_,~slon,sql_settings --exclude=green --include=~prod,pg_relname
>>
>>
>> but when I try a similar strategy:
>>
>>  --exclude='sys.' --exclude='pg_catalog.'
>>
>> I still pick up tables in the pg_catalog schema.
>>
>> However, if I use the comma separated nomenclature:
>>
>> --exclude='sys.,pg_catalog.'
>>
>> it doesn't pick up anything in sys or pg_catalog.
>>
>> Is this a documentation bug?
>>
>
> Works for me. Maybe you should share your command line, and results.
>

Sorry for the delay. Took me a bit to circle back to this.

I believe what was happening is that I was using this:

check_postgres.pl --port=5444 -u postgres -db jefftest   --exclude='~^pg_'
--exclude='sys.' --exclude='pg_catalog.'  --action=last_analyze

and I end up with this:

POSTGRES_LAST_ANALYZE CRITICAL: DB "jefftest" (host:jefftest) (port=5444)
pg_catalog.pg_ts_dict: 03:39 November 19, 2010 (41 weeks 5 days 9 hours 24
minutes)

but, if I remove the exclude with the regex, it works as expected.  Also, if I
combine the 3 excludes into a single option like so:
--exclude='~^pg_,sys.,pg_catalog.' it works as expected.

---
Jeff Frost <jeff at pgexperts.com>
CTO, PostgreSQL Experts, Inc.
Phone: 1-888-PG-EXPRT x506
FAX: 415-762-5122
http://www.pgexperts.com/ 







-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mail.endcrypt.com/pipermail/check_postgres/attachments/20110907/4381ce50/attachment.html 


More information about the Check_postgres mailing list