Version information
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
Add this module to your Puppetfile:
mod 'sourcedoctor-librenms', '0.9.66'
Learn more about managing modules with a PuppetfileDocumentation
Puppet Module for LibreNMS SNMP Agents
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 listenapi_token
is the API Token generated in LibreNMS from an Admin Usertransport_protocol
defines the used transportprotocol. Can behttp
orhttps
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
- Apache - SNMP extend
- Asterisk - SNMP extend
- Backupninja - SNMP extend
- BIND9/named - SNMP extend
- C.H.I.P - SNMP extend
- Certificate - SNMP extend
- DHCP Stats - SNMP extend
- Distribution - SNMP extend
- Entropy - SNMP extend
- Exim - SNMP extend
- FreeRADIUS - SNMP extend
- FreeSwitch - SNMP extend
- GPSD - SNMP extend
- Icecast - SNMP extend
- Mailcow-dockerized Postfix - SNMP extend
- Mailscanner - SNMP extend
- Mdadm - SNMP extend
- Memcached - SNMP extend
- MySQL - SNMP extend
- NFS Client - SNMP extend
- NFS Server - SNMP extend
- Nginx - SNMP extend
- NTP Client - SNMP extend
- NTP Server/NTPD - SNMP extend
- Nvidia GPU - SNMP extend
- Open Grid Scheduler - SNMP extend
- Opensips - SNMP extend
- OS Updates - SNMP extend
- PHP FPM - SNMP extend
- Pi-Hole - SNMP extend
- Portactivity - SNMP extend
- Postfix - SNMP extend
- PowerDNS - SNMP extend
- PowerDNS Recursor - SNMP extend
- Puppet Agent - SNMP extend
- PureFTPd - SNMP extend
- Redis - SNMP extend
- SDFSinfo - SNMP extend
- Seafile - SNMP extend
- SMART - SNMP extend
- Squid - SNMP extend
- Supervisord - SNMP extend
- UPS APCUPS - SNMP extend
- UPS Nut - SNMP extend
- Voip Monitor - SNMP extend
- 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 rndccall_rndc
A boolean on whether or not to call rndc stats. Suggest to set to false if using netdata. Default: truestats_file
The path to the named stats file. Default: /var/cache/bind/statsagent
A boolean for if this is being used as a LibreNMS agent or not. Default: falsezero_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 checkport
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: localhostradius_port
Port on which Radius Server is listening. Default: 18121radius_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: rootpass
Password. Default: roothost
IP or Hostname Database Server is listening on. Default: localhostport
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: namehide_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/smartuse_sn
A Boolean which defines if Serial Number of Device or Block Device Name should be used. Default: truesmart_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.
CHANGELOG
- Updating Agent Script ; powerdns.py
- Enforce discover on change now optional
v0.9.65
- Updating Agent Script ; mdadm
v0.9.64
- Updating Agent Script ; ups-nut.sh
v0.9.63
- Updating Agent Scripts ; memcached; nvidia
v0.9.62
- Updating Agent Script ; dhcp.py
v0.9.61
- Updating Agent Script ; mysql
v0.9.60
- Updating Agent Scripts ; distro; mailcow-dockerized-postfix
- configurable snmp extend directory
- configurable snmp extend directory
v0.9.59
- Updating Agent Script ; puppet_agent.py
v0.9.58
- Updating Agent Script ; puppet_agent.py
- run puppet agent via sudo
- puppet agent - parse for puppet 7 summary file
v0.9.57
- Updating Agent Script ; smart
v0.9.56
- Updating Agent Script ; osupdate
v0.9.55
- Updating Agent Script ; postgres
v0.9.54
- Updating Agent Script ; osupdate
v0.9.53
- Updating Agent Script ; pi-hole
v0.9.52
- Updating Agent Script ; fail2ban
v0.9.51
- Updating Agent Script ; certificate.py
v0.9.50
- Updating Agent Script ; ups-nut.sh
v0.9.49
- Updating Agent Script ; postgres
v0.9.48
- Updating Agent Script ; puppet_agent.py
v0.9.47
- Updating Agent Script ; mysql
v0.9.46
- Updating Agent Script ; memcached
v0.9.45
- Updating Agent Script ; mdadm
v0.9.44
- Updating Agent Script ; mdadm
v0.9.43
- Updating Agent Script ; osupdate
- grammar fix
v0.9.42
- Updating Agent Script ; mdadm
v0.9.41
- Update dependencies mdadm
v0.9.40
- Updating Agent Script ; mdadm
v0.9.39
- Updating Agent Script ; dhcp.py
v0.9.38
- Updating Agent Script ; gpsd
v0.9.37
- Updating Agent Scripts ; fbsdnfsclient; mysql
v0.9.36
- Updating Agent Script ; distro
v0.9.35
- Updating Agent Script ; osupdate
v0.9.34
- adding supervisord
v0.9.33
- Updating Agent Scripts ; fail2ban; freeradius.sh; smart
v0.9.32
- Updating Agent Script ; metadata.json
v0.9.31
- update workflow
- Updating Agent Scripts ; distro; puppet_agent.py
- update workflow
v0.9.30
- Updating Agent Script ; ntp-server.sh
v0.9.29
- Updating Agent Script ; portactivity
- UPS-Nut snmpd.extend Parameter
v0.9.28
- Updating Agent Script ; distro
- add missing package
- add missing package jq
- string fix
v0.9.27
- Updating Agent Script ; ups-nut.sh
v0.9.26
- Updating Agent Script ; zfs-freebsd
v0.9.25
- Updating Agent Scripts ; distro; ntp-server.sh; sdfsinfo
v0.9.24
- Updating Agent Scripts ; osupdate; phpfpmsp
v0.9.23
- Updating Agent Script ; gpsd
v0.9.22
- Updating Agent Scripts ; apache-stats.py; backupninja.py; certificate.py; chip.sh; dhcp.py; distro; exim-stats.sh; freeradi...
v0.9.21
- Updating Agent Script ; pi-hole
v0.9.20
- Updating Agent Script ; test.log
v0.9.19
- Updating Agent Script ; test.sh
v0.9.18
- Updating Agent Scripts ; test.log; test.sh
v0.9.17
- Updating Agent Script ; gpsd
v0.9.16
- Updating Agent Script ; mdadm
- Updating Agent Script ; mdadm
v0.9.15
- Updating Agent Scripts ; distro; opensips-stats.sh
- update workflow
v0.9.14
- update metadata
- Updating Agent Script ; freeradius.sh
- Updating Agent Script ; distro
- Updating Agent Script ; osupdate
- run Unbound Agent via sudo
v0.9.13
- Updating Agent Script ; distro
v0.9.12
- Updating Agent Script ; application.pp
v0.9.11
- Updating Agent Script ; application.pp
v0.9.10
- Updating Agent Scripts ; README.md; icecast-stats.sh; opensips-stats.sh; voipmon-stats.sh; application.pp; icecast.pp; open...
v0.9.9
- update metadata
v0.9.8
- Updating Agent Script ; raspberry.sh
v0.9.6.2
v0.9.7
- Updating Agent Script ; distro
v0.9.6.1
- Updating Agent Scripts ; apache-stats.py; apache2.pp; params.pp
v0.9.6
- update metadata
- adding workflow scripts
- puppet forge compatibility
- Updating Agent Script; mdadm
- Updating ; pi-hole; ups-nut.sh
- added Distribution to Readme
- added Distribution to Readme. Closes #34
- Updating ; mdadm
- update readme
- update readme
v0.95
- lint fix
- lint fix
- adding NFS-Client. Closes #5
- adding NFS-Server (FreeBSD/Linux). Closes #13 and closes #6 also
- .
- adding Pi-Hole. Closes #18
- adding ZFS. Closes #32
- adding Unbound. Closes #29
- adding Nginx. Closes #12
- update readme
- update readme
- add missing parameter
- adding Portactivity. Closes #19
- adding Postgres. Closes #21
- adding Proxmox. Closes #25
- adding Raspberry Pi. Closes #26
- adding PowerDNS DNSdist. Closes #24
- adding PowerDNS Recursor. Closes #23
- adding PowerDNS. Closes #22
- update README.md
v0.91
- adding Open Grid Scheduler. Closes #16
- adding PHP FPM. Closes #17
- adding Postfix. Closes #20
- adding NTP Client. Closes #14
- adding UPS Nut. Closes #30
- adding UPS APCUPS. Closes #31
- adding SDFS Info. Closes #27
- remove not more needed dhcp-stats.sh
- travis fix
- update readme
- adding NVidia GPU. Closes #15
- adding Mailscanner. Closes #10
- adding Mailcow-dockerized Postfix. Closes #9
- adding GPSD. Closes #8
- adding Freeswitch. Closes #7
- adding Fail2ban. Closes #4
- adding Exim Stats. Closes #3
- adding Chip. Closes #2
- adding Backupninja. Closes #1
v0.9
- travis
- install needed packages via ensure_packages
- gitignore
- build result url update
- build tests
Dependencies
- lwf-remote_file (>= 1.1.3 < 4.0.0)
- puppetlabs-stdlib (>= 4.25.0 < 7.0.0)
MIT License Copyright (c) 2022 SourceDoctor Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.