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.
The exit status of an interface is not resolved ba the logcheckd and lgcheckd.
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
See directory: edrc/lib/logcheckd/interface/.
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.