Nonsearch HTTPD Log Links Macro
=nonsearch_httpd_log_links() is a script macro to report non-search links in the HTTPD log file.
nonsearch_httpd_log_links(site, s) init status =piktstatus level =piktlevel task "Report new non-search httpd log links" input logfile "=httpd_logdir/access_log_(site)" filter "=httpd_cgibin_root/webstats.pl -f -(s) -nsl | =sort | =uniq -c | =sort +0n" rule output mail $inlin
webstats.pl is a Perl script (not shown) to filter HTTPD log files and output certain types of information in various formats.
You might invoke the =nonsearch_httpd_log_links() macro in your alarms.cfg for more than one website log file thusly:
/////////////////////////////////////////////////////////////////////////////// NonSearchHttpdLogLinksEMC =nonsearch_httpd_log_links(emc, e) /////////////////////////////////////////////////////////////////////////////// NonSearchHttpdLogLinksPIKT =nonsearch_httpd_log_links(pikt, p) ///////////////////////////////////////////////////////////////////////////////
Output from the NonSearchHttpdLogLinksEMC script might look like, for example:
INFO: NonSearchHttpdLogLinksEMC Report new non-search httpd log links 1 http://home.planet.nl/~teuli049/petruclinks.html 1 http://plato.acadiau.ca/courses/musi/callon/2273/instr.htm 1 http://school.discovery.com/schrockguide/arts/artp.html 1 http://www.findfreesheetmusic.com/pages/classical/ ...
And output from the NonSearchHttpdLogLinksPIKT script might look like, for example:
INFO: NonSearchHttpdLogLinksPIKT Report new non-search httpd log links 1 http://de.wikibooks.org/wiki/linux-kompendium 1 http://directory.fsf.org/pikt.html 1 http://freshmeat.net/projects/pikt/ 1 http://ordonnancement.org/planificateurs/pikt/rubrique463.html 2 http://en.wikipedia.org/wiki/ comparison_of_open_source_configuration_management_software 2 http://www.dmoz.org/computers/software/internet/site_management/monitoring/ ...
For more examples, see Samples.