kolla-ansible/ansible/roles/collectd/templates/collectd.json.j2
Kuo-tung Kao 0c29fdfc8f provide a universal collectd template
The default config for collectd is very different between OS distro.
For example, in ubuntu, collectd read config from "/etc/collect/collect.conf.d".
But in centos, collectd read config from "/etc/collect.d"
We need to provide a universal collectd template
to make it convenient for different distros.

Change-Id: Ib82fcbb923cb32dbafce04e1e639a400d59a4365
Closes-Bug: #1652246
2017-01-12 10:05:44 +08:00

21 lines
589 B
Django/Jinja

{% set collectd_config = '/etc/collectd/collectd.conf' if kolla_base_distro in ['ubuntu', 'debian'] else '/etc/collectd.conf' %}
{
"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
}
]
}