geerlingguy.collectd-signalfx
Ansible Role: Collectd for SignalFx
This role installs SignalFx's version of Collectd on Linux servers and makes it easier to manage Collectd integrations for SignalFx.
Requirements
None.
Role Variables
Here are the available variables and their default values (see defaults/main.yml
):
signalfx_token: ''
- Set your SignalFx token here. If not set, Collectd stats won't be sent!
collectd_hostname: ''
- You can specify a hostname here. If left empty, the server's FQDN will be used.
collectd_installer_url: https://dl.signalfx.com/collectd-install
collectd_install_command: "/tmp/collectd-install {{ signalfx_token }} -y"
collectd_bin_path: /usr/sbin/collectd
- These are used to install SignalFx's version of Collectd and to check if it's installed. It's usually best not to change these.
collectd_signalfx_managed_config:
- url: https://raw.githubusercontent.com/signalfx/integrations/master/collectd-nginx/10-nginx.conf filename: 10-nginx.conf
- You can add items with
url
andfilename
to download managed config files from a URL to the Collectd managed_config directory. Adding a new item will restart Collectd when the playbook is done. To see all example configurations from SignalFx, check thesignalfx/integrations
repository.
collectd_managed_config_changes:
- filename: 10-nginx.conf regexp: '^ URL.+nginx_status"$' line: ' URL "http://localhost:81/nginx_status"'
- You can add items with
filename
,regexp
, andline
to change specific lines in managed config files. This is useful for simple changes like adjusting a port number. For more complex changes, you should create your own template.
In the example above, the file
10-nginx.conf
will be checked for a line that matches theregexp
, which is looking for a line starting withURL
and containingnginx_status
. If found, that line will be replaced with theline
parameter content, changing the Nginx server port for the status retrieval to81
.
Dependencies
None.
Example Playbook
- hosts: server
roles:
- geerlingguy.collectd-signalfx
License
MIT / BSD
Author Information
This role was created in 2017 by Jeff Geerling, the author of Ansible for DevOps.
SignalFx Collectd installation for Linux.
ansible-galaxy install geerlingguy.collectd-signalfx