Skip to content

Oefenweb/ansible-collectd

 
 

Repository files navigation

collectd

Build Status Ansible Galaxy

Set up Collectd in Debian-like systems.

Requirements

None

Variables

  • collectd_install: [default: []]: (Additional) Packages to install

  • collectd_plugins_present: [default: ['contextswitch', 'cpu', 'df', 'disk', 'interface', 'irq', 'network', 'processes', 'swap', 'tcpconns', 'uptime']]: Names of the plugins to install

  • collectd_plugins_absent: [default: []]: Names of the plugins to remove

Plugin network
  • collectd_plugin_network_servers: [default: []]: The servers to send the data to
  • collectd_plugin_network_servers.{n}.server: [required]: The IP address of the server
  • collectd_plugin_network_servers.{n}.port: [default: 25826]: The port of the server
  • collectd_plugin_network_servers.{n}.security_level: [optional]: The security level is one of three values: None, Sign or Encrypt
  • collectd_plugin_network_servers.{n}.username: [optional]: Username
  • collectd_plugin_network_servers.{n}.password: [optional]: Password
Plugin disk
  • collectd_plugin_disk_disks: [default: ['/^[vhs]d[a-f]$/']]: Names (or regexes to match names) of disks to collect information of
Plugin interface
  • collectd_plugin_interface_interfaces: [default: []]: Network interfaces to collect information of, defaults to all interfaces when empty
Plugin mysql
  • collectd_plugin_mysql_databases: [default: []]: The MySQL databases to collect information of.
  • collectd_plugin_mysql_databases.{n}.alias: [optional]: Alias to use as sender instead of hostname when reporting. This may be useful when having cryptic hostnames.
  • collectd_plugin_mysql_databases.{n}.hostname: [default: localhost]: Hostname of the database server
  • collectd_plugin_mysql_databases.{n}.username: [optional]: Username to use when connecting to the database. The user does not have to be granted any privileges (which is synonym to granting the USAGE privilege), unless you want to collectd replication statistics (see MasterStats and SlaveStats below). In this case, the user needs the REPLICATION CLIENT (or SUPER) privileges. Else, any existing MySQL user will do.
  • collectd_plugin_mysql_databases.{n}.password: [optional]: Password needed to log into the database.
  • collectd_plugin_mysql_databases.{n}.database: [optional]: Select this database. Defaults to no database which is a perfectly reasonable option for what this plugin does.
  • collectd_plugin_mysql_databases.{n}.port: [optional]: TCP-port to connect to. If Host is set to localhost (the default), this setting has no effect. See the documentation for the mysql_real_connect function for details.
  • collectd_plugin_mysql_databases.{n}.socket: [optional]: Specifies the path to the UNIX domain socket of the MySQL server. This option only has any effect, if Host is set to localhost (the default). Otherwise, use the Port option above. See the documentation for the mysql_real_connect function for details.
  • collectd_plugin_mysql_databases.{n}.innodb_stats: [default: true]: If enabled, metrics about the InnoDB storage engine are collected.
  • collectd_plugin_mysql_databases.{n}.master_stats: [default: false]: Enable the collection of master statistics in a replication setup. In order to be able to get access to these statistics, the user needs special privileges. Defaults to false.
  • collectd_plugin_mysql_databases.{n}.slave_stats: [default: false]: Enable the collection of slave statistics in a replication setup. In order to be able to get access to these statistics, the user needs special privileges. Defaults to false.
Plugin apache
  • collectd_plugin_apache_instances: [default: []]: The Apaches instances to collect information of.
  • collectd_plugin_apache_instances.{n}.name: [default: apache]: The name of the instance
  • collectd_plugin_apache_instances.{n}.url: [default: http://localhost/mod_status?auto]: Sets the URL of the mod_status output. This needs to be the output generated by ExtendedStatus on and it needs to be the machine readable output generated by appending the ?auto argument.
  • collectd_plugin_apache_instances.{n}.username: [optional]: Optional user name needed for authentication
  • collectd_plugin_apache_instances.{n}.password: [optional]: Optional password needed for authentication
  • collectd_plugin_apache_instances.{n}.verify_peer: [default: true]: Enable or disable peer SSL certificate verification. See http://curl.haxx.se/docs/sslcerts.html for details
  • collectd_plugin_apache_instances.{n}.verify_host: [default: true]: Enable or disable peer host name verification. If enabled, the plugin checks if the Common Name or a Subject Alternate Name field of the SSL certificate matches the host name provided by the URL option. If this identity check fails, the connection is aborted. Obviously, only works when connecting to a SSL enabled server.
  • collectd_plugin_apache_instances.{n}.ca_cert_file: [optional]: File that holds one or more SSL certificates. If you want to use HTTPS you will possibly need this option. What CA certificates come bundled with libcurl and are checked by default depends on the distribution you use.
  • collectd_plugin_apache_instances.{n}.ssl_ciphers: [optional]: Specifies which ciphers to use in the connection. The list of ciphers must specify valid ciphers. See http://www.openssl.org/docs/apps/ciphers.html for details.

Dependencies

None

Example(s)

Minimal (set server IP address for network plugin only)
---
- hosts: all
  roles:
    - oefenweb.collectd
  vars:
    collectd_plugin_network_servers:
      - server: '10.0.0.1'
With encryption
---
- hosts: all
  roles:
    - oefenweb.collectd
  vars:
    collectd_plugin_network_servers:
      - server: '10.0.0.1'
        security_level: Encrypt
        username: foo
        password: bar
With plugin mysql
---
- hosts: all
  roles:
    - oefenweb.collectd
  vars:
    collectd_install:
      - collectd-utils
    collectd_plugin_mysql_databases:
      - username: foo
        password: bar

License

MIT

Author Information

  • Mark van Driel
  • Mischa ter Smitten

Feedback, bug-reports, requests, ...

Are welcome!

Packages

No packages published

Languages

  • Jinja 87.3%
  • Dockerfile 12.7%