Code Monkey home page Code Monkey logo

collectd-postfix's Introduction

collectd-postfix plugin

This plugin collects mail metrics from the postfix mail log. I have only tested this on CentOS 6 with Python 2.6.6

Example data in Grafana

collectd-postfix-grafana

Supported Platforms

Tested on

  • CentOS 6 (Python 2.6) with collectd 5.5.3

Usage

Follows standard collectd-python plugin configuration. You need to make sure your collectd binary was compiled with python support first.

  • Drop collectd-postfix.py into <COLLECTD_ROOT>/share/collectd/ - or wherever you store plugins
  • Configure the plugin in your collectd config <COLLECTD_ROOT>/etc/conf.d/postfix.conf or however you include plugins

Below is an example module config. Current allowed options are:

- Verbose (boolean) - use verbose logging 
- Maillog (string) - location of postfix mail log
- CheckMailQ (boolean) - check the postfix mail queue (shells out with subprocess)
<LoadPlugin python>
    Globals true
</LoadPlugin>

<Plugin python>
    # postfix.py is at /opt/collectd/share/collectd/postfix.py
    ModulePath "/opt/collectd/share/collectd/"
    Import "postfix"
    <Module postfix>
      Verbose false
      Maillog "/var/log/maillog"
      CheckMailQ true
    </Module>
</Plugin>

Contribute

Create a feature branch and PR with changes if anything feels dirty or you would like to see additional functionality.

License

collectd-postfix is licensed under version 2.0 of the Apache License. See the LICENSE file for details.

collectd-postfix's People

Contributors

hobbsh avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.