Skip to content

Instantly share code, notes, and snippets.

@kometchtech
Last active March 3, 2018 14:01
Show Gist options
  • Save kometchtech/d311ecc0692a45323204 to your computer and use it in GitHub Desktop.
Save kometchtech/d311ecc0692a45323204 to your computer and use it in GitHub Desktop.
mackerel.io agent for Ubuntu 15.04
# pidfile = "/var/run/mackerel-agent.pid"
# root = "/var/lib/mackerel-agent"
# verbose = false
# apikey = ""
# Configuration for connection
# [connection]
# post_metrics_dequeue_delay_seconds = 30 # delay for dequeuing from buffer queue
# post_metrics_retry_delay_seconds = 60 # delay for retring a request that causes errors
# post_metrics_retry_max = 10 # max numbers of retries for a request that causes errors
# post_metrics_buffer_size = 30 # max numbers of requests stored in buffer queue.
# Configuration for Custm Metrics Plugins
# see also: http://help-ja.mackerel.io/entry/advanced/custom-metrics
# followings are mackerel-agent-plugins https://github.com/mackerelio/mackerel-agent-plugins
# Plugin for Apache2 mod_status
# By default, the plugin accesses to http://127.0.0.1/server-status?auto
# [plugin.metrics.apache2]
# command = "/usr/local/bin/mackerel-plugin-apache2"
# Plugin for EC2 CPU Credit
# [plugin.metrics.aws-ec2_cpucredit]
# command = "/usr/local/bin/mackerel-plugin-aws-ec2-cpucredit"
# Plugin for AWS ELB
# [plugin.metrics.aws-elb]
# command = "/usr/local/bin/mackerel-plugin-aws-elb"
# Plugin for Amazon RDS
# [plugin.metrics.aws-rds]
# command = "/usr/local/bin/mackerel-plugin-aws-rds -identifier=<required>"
# Plugin for Elasticsearch
# By default, the plugin accesses Elasticsearch on localhost.
# [plugin.metrics.elasticsearch]
# command = "/usr/local/bin/mackerel-plugin-elasticsearch"
# Plugin for HAProxy
# By default, the plugin accesses Elasticsearch on localhost.
# [plugin.metrics.haproxy]
# command = "/usr/local/bin/mackerel-plugin-haproxy"
# Plugin for JVM
# Required javaname
# [plugin.metrics.jvm]
# command = "/usr/local/bin/mackerel-plugin-jvm -javaname=<required>"
# Plugin for Linux
[plugin.metrics.linux]
command = "/usr/bin/mackerel-plugin-linux"
# Plugin for Memcached
# [plugin.metrics.memcached]
# command = "/usr/local/bin/mackerel-plugin-memcached"
# Plugin for MongoDB
# [plugin.metrics.mongodb]
# command = "/usr/local/bin/mackerel-plugin-mongodb"
# Plugin for MySQL
# Appropriate previlege settings required.
# By default, the plugin accesses MySQL on localhost by 'root' with no password.
# [plugin.metrics.mysql]
# command = "/usr/local/bin/mackerel-plugin-mysql"
# Plugin for Nginx
# By default, the plugin accesses to http://localhost:8080/nginx_status
# [plugin.metrics.nginx]
# command = "/usr/local/bin/mackerel-plugin-nginx"
# Plugin for PHP APC
# [plugin.metrics.php-apc]
# command = "/usr/local/bin/mackerel-plugin-php-apc"
# Plugin for Plack
# By default, the plugin accesses to http://localhost:5000/server-status?json
# [plugin.metrics.plack]
# command = "/usr/local/bin/mackerel-plugin-plack"
# Plugin for PostgreSQL
# Appropriate previlege settings required.
# By default, the plugin accesses PostgreSQL on localhost.
# [plugin.metrics.postgres]
# command = "/usr/local/bin/mackerel-plugin-postgres"
# Plugin for Redis
# By default, the plugin accesses Redis on localhost.
# Currently AUTH password has not been supported yet.
# [plugin.metrics.redis]
# command = "/usr/local/bin/mackerel-plugin-redis"
# Plugin for SNMP
# [plugin.metrics.pps]
# command = "/usr/local/bin/mackerel-plugin-snmp -name='pps' -community='private' '.1.3.6.1.2.1.31.1.1.1.7.2:eth01in:1:0' '.1.3.6.1.2.1.31.1.1.1.11.2:eth01out:1:0'"
# Plugin for Squid
# [plugin.metrics.squid]
# command = "/usr/local/bin/mackerel-plugin-squid"
# Plugin for Varnish
# [plugin.metrics.varnish]
# command = "/usr/local/bin/mackerel-plugin-varnish"
# Plugin for munin (wrapper)
# [plugin.metrics.nfsd]
# command = "/usr/local/bin/mackerel-plugin-munin -plugin=/usr/share/munin/plugins/nfsd"
# [plugin.metrics.bind9]
# command = "/usr/local/bin/mackerel-plugin-munin -plugin=/etc/munin/plugins/bind9 -plugin-conf-d=/etc/munin/plugin-conf.d"
# [plugin.metrics.postfix]
# command = "MUNIN_LIBDIR=/usr/share/munin /usr/local/bin/mackerel-plugin-munin -plugin=/usr/share/munin/plugins/postfix_mailqueue -name=postfix.mailqueue"
# followings are other samples
# [plugin.metrics.vmstat]
# command = "ruby /etc/sensu/plugins/system/vmstat-metrics.rb"
# [plugin.metrics.curl]
# command = "ruby /etc/sensu/plugins/http/metrics-curl.rb"
[plugin.metrics.docker]
command = "/usr/bin/mackerel-plugin-docker -method API -host=unix:///var/run/docker.sock"
[Unit]
Description=mackerel.io agent beta
After=network.target remote-fs.target nss-lookup.target
After=syslog.target
After=rc-local.service boot_init.service openvswitch-switch.service
Wants=rc-local.service boot_init.service openvswitch-switch.service
[Service]
Type=simple
ExecStart=/usr/local/bin/mackerel-agent
EnvironmentFile=/etc/default/mackerel-agent
PIDFile=/var/run/mackerel-agent.pid
[Install]
WantedBy=multi-user.target
WantedBy=network-online.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment