Forge Home

netdata

Installs and configures netdata.

7,342 downloads

7,165 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.2.0 (latest)
  • 0.1.0
released May 31st 2018
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 3.0.0 < 6.0.0
  • , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'liger1978-netdata', '0.2.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add liger1978-netdata
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install liger1978-netdata --version 0.2.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

liger1978/netdata — version 0.2.0 May 31st 2018

netdata

Puppet Forge - downloads Puppet Forge - scores GitLab - build status

Table of Contents

  1. Description
  2. Beginning with netdata
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module

Description

This module installs and configures netdata. It is currently designed to work only with RHEL/CentOS 7 and Ubuntu 18.04. For Red Hat systems, it uses the RPM package available in the harbottle-main repository.

The netdata module can do the following:

  • Install a yum repo for netdata.
  • Install the netdata package.
  • Comprehensively manage the main netdata configuration files.
  • Manage the netdata service.

Beginning with netdata

For an internet-connected server, this is the minimum required to install, configure and run netdata using the netdata package from the harbottle-main repository.

Using Puppet only:

class { 'netdata':
  manage_yumrepo => true,
}

Using Puppet and Hiera:

include netdata
---
netdata::manage_yumrepo: true

Usage

Here is a comprehensive example using many of the available parameters to extensively modify module behaviour.

Using Puppet only:

class { 'netdata':
  manage_yumrepo              => true,
  yumrepo                     => {
    'local-netdata-repo'      => {
      baseurl  => 'https://yum.local/local-netdata-repo',
      descr    => 'Local netdata repo',
      enabled  => true,
      gpgcheck => false
    }
  },

  manage_package              => true,
  package_name                => 'my_netdata',
  package_ensure              => '1.10.0',

  manage_cfg_dir              => true,
  cfg_dir                     => '/opt/netdata/etc',

  manage_main_cfg             => true,
  main_cfg_file               => '/opt/netdata/etc/netdata.conf',
  main_cfg                    => {
    'global' => {
      'run as user' => 'my_netdata',
      'history'     => 3600,
      'bind to'     => '*'
    },
    'web'    => {
      'web files owner' => 'root',
      'web files group' => 'my_netdata'
    }
  },

  manage_apps_groups_cfg      => true,
  apps_groups_cfg_file        => '/opt/netdata/etc/apps_groups.conf',
  apps_groups_cfg             => [
    'netdata: netdata',
    'apps.plugin: apps.plugin',
    'freeipmi.plugin: freeipmi.plugin',
    'charts.d.plugin: *charts.d.plugin*',
    'node.d.plugin: *node.d.plugin*',
    'python.d.plugin: *python.d.plugin*',
    'tc-qos-helper: *tc-qos-helper.sh*',
    'fping: fping',
    'httpd: apache* httpd nginx* lighttpd',
    'corporate: foo* bar* *bat*'
  ],

  manage_charts_d_cfg         => true,
  charts_d_cfg_file           => '/opt/netdata/etc/charts.d.conf',
  charts_d_cfg                => {
    'time_divisor' => '100',
    'opensips'     => 'no'
  },

  manage_fping_cfg            => true,
  fping_cfg_file              => '/opt/netdata/etc/fping.conf',
  fping_bin                   => '/usr/local/bin/fping',
  fping_hosts                 => [
    'web.local',
    '192.168.2.3'
  ],
  fping_update_every          => '4',
  fping_ping_every            => '400',
  fping_opts                  => '-R -b 56 -i 1 -r 0 -t 5000',

  manage_node_d_cfg           => true,
  node_d_cfg_file             => '/opt/netdata/etc/node.d.conf',
  node_d_cfg                  => {
    'update_every' => 5,
    'modules'      => {
      'named'      => {
        'enabled' => true
      },
      'sma_webbox' => {
        'enabled' => true
      },
      'snmp'       => {
        'enabled' => false
      }
    }
  },

  manage_python_d_cfg         => true,
  python_d_cfg_file           => '/opt/netdata/etc/python.d.conf',
  python_d_cfg                => {
    'enabled' => 'no'
  },

