Forge Home

mackerel_agent

Install and configure mackerel-agent

24,579 downloads

11,517 latest version

4.6 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.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.4.7 (latest)
  • 0.4.6
  • 0.4.5
  • 0.4.4 (deleted)
  • 0.4.3
  • 0.4.2
  • 0.4.1
  • 0.4.0
  • 0.3.0
  • 0.2.0
  • 0.1.1
  • 0.1.0
released Aug 10th 2016
This version is compatible with:
  • , , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'tomohiro-mackerel_agent', '0.4.7'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add tomohiro-mackerel_agent
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install tomohiro-mackerel_agent --version 0.4.7

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
Tags: mackerel

Documentation

tomohiro/mackerel_agent — version 0.4.7 Aug 10th 2016

Puppet module for mackerel-agent

Puppet Forge Dependency Status Build Status

Table of Contents

  1. Overview - What is the mackerel_agent module?
  2. Setup - The basics of getting started
  3. Usage - How to use the module
  4. Limitations - OS compatibility, etc.
  5. 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.