Skip to content

Ansible role to install and configure carbon-relay-ng using supervisord

License

Notifications You must be signed in to change notification settings

GameAnalytics/ansible-carbon-relay-ng

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

carbon-relay-ng Ansible role

This role aims to configure and start carbon-relay-ng on target machine running under Supervisor

For an example Playbook, see test/main.yml

Requirements

The role requires Supervisor to be installed in the target machine.

Role Variables

Required

graphite_addr: The URL to send metrics to.

graphite_apikey: The API key to the hosted Graphite service

Optional

carbon_relay_ng_port: The service listens on this port. Default: 2003

carbon_relay_ng_bind: IP address where the service binds to. Default: localhost

graphite_route_key: carbon-relay-ng route key: Default: 'grafanaNet'

graphite_route_type: carbon_relay_ng route type: Default: 'grafanaNet'

graphite_interval: Period of metric sending by your application: Default: '1m'

graphite_interval_ms: Must equal to graphite_interval but in ms. Default: 60000

wait_for_healthcheck: Whether to wait for carbon-relay-ng to listen on port as a part of the role run. Default: True

Test

In order to run tests locally:

$ ansible-playbook -i test/inventory test/main.yml -vvv

You need Docker and also docker-py library.

See here for more info about Ansible role testing

Note that there are problems with Ansible/pip/docker-py. See here

Best practices

For Ansible best practices, please read here and specially here.