Latest version: 2.1.0

NDPMon in the press

Downloads

Documentation

Plugins

Training

Community

edit SideBar

SyslogFiltering

This plugin permits to enable syslog messages filtering and redirection to /var/log/ndpmon.log and logrotate.

It is known to work for rsyslog under Debian and derivates.

Build

Nothing needs to be built, just enable the plugin when running the configure script.

  1. ./configure --enable-syslogfilter

All files are located in ndpmon/install/rsyslog/.

Installation

At installation, the configuration files are copied to the required directories and services are restarted

  1. install:
  2.         cp 40-ndpmon.conf /etc/rsyslog.d/40-ndpmon.conf
  3.         cp ndpmon.logrotate /etc/logrotate.d/ndpmon
  4.         service rsyslog reload
  5.  
  6. uninstall:
  7.         -rm /etc/rsyslog.d/40-ndpmon.conf
  8.         -rm /etc/logrotate.d/ndpmon
  9.         service rsyslog reload

Configuration

Rsyslog redirection

This is done by the file 40-ndpmon.conf

  1. # NDPMon log messages to file
  2. :rawmsg,contains,"NDPMon" /var/log/ndpmon.log
  3.  
  4. # Uncomment the following to stop logging anything that matches the last rule.
  5. & ~

All syslog message containing the pattern NDPMon are redirected to a separated log file.

logrotate

This is done by the file ndpmon.logrotate

  1. /var/log/ndpmon.log
  2. {
  3.         rotate 52       # Keep 52 weeks worth of log
  4.         weekly          # Rotate files weekly
  5.         missingok       # Missing log file is not abnormal
  6.         notifempty      # do not rotate if empty
  7.         compress        # compress rotated files
  8.         delaycompress   # but not rightaway to avoid crashing
  9.                         # the program writing in the rotated file
  10.         sharedscripts   # run postrotate once per rotation
  11.         postrotate      # the script to be executed at rotation
  12.                 invoke-rc.d rsyslog reload >/dev/null 2>&1 || true
  13.         endscript
  14. }