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://andgoogle.com/showthread.php
              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/
              ...

Open Hand For more examples, see Samples.

 
Home | FAQ | News | Intro | Samples | Tutorial | Reference | Software
Developer's Notes | Licensing | Authors | Pikt-Users | Pikt-Workers | Related Projects | Site Index | Privacy Policy | Contact Us
Page best viewed at 1024x768 or greater.   Page last updated 2010-04-15.   This site is PIKT® powered.
PIKT® is a registered trademark of the University of Chicago.   Copyright © 1998-2010 Robert Osterlund. All rights reserved.
Home FAQ News Intro Samples Tutorial Reference Software
PIKT Logo
PIKT Page Title
View sample
search terms
script macro