Giter Club home page Giter Club logo

puppet-mackerel_agent's Introduction

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'
    check_ssh  => {
      command               => 'ruby /path/to/check-ssh.rb',
      notification_interval => '60',
      max_check_attempts    => '3',
      check_interval        => '5'
    }
  }
}

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'
  ssh:
    command: 'ruby /path/to/check-ssh.rb'
    notification_interval: '60'
    max_check_attempts: '3'
    check_interval: '5'

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.

puppet-mackerel_agent's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

puppet-mackerel_agent's Issues

Support for CentOS7

Though with default installation its work on CentOS7 but for test purpose I update Vagrant for development environment.

MEMO Did not do any Acceptance tests

PR #29

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.