Git Product home page Git Product logo

ganglia_iptables's Introduction

Iptables module for Ganglia

Author: Lars Kellogg-Stedman

This is a Python module for Ganglia's gmond that extracts byte and packet counts from selected iptables rules and publishes them as bytes/sec and packets/sec to gmond.

Configuration

This module is configured via the iptables.pyconf file, possibly located in /etc/ganglia/conf.d. The module supports the following parameters:

LogFile
Send logging to the specified file instead of stderr.
LogLevel (default INFO)
What to log.
AccountingChains (default acctin,acctout)
A comma-separated list of iptables chains to search for marked rules.
RefreshRate (default 10)
How often to poll iptables for new byte/packet counts.
WindowSize (default 6)
Over how many samples to calculate rate information.
IptablesCommand (default /sbin/iptables)
Command used to run iptables. If you're running gmond as user nobody, you may want to change this to "/usr/bin/sudo /sbin/iptables" and making the appropriate changes to your /etc/sudoers file.

You will need to add the necessary metric definitions to the collection_group in the configuration file. You can generate appropriate definitions by running iptables.py with the -m option:

python /usr/lib/ganglia/python_modules/iptables.py -m

NB: Running iptables.py directly will not parse your config file. You can use the -o parameter=value command line option to provide configuration parameters.

Marking iptables rules

This module extracts packet and byte counts from rules marked with special comments using the comment module. The module looks for rules containing the phrase "monitor:" followed by a metric name. For example, to monitor inbound http traffic:

iptables -A acctin -p tcp --dport 80 -m comment --comment 'monitor:http_in'

This will result in the metrics http_in_bytes and http_in_packets.

ganglia_iptables's People

Contributors

larsks avatar

Stargazers

Pantelis Koukousoulas avatar Ricardo Melo avatar  avatar

Watchers

 avatar James Cloos 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.