librato.librato

Ansible Role: Librato

This Ansible role sets up and configures the Librato Agent and its plugins.

Requirements

No special requirements needed.

Dependencies

No dependencies required.

Quick Start

To start using this role, just set your email and token variables, and include the role as shown below:

- hosts: all
  roles:
    - { role: librato.librato, librato_email: '[email protected]', librato_token: 'your-token-here' }

By default, the following plugins are active: cpu, df, disk, swap, memory, load.

To add a new plugin, define any necessary variables for it and then append it to librato_enabled_plugins:

- hosts: all
  vars:
    librato_apache_path: '/my-status-endpoint'
    librato_enabled_plugins: ['apache']

Available Plugins

  • cpu
  • df
  • memory
  • load
  • disk
  • swap
  • apache
  • nginx
  • nginx_plus
  • jvm
  • memcached
  • varnish
  • zookeeper
  • docker
  • elasticsearch
  • mongodb
  • postgresql
  • mysql
  • redis
  • haproxy

Usage

Custom or Upstream collectd Plugins

To use your own collectd plugins, simply configure them in /opt/collectd/etc/collectd.conf.d/ and place any custom plugins in /opt/collectd/share/collectd/.

Plugin Configuration Examples

For Apache Plugin:

  • librato_apache_protocol: Type: string (default: http, change to https if using SSL)
  • librato_apache_host: Type: string (default: localhost)
  • librato.apach.path: Type: string (default: /server-status, ?auto added automatically)
  • librato_apache_user: Type: string (default: empty)
  • librato_apache_password: Type: string (default: empty)

For Docker Plugin:

  • librato_docker_protocol: Type: string (default: http, change to https if using SSL)
  • librato_docker_host: Type: string (default: localhost)
  • librato_docker_port: Type: string (default: 2735)

(Similar configurations apply for other plugins such as elasticsearch, haproxy, jvm, etc. with their relevant settings.)

Global Variables

  • librato_email: Required string for metrics email, defaults to empty.
  • librato_token: Required string for API token, defaults to empty.
  • librato_version: String for Librato Agent version.
  • librato_repo_url: Base URL for package (default: Librato's repo).
  • librato_enabled_plugins: Array for plugins you want to enable, starts empty.

Supported Platforms

  • RHEL 6 / CentOS 6
  • RHEL 7 / CentOS 7
  • Fedora 23
  • Amazon Linux 2016.03
  • Ubuntu 12.04, 14.04, 15.04, 15.10, 16.04
  • Debian 7, 8

Supported Ansible Versions

Requires Ansible version 2.2 or higher.

Development

Testing

To test the integration:

  1. Run bundle install
  2. Run kitchen test

Testing on Amazon Linux

For testing Amazon Linux:

  1. Install kitchen-ec2: gem install kitchen-ec2
  2. Update your .kitchen.yml file with your AWS key ID.
  3. Set security_group_ids in the driver to use a security group that your laptop can access.
  4. Specify the path of your SSH key in transport.ssh_key.

License

MIT License

Authors & Contributors

Mike Julian (@mjulian)

Informazioni sul progetto

Install and configure the Librato Agent

Installa
ansible-galaxy install librato.librato
Licenza
Unknown
Download
651
Proprietario
https://librato.com