An Ansible role for mackerel-agent. (development version)
Fetching latest commit…
Cannot retrieve the latest commit at this time.


An Ansible role for installing mackerel-agent and official plugins.

Official Plugins

Requirements & Dependencies

  • Tested on Ansible 1.8.2 or higher

Role Variables

mackerel_agent_apikey: "yourapikey"
mackerel_agent_pidfile: "/var/run/"
mackerel_agent_root: "/var/lib/mackerel-agent"
                 - "My-Service:app"
                 - "Another-Service:db"

# optional 
mackerel_use_plugins: yes # default: no
                 jvm: "/usr/local/bin/mackerel-plugin-jvm -javaname=NettyServer"

                 check_cron: "/usr/local/bin/check-procs -p crond"

Example Playbook

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

  hosts: Hatena-Antenna2_backend
    - mackerel_agent_apikey: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    - mackerel_agent_roles:
          - "My-Service:app"
          - "Another-Service:db"
    - mackerel-agent


Copyright:: 2015 Hatena Co., Ltd.

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

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.