Forge Home

librenms

LibreNMS Agent Configuration

13,865 downloads

67 latest version

3.1 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.9.66 (latest)
  • 0.9.65
  • 0.9.64
  • 0.9.63
  • 0.9.62
  • 0.9.61
  • 0.9.60
  • 0.9.59
  • 0.9.58
  • 0.9.57
  • 0.9.56
  • 0.9.55
  • 0.9.54
  • 0.9.53
  • 0.9.52
  • 0.9.51
  • 0.9.50
  • 0.9.49
  • 0.9.48
  • 0.9.47
  • 0.9.46
  • 0.9.45
  • 0.9.44
  • 0.9.43
  • 0.9.42
  • 0.9.40
  • 0.9.39
  • 0.9.38
  • 0.9.37
  • 0.9.36
  • 0.9.35
  • 0.9.34
  • 0.9.33
  • 0.9.32
  • 0.9.27
  • 0.9.26
  • 0.9.25
  • 0.9.24
  • 0.9.23
  • 0.9.22
  • 0.9.21
  • 0.9.20
  • 0.9.19
  • 0.9.18
  • 0.9.17
  • 0.9.16
  • 0.9.14
  • 0.9.13
  • 0.9.12
  • 0.9.11
  • 0.9.10
  • 0.9.9
  • 0.9.6
  • 0.9.5
released Oct 1st 2024
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x
  • Puppet >= 5.5.8 < 7.0.0
  • Debian, Ubuntu

Start using this module

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

Add this module to your Puppetfile:

mod 'sourcedoctor-librenms', '0.9.66'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add sourcedoctor-librenms
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install sourcedoctor-librenms --version 0.9.66

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

sourcedoctor/librenms — version 0.9.66 Oct 1st 2024

Puppet Module for LibreNMS SNMP Agents

Build Status

Description

Puppet Module to configure and distribute LibreNMS_SNMP_Agents.

(Server configuration will come in a future version also)

Dependencies

This Modul doesn't modify configuration of services the Agents are for. So please ensure the services you want to monitor match the requirements. Details for what to do are described or linked per Agent.

General Information

It's recommended to use puppet-hiera for configuration

Usage

Define Source of LibreNMS Agent Scripts

class { 'librenms':
  use_local_agents => true,
}
  • use_local_agents If set to false Agent Scripts will be copied directly from Github. Default: true

Discovery Trigger Configuration

Configuration of Discovery Trigger for LibreNMS. Would be called everytime a LibreNMS Agent is installed.

class {'librenms::discovery':
    enabled            => false,
    librenms_server    => 'librenms.local.domain',
    api_token          => 'myAdminApiToken',
    transport_protocol => 'http',
}
  • librenms_server The FQDN or IP Address on which LibreNMS is listen
  • api_token is the API Token generated in LibreNMS from an Admin User
  • transport_protocol defines the used transportprotocol. Can be http or https

Which Agent Scripts should be installed

class {'librenms::application':
  apache2             => false,
  asterisk            => false,
  backupninja         => false,
  bind                => false,
  certificate         => false,
  chip                => false,
  dhcp                => false,
  distribution        => false,
  entropy             => false,
  exim                => false,
  freeradius          => false,
  freeswitch          => false,
  gpsd                => false,
  mdadm               => false,
  icecast             => false,
  memcached           => false,
  mysql               => false,
  nfs_client          => false,
  nfs_server          => false,
  nginx               => false,
  ntp_client          => false,
  ntp_server          => false,
  nvidia              => false,
  open_grid_scheduler => false,
  opensips            => false,
  osupdate            => false,
  php_fpm             => false,
  pi_hole             => false,
  portactivity        => false,
  postfix             => false,
  powerdns            => false,
  powerdns_recursor   => false,
  puppet_agent        => false,
  pureftpd            => false,
  redis               => false,
  sdfsinfo            => false,
  seafile             => false,
  smartmontools       => false,
  squid               => false,
  supervisord         => false,
  ups_apcups          => false,
  ups_nut             => false,
  voipmon             => false,
  zfs                 => false,
}
  • <Agent Name> A boolean on whether or not the agent has to be installed. Default: false

