[check_postgres] problem parsing result in the check_autovac_freeze() function

Luke Koops luke.koops at entrust.com
Thu Aug 27 21:56:33 UTC 2009


This is windows specific.

The expression that parses the dbname in this function leaves the CR at the end of the dbname.  This messes up the output visually and could cause problems parsing the output.

Change this:
   SLURP: while ($db->{slurp} =~ /\s*(\d+) \|\s+(\d+) \|\s+(\d+) \| (.+?)$/gsm) {

to this:
   SLURP: while ($db->{slurp} =~ /\s*(\d+) \|\s+(\d+) \|\s+(\d+) \|\s+(\S+)\s*/gsm) {
Explanation: wild cards in regular expressions are greedy, so (.+?)$ will eat up everything including white spaces.  CR is treaded as a whitespace.  Note, the ? after the + is redundant.

Luke Koops
Phone 613-270-2674
Mobile 613-791-3141
Toll free 1-866-517-4479 x2674

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


More information about the Check_postgres mailing list