#
# logsurfer configuration to collect and mail httpd-errors
# (parsing the error-log of the http-server)
#
# example start: "logsurfer -c httpd-error -f /var/adm/http.error.log &"
#

#
# ignore robots
#
'/robots.txt' - - - 0 ignore

#
# ignore all [OK] or [OK-GATEWAY] messages
#
'\[OK(|-GATEWAY)\]' - - - 0 ignore

#
# everything else might be interesting, but most likely we'll get more than
# one error message... so open a context for the hostname and wait until
# we won't receive an additional message within 5 minutes (but also set an
# absolut timeout of 30 minutes and max. 100 lines for this message)
#
# mail the error messages to the webmaster
#

'\] \[(host: [^ ]*)' - - - 0
	open "$2" '\[OK(|-GATEWAY)\]' 100 1800 300
	pipe "/home/httpd/bin/start-mail webmaster HTTP Daemon Error"

#
# any other messages we haven't seen before?
#
'.*' - - - 0
	pipe "/home/httpd/bin/start-mail webmaster Unknown HTTP Message"

