logcheckd.interface
Package: WA2L/edrc 1.5.57
Section: Library Commands (3)
Updated: 12 August 2024
Index
Return to Main Contents
NAME
logcheckd.interface - interfaces for logcheckd and lgcheckd
SYNOPSIS
edrc/lib/logcheckd/interface/<interfacefile>
AVAILABILITY
WA2L/edrc
DESCRIPTION
the
INTERFACE
mechanism of
logcheckd
and
lgcheckd
allows
logcheckd
and
lgcheckd
to communicate to other programs for
a matching log entry.
The
INTERFACE
receives the matching log entry thru
stdin,
the following environment variables are exported
to the
INTERFACE:
$APPROOT,
$SERVER_ENVIRONMENT_NAME,
$SERVER_ENVIRONMENT_CUSTOMER,
$SERVER_ENVIRONMENT_DESCRIPTION,
$INTERFACE_CFG,
$TIMESTAMP,
$LOGFILE,
and
$LEVEL.
OPTIONS
-
ENVIRONMENT
- $INTERFACE_CFG
-
configuration file of the
INTERFACE.
- $TIMESTAMP
-
timestamp of the matching logfile entry.
- $LOGFILE
-
name of the logfile containing the matching
logfile entry.
- $LEVEL
-
matched level as defined in the
logcheckd.pattern(4)
file.
- $APPROOT
-
root directory of the WA2L/edrc installation as
returned by the
approot(3)
command.
- $SERVER_ENVIRONMENT_NAME
-
server environment name as returned by the
server_environment(3)
command.
- $SERVER_ENVIRONMENT_CUSTOMER
-
server environment customer as returned by the
server_environment(3)
command.
- $SERVER_ENVIRONMENT_DESCRIPTION
-
server environment description as returned by the
server_environment(3)
command.
EXIT STATUS
- 0
-
always.
The exit status of an interface is not resolved
ba the
logcheckd
and
lgcheckd.
FILES
- edrc/var/logcheckd/iconfig/<interfacefile>.cfg
-
configuration file for the interface allowing to
write a configurable interface.
EXAMPLES
- 1. Simple example interface:
-
This example
INTERFACE
saves all matching log entries to an output file that
is configured in the
edrc/var/logcheckd/iconfig/Example.cfg .
Interface configuration
(edrc/var/logcheckd/iconfig/Example.cfg):
#
# logcheckd/iconfig/Example.cfg - configuration for logcheckd interface: Example
#
# [00] 23.05.2009 CWa Initial Version
#
# Output file for interface
#
INTERFACE_OUTPUTFILE=/tmp/$EDRC_SCRIPTNAME.out
Interface implementation
(edrc/lib/logcheckd/interface/Example):
#!/bin/sh
#
# Example - logcheckd interface: simple Example
#
# [00] 23.05.2009 CWa Initial Version
# [01] 28.05.2009 CWa ++
#
# Const
. $INTERFACE_CFG
Outputfile=$INTERFACE_OUTPUTFILE
# run -- run the interface command
#
run(){
cat <<EOM >> $Outputfile
--
TIMESTAMP=$TIMESTAMP
LEVEL=$LEVEL
LOGFILE=$LOGFILE
EOM
cat - >> $Outputfile
} # run
# Main -- Main
#
main(){
case $LEVEL in
HIGH)
run
;;
*)
run
;;
esac
} # main
main
- 2. Other example interfaces:
-
See directory:
edrc/lib/logcheckd/interface/.
SEE ALSO
edrcintro(1),
lgcheckd(1m),
logcheckd(1m),
logcheckd.cfg(4),
logcheckd.pattern(4)
NOTES
-
BUGS
-
AUTHOR
logcheckd.interface was developed by Christian Walther. Send suggestions
and bug reports to wa2l@users.sourceforge.net .
COPYRIGHT
Copyright © 2024
Christian Walther
This is free software; see
edrc/doc/COPYING
for copying conditions. There is ABSOLUTELY NO WARRANTY; not
even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This document was created by man2html
using the manual pages.
Time: 16:53:31 GMT, August 28, 2024