- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with monitoring
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
Module to install monitoring for any detected service supported
Detects installed services by using custom facts. This enables complete decoupling of monitoring from deployment of services. The module provides a highly opinionated monitoring client setup, and assumes the existence of server side components being available.
With the help of onpuppet-refacter, the services installed during the same run will cause facts refresh prior to installing monitoring tools
Decoupling monitoring module from other modules is useful in order to avoid adding monitoring code into the modules themselves. The module will magically install monitoring of everything installed on a machine without any hard dependencies between the module that install the service and the monitoring module.
Install the module using:
puppet module install onpuppet-monitoringclass { 'monitoring':
collectd_network_server_hostname => 'influxdb',
sensu_rabbitmq_hostname => 'sensu.server',
sensu_rabbitmq_password => 'pass',
}This will install CollectD and Sensu, and report to 'influxdb' and 'sensu.server' respectively.
- CollectD will get installed only if collectd_network_server_hostname is set
- Sensu will get installed only if sensu_rabbitmq_hostname is set
Default:
- cpu
- disk
- df
- fhcount
- interface
- load
- memory
- uptime
If present:
- apache (if statuspage is enabled)
- cuda
- isc-dhcp-server
- ntpd
- rabbitmq (if management interface enabled)
- redis
This plugin gets metrics from the mod_status page in Apache. If using Puppetlabs-apache module, this page can be enabled like so;
class { '::apache::mod::status':
allow_from => ['127.0.0.1', '::1'],
extended_status => 'On',
}To get metrics from RabbitMQ, the management module needs to be enabled. This can be done like so;
rabbitmq-plugins enable rabbitmq_management
CollectD will use user "guest" by default. This user is available and only available from localhost on default installations. On a non-default installation you might get 401 permission denied errors in CollectD plugin logs. You can fix this by;
rabbitmqctl set_user_tags guest monitoring
rabbitmqctl -q list_vhosts | xargs -n1 rabbitmqctl set_permissions guest ".*" ".*" ".*" -p
Default:
- cpu
- memory
- disk
- load
- filesystem
- process
- network
If present:
- centrify
- collectd
- elasticsearch
- hekad
- influxdb
- isc-dhcp-server
- mysql
- postfix
- puppet
- rabbitmq
- redis
- sshd
This module relies on a set of custom facts to detect any services installed. These facts are refreshed at the end of any ordinary Puppet run using the onpuppet-refacter module. This ensures that if another module installs any of these services, the fact values will be updated to reflect this new state before installing monitoring plugins
Checks if Apache is installed on the system
$::apache_presentChecks if apache status page with metrics is available from localhost
$::apache_statuspage_presentChecks if Centrify is installed on the system
$::centrify_presentChecks if CollectD is installed on the system
$::collectd_presentChecks if Cuda is installed on the system
$::cuda_presentChecks if ElasticSearch is installed on the system
$::elasticsearch_presentChecks if Heka is installed on the system
$::hekad_presentChecks if InfluxDB is installed on the system
$::influxdb_presentChecks if ISC DHCP Server is installed on the system
$::iscdhcp_presentChecks if ISC DHCP Server is running
$::iscdhcp_runningChecks if Mysql is installed on the system
$::mysql_presentChecks if ntpd is installed on the system
$::ntpd_presentChecks if Postfix is installed on the system
$::postfix_presentChecks if Puppet is installed on the system
$::puppet_presentReturns true if Puppet is running, false otherwise
$::puppet_runningChecks if RabbitMQ is installed on the system
$::rabbitmq_presentRetrieves RabbitMQ management port if enabled
$::rabbitmq_management_portChecks if Redis is installed on the system
$::redis_presentChecks if SSHd is installed on the system
$::sshd_presentReturns true if SSHd is running, false otherwise
$::sshd_runningIf you are running through a Puppet master, and are deploying services using Puppet - monitoring will not detect this service until the next run due to a limitation in onpuppet-refacter module. Running in a masterless setup however, will work for a single run.
See CONTRIBUTING.md