buluma.collectd

Ansible Role collectd

This role helps you install and set up collectd on your machine.

GitHub Version Issues Pull Requests Downloads
github Version Issues PullRequests Ansible Role

Example Playbook

Here’s an example playbook from molecule/default/converge.yml, which is tested with each code change.

---
- name: converge
  hosts: all
  become: true
  gather_facts: true
  vars:
    collectd_plugin_logging: logfile
    collectd_basic_plugins:
      - cpu
      - interface
      - load
      - memory
    collectd_plugins:
      - name: df
        config: |
          MountPoint "/proc"
          MountPoint "/dev"
          ...
      - name: disk
        config: |
          Disk "/^hd"
          IgnoreSelected true
      ...
  pre_tasks:
    - name: Update apt cache.
      apt: update_cache=true cache_valid_time=600
      when: ansible_os_family == 'Debian'
  roles:
    - role: buluma.collectd

Before running this, prepare your machine using molecule/default/prepare.yml:

---
- name: prepare
  hosts: all
  become: true
  gather_facts: false

  roles:
    - role: buluma.bootstrap
    - role: buluma.epel

For detailed instructions on using these roles, check out this full guide.

Role Variables

You can find the default values for the variables in defaults/main.yml:

---
# defaults file for collectd

collectd_conf_hostname: "{{ ansible_hostname }}"
collectd_conf_fqdnlookup: "false"
collectd_conf_basedir: /var/lib/collectd
collectd_conf_pidfile: /var/run/collectd.pid
...
collectd_basic_plugins:
  - cpu
  - interface
  - load
  - memory
...
collectd_plugins: []

Requirements

You need the pip packages mentioned in requirements.txt.

State of used roles

Some roles are needed to prepare your system:

Requirement GitHub Version
buluma.bootstrap Ansible Molecule Version
buluma.epel Ansible Molecule Version

Context

This role is part of a collection of compatible roles. You can read more about them here.

Dependencies Overview

dependencies

Compatibility

This role has been tested with these container images:

container tags
Alpine all
EL 8
Debian bullseye
Fedora all
opensuse all
Ubuntu focal, bionic

The minimum version of Ansible needed is 2.10. Tests have been done on:

  • Previous versions
  • Current version
  • Development versions

If you encounter any issues, please report them on GitHub.

Changelog

Check the Role History for updates.

License

This role is licensed under Apache-2.0.

Author Information

This role is created by Shadow Walker.

Informazioni sul progetto

Install and configure collectd on your system.

Installa
ansible-galaxy install buluma.collectd
Licenza
apache-2.0
Download
9.2k
Proprietario
DevOps Engineer