Version information
released Aug 10th 2016
This version is compatible with:
- , , ,
Start using this module
Add this module to your Puppetfile:
mod 'tomohiro-mackerel_agent', '0.4.7'
Learn more about managing modules with a PuppetfileDocumentation
tomohiro/mackerel_agent — version 0.4.7 Aug 10th 2016
Puppet module for mackerel-agent
Table of Contents
- Overview - What is the mackerel_agent module?
- Setup - The basics of getting started
- Usage - How to use the module
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Overview
This Puppet module install and configure mackerel-agent.
Setup
Install via Puppet Forge:
$ puppet module install tomohiro-mackerel_agent
Usage
class { 'mackerel_agent':
apikey => 'Your API Key',
roles => ['service:web', 'service:database'],
host_status => {
on_start => 'working',
on_stop => 'poweroff'
},
ignore_filesystems => '/dev/ram.*',
use_metrics_plugins => true,
use_check_plugins => true,
metrics_plugins => {
apache2 => '/usr/local/bin/mackerel-plugin-apache2',
php-opcache => '/usr/local/bin/mackerel-plugin-php-opcache'
},
check_plugins => {
access_log => '/usr/local/bin/check-log --file /var/log/access.log --pattern FATAL',
check_cron => '/usr/local/bin/check-procs -p crond'
}
}
Hiera
mackerel_agent::apikey: 'Your API Key'
mackerel_agent::roles:
- 'service:web'
- 'service:database'
mackerel_agent::host_status:
on_start: working
on_stop: poweroff
mackerel_agent::ignore_filesystems: '/dev/ram.*'
mackerel_agent::use_metrics_plugins: true
mackerel_agent::use_check_plugins: true
mackerel_agent::metrics_plugins:
apache2: '/usr/local/bin/mackerel-plugin-apache2'
php-opcache: '/usr/local/bin/mackerel-plugin-php-opcache'
mackerel_agent::check_plugins:
access_log: '/usr/local/bin/check-log --file /var/log/access.log --pattern FATAL'
check_cron: '/usr/local/bin/check-procs -p crond'
Limitations
These operation systems are supported.
- RHEL 6
- CentOS 6
- Debian 7
- Ubuntu 14.04
The person who want to add an operating system to supported list should implement it himself.
Development
Requirements
- Puppet 3.7 or later
- librarian-puppet
Setup development environments
Install dependencies:
$ bundle install --path vendor/bundle
$ bundle exec librarian-puppet install
You can run smoke tests:
$ export MACKEREL_API_KEY="your api key" # Export a your mackerel API key
$ vagrant up
$ vagrant provision
Testing
Unit tests:
$ bundle exec rake spec
Acceptance tests:
$ export DOCKER_HOST=tcp://your-docker-host-ip:port
$ BEAKER_set=centos-6-x64 bundle exec rake beaker
Contributing
See CONTRIBUTING guideline.
LICENSE
© 2014 - 2016 Tomohiro TAIRA.
This project is licensed under the Apache License, Version 2.0. See LICENSE for details.
CHANGELOG
0.4.7 (Aug 10, 2016)
0.4.6 (June 08, 2016)
- Support hosts's statuses settings GH-17
0.4.5 (June 02, 2016)
0.4.4
Omit
0.4.3 (March 15, 2016)
- Add option to install the latest mackerel plugins GH-12
0.4.2 (Feb 28, 2016)
- Support
apt
module v2.2.1 GH-11
0.4.1 (Dec 4, 2015)
- Create
conf.d
after install mackerel-agent GH-9
0.4.0 (Nov 13, 2015)
- Support the Mackerel plugins GH-7
0.3.1 (Sep 24, 2015)
- Support the /etc/mackerel-agent/conf.d by default GH-5
0.2.0 (Aug 28, 2015)
- Support Debian / Ubuntu GH-2
0.1.1 (Dec 19, 2014)
- Restart the mackerel-agent when updated a configuration file
0.1.0 (Dec 19, 2014)
- Initial release
- Support RHEL / CentOS 6
Dependencies
- puppetlabs/stdlib (>= 3.2.0 <5.0.0)
- puppetlabs/apt (>=2.0.0 <2.2.0)
Copyright 2014 - 2016 Tomohiro TAIRA Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.