nfdump

A simple module to manage nfdump and sfcapd

Sensson

sensson

9,132 downloads

4,460 latest version

4.6 quality score

Version information

  • 0.0.5 (latest)
  • 0.0.4
  • 0.0.3
  • 0.0.2
  • 0.0.1
released Oct 19th 2018
This version is compatible with:
  • CentOS
    ,
    RedHat
    ,
    Ubuntu

Start using this module

Documentation

sensson/nfdump — version 0.0.5 Oct 19th 2018

Nfdump

Build Status Puppet Forge

This module can be used to install nfdump and manages sfcapd processes to capture sflow data into nfdump files. It doesn't manage nfsen or the firewall. We recommend you to be restrictive. Only allow traffic from the devices that you trust.

Examples

Installation and configuration

The following example will install nfdump and sets up a single sfcapd process.

class { '::nfdump':
  $data_location = '/data/nfdump'
}
::nfdump::sfcapd { 'sw1':
  port => 6343,
}

Reference

Parameters

nfdump

We provide a number of configuration options to change particular settings or to override our defaults when required.

package_name

Defaults to 'nfdump' on RedHat and 'nfdump-sflow' on Debian based systems.

user_name

Set the username for any sfcapd processes. Defaults to 'sflow'.

data_location

Set the location where to store nfdump data. Defaults to '/data/nfdump'.

Defines

nfdump::sfcapd

This will set up an sflow capture daemon listener.

nfdump::sfcapd { 'device-1.location': }
source

This is used as an identifier to the listener. Defaults to '$title'.

port

This is the udp port the listener is available on. Defaults to '6343'.

repeater_host

Sfcapd allows you to repeat packages onto another host. Set this to an ip if you want to forward traffic. Defaults to 'undef'.

repeater_port

Sets the port your repeater is available on. Defaults to '6343'.

buffer_len

Set the buffer length. See -B in man sfcapd. Defaults to '200000'.

extension_list

Set the list of accepted extensions. See -T in man sfcapd. Defaults to 'all'.

Limitations

This module has been tested on:

  • CentOS 7
  • Ubuntu 16.04

Development

We strongly believe in the power of open source. This module is our way of saying thanks.

This module is tested against the Ruby versions from Puppet's support matrix. Please make sure you have a supported version of Ruby installed.

If you want to contribute please:

  1. Fork the repository.
  2. Run tests. It's always good to know that you can start with a clean slate.
  3. Add a test for your change.
  4. Make sure it passes.
  5. Push to your fork and submit a pull request.

We can only accept pull requests with passing tests.

To install all of its dependencies please run:

bundle install --path vendor/bundle --without development

Running unit tests

bundle exec rake test

Running acceptance tests

The unit tests only verify if the code runs, not if it does exactly what we want on a real machine. For this we use Beaker. Beaker will start a new virtual machine (using Vagrant) and runs a series of simple tests.

You can run Beaker tests with:

bundle exec rake spec_prep
BEAKER_destroy=onpass bundle exec rake beaker:centos7
BEAKER_destroy=onpass bundle exec rake beaker:ubuntu1604

We recommend specifying BEAKER_destroy=onpass as it will keep the Vagrant machine running in case something fails.