LibreNMS Agent Configuration

  1. Apache - SNMP extend
  2. Asterisk - SNMP extend
  3. Backupninja - SNMP extend
  4. BIND9/named - SNMP extend
  5. C.H.I.P - SNMP extend
  6. Certificate - SNMP extend
  7. DHCP Stats - SNMP extend
  8. Distribution - SNMP extend
  9. Entropy - SNMP extend
  10. Exim - SNMP extend
  11. FreeRADIUS - SNMP extend
  12. FreeSwitch - SNMP extend
  13. GPSD - SNMP extend
  14. Icecast - SNMP extend
  15. Mailcow-dockerized Postfix - SNMP extend
  16. Mailscanner - SNMP extend
  17. Mdadm - SNMP extend
  18. Memcached - SNMP extend
  19. MySQL - SNMP extend
  20. NFS Client - SNMP extend
  21. NFS Server - SNMP extend
  22. Nginx - SNMP extend
  23. NTP Client - SNMP extend
  24. NTP Server/NTPD - SNMP extend
  25. Nvidia GPU - SNMP extend
  26. Open Grid Scheduler - SNMP extend
  27. Opensips - SNMP extend
  28. OS Updates - SNMP extend
  29. PHP FPM - SNMP extend
  30. Pi-Hole - SNMP extend
  31. Portactivity - SNMP extend
  32. Postfix - SNMP extend
  33. PowerDNS - SNMP extend
  34. PowerDNS Recursor - SNMP extend
  35. Puppet Agent - SNMP extend
  36. PureFTPd - SNMP extend
  37. Redis - SNMP extend
  38. SDFSinfo - SNMP extend
  39. Seafile - SNMP extend
  40. SMART - SNMP extend
  41. Squid - SNMP extend
  42. Supervisord - SNMP extend
  43. UPS APCUPS - SNMP extend
  44. UPS Nut - SNMP extend
  45. Voip Monitor - SNMP extend
  46. ZFS - SNMP extend

Apache

class { 'librenms::applications::apache2':
}

Ensure all depending configurations are done. For Details take a look here Apache2

Asterisk

class { 'librenms::applications::asterisk':
}

No further configurations needed.

Backupninja

class { 'librenms::applications::backupninja':
}

No further configurations needed.

Bind

class { 'librenms::applications::bind':
  rndc       => '/usr/sbin/rndc',
  call_rndc  => true,
  stats_file => '/var/run/named/stats',
  agent      => false,
  zero_stats => false,
}
  • rndc The path to rndc
  • call_rndc A boolean on whether or not to call rndc stats. Suggest to set to false if using netdata. Default: true
  • stats_file The path to the named stats file. Default: /var/cache/bind/stats
  • agent A boolean for if this is being used as a LibreNMS agent or not. Default: false
  • zero_stats A boolean for if the stats file should be zeroed first. Default: false (true if guessed)

Ensure all depending configurations are done. For Details take a look here Bind

Certificate

class { 'librenms::applications::certificate':
  certificates = {},
}
  • certificates A Hash of certificates to check Default: {}

Example:

{'domains' => [
    {'fqdn' => 'www.mydomain.com'},
    {'fqdn' => 'some.otherdomain.org',
     'port' => 8443},
    {'fqdn' => 'personal.domain.net'}
]
}
  • fqdn the domain to check
  • port If port differs from 443 you can specify it with this optional argument

Chip

class { 'librenms::applications::chip':
}

No further configurations needed.

DHCP-Stats

class { 'librenms::applications::dhcp':
  lease_file => '/var/lib/dhcp/dhcpd.leases',
}
  • lease_file Lease File of DHCP Stats. Default: /var/lib/dhcp/dhcpd.leases

Distribution

This Agent returns Operation System Details to LibreNMS

class { 'librenms::applications::distribution':
}

No further configurations needed.

Entropy

class { 'librenms::applications::entropy':
}

No further configurations needed.

Exim

class { 'librenms::applications::exim':
}

No further configurations needed.

Fail2ban

class { 'librenms::applications::fail2ban':
  cache => true,
}
  • true If you want to cache results. Default: true

FreeRadius

class { 'librenms::applications::bind':
  radius_server => 'localhost',
  radius_port   => 18121,
  radius_key    => 'adminsecret',
}
  • radius_server IP or Domain Radius Server is listen on. Default: localhost
  • radius_port Port on which Radius Server is listening. Default: 18121
  • radius_key Key for authentication.

Ensure all depending configurations are done. For Details take a look here FreeRadius

Freeswitch

class { 'librenms::applications::freeswitch':
}

No further configurations needed.

GPSD

class { 'librenms::applications::gpsd':
}

No further configurations needed.

Icecast

class { 'librenms::applications::icecast':
}

No further configurations needed.

Mailcow-dockerized postfix

class { 'librenms::applications::mailcow_dockerized_postfix':
}

No further configurations needed.

Mailscanner

class { 'librenms::applications::mailscanner':
}

No further configurations needed.

Mdadm

class { 'librenms::applications::mdadm':
}

No further configurations needed.

Memcached

class { 'librenms::applications::memcached':
}

No further configurations needed.

MySQL

class { 'librenms::applications::mysql':
  user => 'root',
  pass => 'root',
  host => 'localhost',
  port => 3306,
}
  • user Username. Default: root
  • pass Password. Default: root
  • host IP or Hostname Database Server is listening on. Default: localhost
  • port Port Database Server is listening on. Default 3306

NFS Client

Only FreeBSD Version present