  manage_stream_cfg           => true,
  stream_cfg_file             => '/opt/netdata/etc/stream.conf',
  stream_enabled              => true,
  stream_destination          => 'upstream.local',
  stream_api_key              => 'my_sending_api_key',
  stream_timeout              => 120,
  stream_default_port         => 19998,
  stream_buffer_size_bytes    => 1048576,
  stream_reconnect_delay      => 10,
  stream_initial_clock_resync => 30,
  stream_options_per_id       => {
    'api_key_1' => {
      'enabled' => 'no'
    }
  },

  manage_service              => true,
  service_name                => 'my_netdata',
  ensure_service              => 'running',
  enable_service              => false,
}

Using Puppet and Hiera:

include netdata
---
netdata::manage_yumrepo: true
netdata::yumrepo:
  local-netdata-repo:
    baseurl: https://yum.local/local-netdata-repo
    descr: Local netdata repo
    enabled: true
    gpgcheck: false

netdata::manage_package: true
netdata::package_name: my_netdata
netdata::package_ensure: '1.10.0'

netdata::manage_cfg_dir: true
netdata::cfg_dir: /opt/netdata/etc

netdata::manage_main_cfg: true
netdata::main_cfg_file: /opt/netdata/etc/netdata.conf
netdata::main_cfg:
  global:
    run as user: my_netdata
    history: 3600
    bind to: '*'
  web:
    web files owner: root
    web files group: my_netdata

netdata::manage_apps_groups_cfg: true
netdata::apps_groups_cfg_file: /opt/netdata/etc/apps_groups.conf
netdata::apps_groups_cfg:
 - 'netdata: netdata'
 - 'apps.plugin: apps.plugin'
 - 'freeipmi.plugin: freeipmi.plugin'
 - 'charts.d.plugin: *charts.d.plugin*'
 - 'node.d.plugin: *node.d.plugin*'
 - 'python.d.plugin: *python.d.plugin*'
 - 'tc-qos-helper: *tc-qos-helper.sh*'
 - 'fping: fping'
 - 'httpd: apache* httpd nginx* lighttpd'
 - 'corporate: foo* bar* *bat*'

netdata::manage_charts_d_cfg: true
netdata::charts_d_cfg_file: /opt/netdata/etc/charts.d.conf
netdata::charts_d_cfg:
  time_divisor: '100'
  opensips: 'no'

netdata::manage_fping_cfg: true
netdata::fping_cfg_file: /opt/netdata/etc/fping.conf
netdata::fping_bin: /usr/local/bin/fping
netdata::fping_hosts: 
 - web.local
 - 192.168.2.3
netdata::fping_update_every: '4'
netdata::fping_ping_every: '400'
netdata::fping_opts: -R -b 56 -i 1 -r 0 -t 5000

netdata::manage_node_d_cfg: true
netdata::node_d_cfg_file: /opt/netdata/etc/node.d.conf
netdata::node_d_cfg:
  update_every: 5
  modules:
    named:
      enabled: true
    sma_webbox:
      enabled: true
    snmp:
      enabled: false

netdata::manage_python_d_cfg: true,
netdata::python_d_cfg_file: /opt/netdata/etc/python.d.conf
netdata::python_d_cfg: 
  enabled: 'no'

netdata::manage_stream_cfg: true
netdata::stream_cfg_file: /opt/netdata/etc/stream.conf
netdata::stream_enabled: true
netdata::stream_destination: updstream.local
netdata::stream_api_key: my_sending_api_key
netdata::stream_timeout: 120
netdata::stream_default_port: 19998
netdata::stream_buffer_size_bytes: 1048576
netdata::stream_reconnect_delay: 10
netdata::stream_initial_clock_resync: 30
netdata::stream_options_per_id: 
  api_key_1:
    enabled: 'no'

netdata::manage_service: true
netdata::service_name: my_netdata
netdata::ensure_service: running
netdata::enable_service: false

Reference

Reference documentation is generated using Puppet Strings.

If you are reading this at the Puppet Forge, you should find what you are looking for under the Reference tab for this module, otherwise look for REFERENCE.md in the same directory as this file.

Limitations

This module has been tested with Puppet 3, 4 and 5.

This module has been tested on:

  • Red Hat Enterprise Linux 7
  • CentOS 7
  • Oracle Linux 7
  • Scientific Linux 7
  • Ubuntu 18.04

Development

Please open an issue, indicate you intend to work on it and create a GitLab merge request.