diff --git a/README.md b/README.md index 1b47390..955e2dd 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,7 @@ To include a plugin, set any variables you need for it, then add it to the `libr * `mysql` * `redis` * `haproxy` +* `interface` ## Usage @@ -91,6 +92,25 @@ To use your own custom or upstream collectd plugin, simply have another module d The password to use for password-protected status pages. Defaults to empty. +### Plugin: `df` + - `librato_df_fstype` + + **Type**: array + + The FSType to use. Defaults to `["ext2", "ext3", "ext4", "xfs", "jfs", "btrfs", "reiserfs", "vboxsf", "tmpfs"]`. + + - `librato_df_device` + + **Type**: array + + The Device to use. Defaults to `''` + + - `librato_df_mountpoint` + + **Type**: array + + The MountPoint to use. Defaults to `''` + ### Plugin: `docker` - `librato_docker_protocol` @@ -108,7 +128,7 @@ To use your own custom or upstream collectd plugin, simply have another module d **Type**: string - The Docker port. Defaults to `2735` + The Docker port. Defaults to `2375` ### Plugin: `elasticsearch` @@ -155,6 +175,10 @@ To use your own custom or upstream collectd plugin, simply have another module d The default proxies to collect. Defaults to `server`, `frontend`, `backend`. +### Plugin: `interface` + + Interface has no configurable attributes. + ### Plugin: `jvm` - `librato_jvm_host` @@ -443,61 +467,61 @@ To use your own custom or upstream collectd plugin, simply have another module d The global plugin polling interval in seconds. Defaults to `60`. -- `librato_use_log_file` +- `librato_logging_use_log_file` **Type**: true/false Write collectd logs to a file. Defaults to `true`. -- `librato_use_syslog` +- `librato_logging_use_syslog` **Type**: true/false Write collectd logs to syslog. Defaults to `false`. -- `librato_use_logstash` +- `librato_logging_use_logstash` **Type**: true/false Write collectd logs to a logstash-formatted file. Defaults to `false`. -- `librato_log_file_log_level` +- `librato_logging_log_file_log_level` **Type**: string The log level to use for `log_file`. Defaults to `info`. -- `librato_log_file_filename` +- `librato_logging_log_file_filename` **Type**: string The filename to use for `log_file`. Defaults to `/opt/collectd/var/log/collectd.log`. -- `librato_log_file_timestamp` +- `librato_logging_log_file_timestamp` **Type**: true/false Use timestamps in the log file or not. Defaults to `true`. -- `librato_log_file_print_severity` +- `librato_logging_log_file_print_severity` **Type**: true/false Include severity levels in the log file or not. Defaults to `true`. -- `librato_syslog_log_level` +- `librato_logging_syslog_log_level` **Type**: string The log level to use for `syslog`. Defaults to `info`. -- `librato_logstash_log_level` +- `librato_logging_logstash_log_level` **Type**: string The log level to use for `logstash`. Defaults to `info`. -- `librato_logstash_filename` +- `librato_logging_logstash_filename` **Type**: string @@ -507,7 +531,7 @@ To use your own custom or upstream collectd plugin, simply have another module d **Type**: array - A list of default plugins to include. Defaults to: `cpu`, `df`, `disk`, `swap`, `memory`, `load`. + A list of default plugins to include. Defaults to: `cpu`, `disk`, `swap`, `memory`, `load`. - `librato_enabled_plugins` diff --git a/defaults/main.yml b/defaults/main.yml index 07b2496..1f93e0a 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -8,7 +8,7 @@ librato_config_base: '/opt/collectd/etc' librato_plugin_config_path: '/opt/collectd/etc/collectd.conf.d' librato_fqdn_lookup: true librato_interval: 60 -librato_default_plugins: ['cpu', 'df', 'disk', 'swap', 'memory', 'load'] +librato_default_plugins: ['cpu', 'disk', 'swap', 'memory', 'load'] librato_enabled_plugins: [] librato_logging_use_log_file: true @@ -66,8 +66,12 @@ librato_postgresql_user: 'postgresql' librato_docker_protocol: 'http' librato_docker_host: 'localhost' -librato_docker_port: '2735' +librato_docker_port: '2375' librato_jvm_host: 'localhost' librato_jvm_service_url: 'service:jmx:rmi:///jndi/rmi://localhost:17264/jmxrmi' librato_jvm_mbeans: [] + +librato_df_fstype: ["ext2", "ext3", "ext4", "xfs", "jfs", "btrfs", "reiserfs", "vboxsf", "tmpfs"] +librato_df_device: '' +librato_df_mountpoint: '' \ No newline at end of file diff --git a/files/df.conf b/files/df.conf deleted file mode 100644 index cd0f609..0000000 --- a/files/df.conf +++ /dev/null @@ -1,15 +0,0 @@ -LoadPlugin df - - FSType "ext2" - FSType "ext3" - FSType "ext4" - FSType "xfs" - FSType "jfs" - FSType "btrfs" - FSType "reiserfs" - FSType "vboxsf" - FSType "tmpfs" - ReportInodes false - ValuesAbsolute false - ValuesPercentage true - diff --git a/tasks/agent.yml b/tasks/agent.yml index 261f566..a3e9cb7 100644 --- a/tasks/agent.yml +++ b/tasks/agent.yml @@ -10,6 +10,7 @@ yum: name: collectd-core-{{ librato_rh_version }} state: present + enablerepo: epel notify: - collectd when: diff --git a/templates/df.conf.jinja b/templates/df.conf.jinja new file mode 100644 index 0000000..dee49a5 --- /dev/null +++ b/templates/df.conf.jinja @@ -0,0 +1,19 @@ +LoadPlugin df + +{% if librato_df_mountpoint|length > 0 %} +{% for mountpoint in librato_df_mountpoint %} + MountPoint "{{ mountpoint }}" +{% endfor %} +{% endif %} +{% if librato_df_device|length > 0 %}{% for device in librato_df_device %} + Device "{{ device }}" +{% endfor %} +{% endif %} +{% if librato_df_fstype|length > 0 %}{% for fstype in librato_df_fstype %} + FSType "{{ fstype }}" +{% endfor %} +{% endif %} + ReportInodes false + ValuesAbsolute false + ValuesPercentage true + diff --git a/templates/interface.conf.jinja b/templates/interface.conf.jinja new file mode 100644 index 0000000..b18c294 --- /dev/null +++ b/templates/interface.conf.jinja @@ -0,0 +1,5 @@ +LoadPlugin interface + + Interface "lo" + IgnoreSelected true + diff --git a/test/integration/default/serverspec/docker_spec.rb b/test/integration/default/serverspec/docker_spec.rb index 47181f7..d7d0edf 100644 --- a/test/integration/default/serverspec/docker_spec.rb +++ b/test/integration/default/serverspec/docker_spec.rb @@ -4,5 +4,5 @@ describe file('/opt/collectd/etc/collectd.conf.d/docker.conf') do it { should exist } it { should contain 'LoadPlugin exec' } - it { should contain 'Exec "nobody" "/opt/collectd/share/collectd/collectd-docker.py" "http://localhost:2735"' } + it { should contain 'Exec "nobody" "/opt/collectd/share/collectd/collectd-docker.py" "http://localhost:2375"' } end