Version information
This version is compatible with:
- Puppet Enterprise 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 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, 2017.3.x, 2017.2.x, 2016.4.x
- Puppet >= 4.10.0 < 8.0.0
- , ,
Start using this module
Add this module to your Puppetfile:
mod 'benjaminrobertson-observium', '1.0.0'
Learn more about managing modules with a PuppetfileDocumentation
observium
A Puppet module which installs and configures Observium monitoring software. For infomation about observium please see Observium
Table of Contents
- Description
- Setup - The basics of getting started with observium
- Usage - Configuration options and additional functionality
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Description
A Puppet module to install Observium in a basic configuration on Ubuntu or RedHat.
Setup
What observium affects
Observium module installs and configures the following by default,
- Apache
- Mysql or MariaDB
- Enable EPEL, remi-php and OpenNMS yum repo on RHEL.
- Modifies\enables firewalld on RHEL
- Installs required packages for Observium
- Installs Observium software on the system
- Configures Obersvium software on the system
- Sets selinux into permissive mode on RHEL
- Configures SNMP v3 on the observium host
- Creates a certificate and key pay under /etc/ssl/observium_key.pem and observium_cert.pem
If you are managing yumrepos, firewall, selinux, snmp, mysql, apache within your control-repo you can disable configuring this by setting manage_{service} to false. See reference.
Setup Requirements
Please ensure you meet the dependency requirements and have the following in your Puppetfile.
- puppetlabs-stdlib
- puppet-archive
- puppetlabs-yumrepo_core - only required for RHEL
- puppetlabs-mysql
- puppetlabs-cron_core
- puppet-selinux - only required for RHEL
- puppetlabs-apache
- puppet-snmp
- puppet-firewalld - only required for RHEL and if managing firewall
- puppetlabs-resource_api
- domkrm-ufw - only required for Ubuntu and if managing firewall
- puppetlabs-translate
- camptocamp-systemd
Beginning with observium
In its most basic form you can install observium by
include observium
Usage
Please see reference for details instructions on observium class paramaters.
Basic usage
- Setup Observium with custom certificates
class { 'observium':
manage_ssl => true,
custom_ssl_cert => '/opt/observium/ssl/cert.pem',
custom_ssl_key => '/opt/observium/ssl/key.pem',
}
- Setup Observium without managing Firewall or Apache (Note: you will need to configure apache manually or with another Puppet module)
class { 'observium':
manage_fw => false,
manage_apache => false,
}
- Setup Observium on RHEL, specifying local repo and install location of Observium, can also be performed with Hiera. If your EPEL was hosted at myrepo.local and you saved the observium installer under /tmp
$my_repo = { 'epel' => {
'ensure' => 'present',
'enabled' => '1',
'descr' => 'Extra packages for enterprise linux',
'baseurl' => 'http://myrepo.local/epel7',
'gpgcheck' => '1',
'gpgkey' => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7',
'target' => '/etc/yum.repos.d/epel.repo',
},
}
class { 'observium':
repos => $my_repo,
download_url => '/tmp/',
installer_name => 'observium-community-latest.tar.gz',
}
Limitations
Observium doesn't provide an option to download anything other than the latest release of community edition Observium. I originally intended to provide an option of which version of Observium to install. This module will just install the latest Observium release.
Tested with the following setups.
- PE 2019.8.4
- Puppet 6.19.1
- RHEL
- 7
- 8
- Ubuntu
- 18.04 LTS
- 20.04 LTS
RHEL specific limitations
RHEL 7 requires the following yum repos for installation - these will be automatically added if you host has internet connection.
RHEL 8 require the follwing yum repos for installation - these will be automatically added if you host has internet connection.
- EPEL
- OpenNMS common
- OpenNMS RHEL8
- remi-modular - note you will need to enable php7.2 after adding this repo
/bin/dnf module -y install php:remi-7.2
Upgrading Observium
Please see Upgrading steps from Observium to upgrade. If you are managaing Observium with Puppet, please disable Puppet agent on your server before performing the upgrade steps. This module looks for the presence of '/opt/observium/VERSION' before extracting the observium tar ball. You can reenable Puppet once the upgrade is complete.
To disable Puppet manually on a host.
puppet agent --disable
To reenable
puppet agent --enable
Development
If you find any issues with this module, please log them in the issues register of the GitHub project. Issues
Reference
Table of Contents
Classes
Public Classes
observium
: A short summary of the purpose of this class
Private Classes
observium::apache
: Class: observium::apache inherits observium Configure apache server with virtual host for observiumobservium::config
: Class: observium::config Configure observium configuration files lint:ignore:140chars lint:ignore:arrow_alignmentobservium::database_init
: Class: obversium Init the observium database after install. lint:ignore:140charsobservium::firewalld
: Class: observium::firewall Manages firewall and opens ports for observiumobservium::firewallufw
: Class: observium::firewallufw Manage UFW on ubuntuobservium::install
: Class: observium::install Creates folder structure for Observium, and install from tarobservium::mariadb
: Class: observium::mariadb Install mysql or mariadb - OS dependantobservium::packages
: Class: observium::packages Installs required packges for observiumobservium::selinux
: Class: observium::selinux Class disables selinux as per observium install guide.observium::snmp
: Class: observium::snmp Sets up SNMP locally to permit monitoring of local host out of the box.observium::yum
: Creates requried yumrepo for RHEL and installs GPG keys.
Classes
observium
Observium base class which accepts parameters to customise the observium install.
lint:ignore:140chars
lint:ignore:parameter_order
Examples
include observium
Parameters
The following parameters are available in the observium
class:
db_password
rootdb_password
download_url
installer_name
db_host
db_user
db_charset
community
snmpv3_authlevel
snmpv3_authname
snmpv3_authpass
snmpv3_authalgo
snmpv3_cryptopass
snmpv3_cryptoalgo
fping_location
email_default
email_from
admin_password
apache_bind_ip
apache_hostname
apache_port
apache_sslport
custom_ssl_cert
custom_ssl_key
manage_repo
manage_selinux
manage_fw
manage_snmp
manage_mysql
manage_apache
manage_apachephp
manage_ssl
repos
gpgkeys
observium_additional_conf
db_password
Data type: String
Mysql password for observium user - default 'changeme'
rootdb_password
Data type: String
Mysql root password - default 'hello123'
download_url
Data type: String
Url to the installer, IE http://observium.com/, can be a file path - default 'http://www.observium.org/'
installer_name
Data type: String
Installer name, IE observium-installer.tar - default 'observium-community-latest.tar.gz'
db_host
Data type: String
Database host to use - default 'localhost'
db_user
Data type: String
Database user to use - default 'observium'
db_charset
Data type: String
Database charset to use - default 'utf8' Ubuntu 20.04 'utf8mb3'
community
Data type: String
Default SNMP community to configure - default 'puppet'
snmpv3_authlevel
Data type: Enum['noAuthNoPriv','authNoPriv','authPriv']
Default SNMP authlevel to use - default 'authPriv' Valid options - ['noAuthNoPriv','authNoPriv','authPriv']
snmpv3_authname
Data type: String
SNMP Authname SNMPv3 user - default 'observium'
snmpv3_authpass
Data type: String[8]
Auth password - min 8 character
snmpv3_authalgo
Data type: Enum['SHA','MD5']
Auth algorithm - defualt 'SHA' Valid options - ['SHA','MD5']
snmpv3_cryptopass
Data type: String[8]
Crypto pass - min 8 character
snmpv3_cryptoalgo
Data type: Enum['AES','DES']
Crypto algorithm - default 'AES' Valid options - ['AES','DES']
fping_location
Data type: String
Change if fping is in a non default locaiton - default, RHEL '/sbin/fping' Ubuntu '/usr/bin/fping'
email_default
Data type: String
Not setup yet, use additional config option to setup email default
email_from
Data type: String
Not setup yet, use additional config option to setup email from
admin_password
Data type: String
Admin password for the default admin observium user - default 'changeme'
apache_bind_ip
Data type: String
Bind IP address - default $facts['ipaddress']
Default value: $facts['ipaddress']
apache_hostname
Data type: String
Apache hostname for observium site - default $facts['hostname']
Default value: $facts['hostname']
apache_port
Data type: String
Apache non SSL port - note if SSL is enabled this will have no effect - default '80'
apache_sslport
Data type: String
Apache SSL port - note if SSL isn't enable this will have no effect - defautl '443'
custom_ssl_cert
Data type: String
Path to SSL certificate, note this module will automatically create a cert in this location '/etc/ssl/observium_cert.pem' - default '/etc/ssl/observium_cert.pem'
custom_ssl_key
Data type: String
Path to SSL certificate key, note this module will automatically create a key in this location '/etc/ssl/observium_key.pem' - default '/etc/ssl/observium_key.pem'
manage_repo
Data type: Boolean
Manage repo, RHEL only, - default true
manage_selinux
Data type: Boolean
Manage selinux, RHEL only. This will set selinux to permissive mode as observium havn't published a selinux profile - default true
manage_fw
Data type: Boolean
Manage firewalld on RHEL. UFW on ubuntu. - default RHEL true, Ubuntu false
manage_snmp
Data type: Boolean
Configure snmpd on the observium and add to observium - default true
manage_mysql
Data type: Boolean
Install and configure mysql, - default true
manage_apache
Data type: Boolean
Install and configure Apache, - defalt true
manage_apachephp
Data type: Boolean
Configure Apachemod php, - default true
manage_ssl
Data type: Boolean
Setup the web site as SSL. If no cert provided, a self signed one will be used. - default false
repos
Data type: Optional[Hash]
Customise repoistory locations for RedHat
Default value: undef
gpgkeys
Data type: Optional[Hash]
Customise GPG keys for RedHat
Default value: undef
observium_additional_conf
Data type: Optional[Array]
Array of additional configurations options to add to /opt/observium/config.php
Default value: undef
Changelog
All notable changes to this project will be documented in this file.
Release 1.0.0
Features
- First non-beta release.
- Can upgrade to this new version from earlier versions without affecting existing installations.
- Updated module dependencies, removing redundant and deprecated modules.
- Added all dependencies based on dependency dependencies.
- Refactored code to making it easier to debug.
- Setup Rspec testing for module
- Updated module to latest pdk 2.1.0
Bugfixes
- Fixed issue causing continuous corrective changes on Ubuntu 20.04, 18.04 and RHEL7.
- Observium installation documentation instructs to install packages which don't exist. This was causing the corrective change on Ubuntu 18.04 and RHEL7.
- Fixed lint issues in code
Release 0.1.3
Features
Bugfixes
- Included php-ldap package by default. Not including this package causes issues if LDAP auth is configured for observium using observium_additional_conf. See https://github.com/benjamin-robertson/observium/pull/1 for more details. Thanks to https://github.com/egypcio
Known Issues
Release 0.1.2
Features
- Initial release
Bugfixes
Known Issues
Dependencies
- puppetlabs/stdlib (>= 5.2.0 < 8.0.0)
- puppet/archive (>4.0.0 < 6.0.0)
- puppetlabs/yumrepo_core (>=1.0.0 < 2.0.0)
- puppetlabs/mysql (>=10.0.0 < 12.0.0)
- puppetlabs/cron_core (>=1.0.0 < 2.0.0)
- puppet/selinux (>=3.0.0 < 4.0.0)
- puppetlabs/apache (>=5.0.0 < 7.0.0)
- puppet/snmp (>=5.0.0 < 6.0.0)
- puppet/firewalld (>=4.1.1 < 5.0.0)
- domkrm/ufw (>=1.1.1 < 2.0.0)
- camptocamp/systemd (>=2.5.1 < 4.0.0)
- puppetlabs/inifile (>=2.0.0 < 6.0.0)
- puppetlabs/concat (>=2.2.1 < 8.0.0)