Merge "provide a universal collectd template"

This commit is contained in:
Jenkins 2017-02-13 02:59:02 +00:00 committed by Gerrit Code Review
commit 7fd2d33f87
4 changed files with 34 additions and 2 deletions

View File

@ -21,3 +21,13 @@
dest: "{{ node_config_directory }}/{{ item }}/config.json"
with_items:
- "collectd"
- name: Copying over collectd.conf for services
template:
src: "{{ item }}"
dest: "{{ node_config_directory }}/collectd/collectd.conf"
with_first_found:
- "{{ node_custom_config }}/collectd/{{ inventory_hostname }}/collectd.conf"
- "{{ node_custom_config }}/collectd/collectd.conf"
- "{{ node_custom_config }}/collectd.conf"
- "collectd.conf.j2"

View File

@ -8,7 +8,6 @@
privileged: True
volumes:
- "{{ node_config_directory }}/collectd/:{{ container_config_directory }}/:ro"
- "{{node_config_directory }}/collectd/collectd.conf.d/:/etc/collectd/collectd.conf.d/"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla/"
- "/sys/:/sys/:ro"

View File

@ -0,0 +1,6 @@
FQDNLookup false
LoadPlugin syslog
LoadPlugin cpu
LoadPlugin interface
LoadPlugin load
LoadPlugin memory

View File

@ -1,3 +1,20 @@
{% set collectd_config = '/etc/collectd/collectd.conf' if kolla_base_distro in ['ubuntu', 'debian'] else '/etc/collectd.conf' %}
{
"command": "/usr/sbin/collectd -f"
"command": "/usr/sbin/collectd -f -C {{ collectd_config }}",
"config_files": [
{
"source": "{{ container_config_directory }}/collectd.conf",
"dest": "{{ collectd_config }}",
"owner": "collectd",
"perm": "0600"
}
],
"permissions": [
{
"path": "/var/log/kolla/collectd",
"owner": "collectd:collectd",
"recurse": true
}
]
}