pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedMonitoring error messages
3+ messages / 3 participants
[nested] [flat]
* Monitoring error messages
@ 2006-08-17 13:33 robin.c.smith@bt.com
2006-08-17 14:30 ` Re: Monitoring error messages Scott Marlowe <smarlowe@g2switchworks.com>
2006-08-17 16:17 ` Re: Monitoring error messages Peter Eisentraut <peter_e@gmx.net>
0 siblings, 2 replies; 3+ messages in thread
From: robin.c.smith@bt.com @ 2006-08-17 13:33 UTC (permalink / raw)
To: pgsql-admin
I am testing the monitoring of the postgresql 8.1.4 - I have found that
I would like to suppress some things from the log
For example if I type some random rubbish into the database instead of
select.... I get an error message logged into the server logfile like:-
2006-08-17 14:19:00.965 BST 10109 # ERROR: syntax error at or near
"kshdfkjh" at character 1
2006-08-17 14:19:00.965 BST 10109 # STATEMENT: kshdfkjh;
More importantly I have deleted a file from the database tables and when
I try to query data in the file I get the error:-
2006-08-17 14:14:30.922 BST 10085 # ERROR: could not open relation
1663/16384/16385: No such file or directory
2006-08-17 14:14:30.922 BST 10085 # STATEMENT: select * from rs_vacuum;
These are both logged as ERROR: which is easy to check for with
automatic monitoring. However I wouldn't want to be called out to fix a
non-existent error where someone has typed in some nonsense. Is it easy
to suppress the syntax errors so that the real database errors are
obvious?
Regards
Robin Smith
British Telecommunications plc Registered office: 81 Newgate Street
London EC1A 7AJ
Registered in England no. 1800000
This electronic message contains information from British
Telecommunications plc which may be privileged and confidential. The
information is intended to be for the use of the individual(s) or entity
named above. If you are not the intended recipient, be aware that any
disclosure, copying, distribution or use of the contents of this
information is prohibited. If you have received this electronic message
in error, please notify us by telephone or e-mail (to the number or
address above) immediately.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Monitoring error messages
2006-08-17 13:33 Monitoring error messages robin.c.smith@bt.com
@ 2006-08-17 14:30 ` Scott Marlowe <smarlowe@g2switchworks.com>
1 sibling, 0 replies; 3+ messages in thread
From: Scott Marlowe @ 2006-08-17 14:30 UTC (permalink / raw)
To: robin.c.smith@bt.com; +Cc: pgsql-admin
On Thu, 2006-08-17 at 08:33, robin.c.smith@bt.com wrote:
> I am testing the monitoring of the postgresql 8.1.4 - I have found
> that I would like to suppress some things from the log
>
> For example if I type some random rubbish into the database instead of
> select…. I get an error message logged into the server logfile like:-
>
> 2006-08-17 14:19:00.965 BST 10109 # ERROR: syntax error at or near
> "kshdfkjh" at character 1
> 2006-08-17 14:19:00.965 BST 10109 # STATEMENT: kshdfkjh;
>
> More importantly I have deleted a file from the database tables and
> when I try to query data in the file I get the error:-
>
> 2006-08-17 14:14:30.922 BST 10085 # ERROR: could not open relation
> 1663/16384/16385: No such file or directory
> 2006-08-17 14:14:30.922 BST 10085 # STATEMENT: select * from
> rs_vacuum;
>
> These are both logged as ERROR: which is easy to check for with
> automatic monitoring. However I wouldn't want to be called out to fix
> a non-existent error where someone has typed in some nonsense. Is it
> easy to suppress the syntax errors so that the real database errors
> are obvious?
I've had the same issue in the past. A simple fix is to pipe the output
of your grep into a series of "grep -v" statements.
For instance, this line is how we used to check for errors in our
production logs:
b=`grep -c PANIC $e`;
Just add the grep -v in there:
b=`grep -c PANIC $e|grep -vi syntax`;
and now syntax errors aren't reported.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Monitoring error messages
2006-08-17 13:33 Monitoring error messages robin.c.smith@bt.com
@ 2006-08-17 16:17 ` Peter Eisentraut <peter_e@gmx.net>
1 sibling, 0 replies; 3+ messages in thread
From: Peter Eisentraut @ 2006-08-17 16:17 UTC (permalink / raw)
To: pgsql-admin; +Cc: robin.c.smith@bt.com
robin.c.smith@bt.com wrote:
> These are both logged as ERROR: which is easy to check for with
> automatic monitoring. However I wouldn't want to be called out to fix
> a non-existent error where someone has typed in some nonsense. Is it
> easy to suppress the syntax errors so that the real database errors
> are obvious?
I think the short answer is "No", unless you do your own
post-processing. But note that syntax errors may also point to
mistakes in your application code.
If you want to filter out randomness that occurs during interactive
sessions, I'd rather attack the problem there. You could, for example,
alter the logging settings in your .psqlrc file.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2006-08-17 16:17 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-08-17 13:33 Monitoring error messages robin.c.smith@bt.com
2006-08-17 14:30 ` Scott Marlowe <smarlowe@g2switchworks.com>
2006-08-17 16:17 ` Peter Eisentraut <peter_e@gmx.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox