Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

epylog(3pm) [debian man page]

epylog(3pm)						User Contributed Perl Documentation					       epylog(3pm)

NAME
epylog - Perl5 module for writing perl modules for epylog. SYNOPSIS
use epylog; # create a new epylog object my $du = new epylog; # initialize the object $du->init('modulename'); # get a username from a userid $du->getuname(500); # get a hostname from an IP address $du->gethost('127.0.0.1'); # find the system name in a standard syslog line $du->getsystem($syslogline); # get the value of an environment variable # first parameter is the name of the variable, second one is # the default value to return if the variable is undefined. $du->option('TMPDIR', '/tmp'); # return the next available syslog line from the logs (LOGCAT) $du->nextline(); # check if the logfile is EOF'd. Returns 0 if not yet. $du->islogeof(); # add a string or an array of strings to the report (LOGREPORT) $du->pushrep('Report line'); # add a syslog line entry to the list of analyzed and filtered # lines (LOGFILTER) $du->pushfilt($syslog_line); # intelligently output some debug information. # first parameter is level, second parameter is the string to output. # level 0 -- critical errors, always output # level 1 -- standard epylog execution, without "--quiet" # level 2> -- additional levels of verbosity. $du->mlog(1, 'Processing data'); # return how many lines were added to the filter file (LOGFILTER) $du->filtsize(); # return how many lines were added to the report file (LOGREPORT) $du->repsize(); # make a pretty report header. $du->mkrephdr('NOTICED REBOOTS'); # call this at the end of your module! It closes the filehandles and # writes out the report. $du->finalize(); AUTHORS
Konstantin Ryabitsev <icon@linux.duke.edu> Michael Stenner <mstenner@phy.duke.edu> Duke University Physics REVISION
$Revision$ SEE ALSO
epylog(8), epylog_modules(5) perl v5.14.2 2012-02-11 epylog(3pm)

Check Out this Related Man Page

epylog-modules(5)						Applications/System						 epylog-modules(5)

NAME
epylog-modules - epylog module cofiguration. SYNOPSIS
epylog uses pluggable modules to perform analysis and report on syslog strings. This manpage explains the format of the module config files. modules.d Epylog config files are placed in the modules.d directory of the cfgdir specified in epylog.conf. Any file ending in .conf in that direc- tory is considered a module config file. Most common location for modules.d directory is in /etc/epylog/modules.d. module.conf The name of the config file doesn't carry much meaning, however it MUST end in .conf in order to be recognized as a module config file. The config file for each module is separated into two parts: [module] and [conf]. [module] desc The description of the module. It will be shown in the final report. exec This is where the "body" of the module is located. Most modules that come with the distribution will be placed in /usr/share/epy- log/modules, but depending on your setup, you may place them elsewhere. files List the logfiles requested by this module in this field. Separate multiple entries by comma. Epylog will handle rotated files, but you need to specify the mask appropriately. E.g. the most common logrotate setup will place rotated files in the same directory and add .0, .1, .2, etc to the end of the file. Therefore, a file entry would look like so: /var/log/filename[.#] If you have compression turned on, your entry will look like so: /var/log/filename[.#.gz] Lastly, for advanced configurations, more complex entries may be required. E.g. if your logrotate saves rotated files in a subdirec- tory in /var/log, you can specify it like so: /var/log/[rotate/]filename[.#.gz] This will work, too: /var/log/filename[/var/rotate/filename.#.gz] In any case, "#" will be where the increments will go. enabled Can be either "yes" or "no". If "no" is specified, Epylog will completely ignore this module. internal Can be either "yes" or "no". If "yes", then the module is handled as an internal module, and if "no", then the external module API is used. See doc/modules.txt for more information about the module APIs. outhtml Specifies whether the output produced by the module is HTML or not. Can be either "yes" or "no". priority An unsigned int. Most commonly a number from 0 to 10. Modules with the lowest number will be considered the highest prioroty and will be both invoked and presented in the final report before the others. [conf] This is where per-module configuration directives go. Some modules have these, some don't. Look in the module config file -- the available values should be listed and described there. COMMENTS
Lines starting with "#" will be considered commented out. AUTHORS
Konstantin Ryabitsev <icon@linux.duke.edu> SEE ALSO
epylog(8), Epylog(3), epylog.conf(5) Konstantin Ryabitsev 1.0 epylog-modules(5)
Man Page