class { 'librenms::applications::nfs_client':
}

No further configurations needed.

NFS Server

class { 'librenms::applications::nfs_server':
}

No further configurations needed.

Nginx

class { 'librenms::applications::nginx':
}

Ensure all depending configurations are done. For Details take a look here Nginx

NTP-Client

class { 'librenms::applications::ntp_client':
}

No further configurations needed.

NTP-Server aka NTPd

class { 'librenms::applications::ntp_server':
}

No further configurations needed.

Nvidia GPU

class { 'librenms::applications::nvidia':
}

No further configurations needed.

Open Grid Scheduler

class { 'librenms::applications::open_grid_scheduler':
}

No further configurations needed.

Opensips

class { 'librenms::applications::opensips':
}

No further configurations needed.

OS-Updates

class { 'librenms::applications::osupdate':
}

No further configurations needed.

PHP FPM

class { 'librenms::applications::php_fpm':
}

No further configurations needed.

Pi Hole

class { 'librenms::applications::pi_hole':
  api_auth_key => 'someapiauthkey'
}
  • api_auth_key To get all data you must configure your API auth token from Pi-hole server.

Portactivity

class { 'librenms::applications::portactivity':
  services => [],
}
  • services List of Services to be monitored

Example:

['http, 'ldap', 'imap']

Services should be listed in /etc/services

Postfix

class { 'librenms::applications::postfix':
}

No further configurations needed.

Postgres

class { 'librenms::applications::postgres':
}

No further configurations needed.

PowerDNS

class { 'librenms::applications::powerdns':
}

No further configurations needed.

PowerDNS dnsdist

class { 'librenms::applications::powerdns_dnsdist':
}

No further configurations needed.

PowerDNS Recursor

class { 'librenms::applications::powerdns_recursor':
}

Add to the LibreNMS config.php file such options: $config['apps']['powerdns-recursor']['api-key'] required, this is defined in the Recursor config

$config['apps']['powerdns-recursor']['port'] numeric, defines the port to connect to PowerDNS Recursor on. The default is 8082

$config['apps']['powerdns-recursor']['https'] true or false, defaults to use http.

Proxmox

class { 'librenms::applications::proxmox':
}

No further configurations needed.

Puppet Agent

class { 'librenms::applications::puppet_agent':
}

Ensure all depending configurations are done. For Details take a look here Puppet_Agent

PureFTPd

class { 'librenms::applications::pureftpd':
}

No further configurations needed.

Raspberry Pi

class { 'librenms::applications::raspberry_pi':
}

No further configurations needed.

Redis

class { 'librenms::applications::redis':
}

No further configurations needed.

SDFS info

class { 'librenms::applications::sdfsinfo':
}

No further configurations needed.

Seafile

class { 'librenms::applications::seafile':
  url                     => 'seafile.mydomain.local',
  login                   => 'somelogin',
  password                => 'somepassword',
  identifier              => 'name',
  hide_monitoring_account => true,
}
  • url Url how to get access to Seafile Server. Default: ''
  • login Login to Seafile Server. It is important that used Login has admin privileges. Otherwise most API calls will be denied. Default: ''
  • password Password to the configured login. Default: ''
  • identifier Defines how user accounts are listed in RRD Graph. Options are: name, email. Default: name
  • hide_monitoring_account With this Boolean you can hide the Account which you use to access Seafile API. Default: true

Smart

class { 'librenms::applications::seafile':
  cache         => '/var/cache/smart',
  use_sn        => true,
  smart_options => {},
}
  • cache File in which Smart Values should be cached. Default: /var/cache/smart
  • use_sn A Boolean which defines if Serial Number of Device or Block Device Name should be used. Default: true
  • smart_options A Hash to add additional Smartctl Parameters to specified Block Devices. Default: {}

Example:

{'da5' => '-d sat',
 'twl0,0' => '/dev/twl0 - 3ware,0',
 'twl0,1' => '/dev/twl0 - 3ware,1',
 'twl0,2' => '/dev/twl0 - 3ware,2',
}

Squid

class { 'librenms::applications::squid':
  snmp_community => 'squid_snmp_community',
}
  • snmp_community SNMP Community Squid uses to publish it's data

Ensure all depending configurations are done. For Details take a look here Squid

Supervisord

class { 'librenms::applications::supervisord':
}

No further configurations needed.

Unbound

class { 'librenms::applications::unbound':
}

Ensure all depending configurations are done. For Details take a look here Unbound

UPS APCUPS

class { 'librenms::applications::ups_apcups':
}

No further configurations needed.

UPS Nut

class { 'librenms::applications::ups_nut':
  usv => 'my.usv.hostname',
}
  • usv hostname of the USV which has to be monitored

Voipmon

class { 'librenms::applications::voipmon':
}

No further configurations needed.

ZFS

class { 'librenms::applications::zfs':
}

No further configurations needed.