Merge "provide a universal collectd template"
This commit is contained in:
commit
7fd2d33f87
@ -21,3 +21,13 @@
|
|||||||
dest: "{{ node_config_directory }}/{{ item }}/config.json"
|
dest: "{{ node_config_directory }}/{{ item }}/config.json"
|
||||||
with_items:
|
with_items:
|
||||||
- "collectd"
|
- "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"
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
privileged: True
|
privileged: True
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ node_config_directory }}/collectd/:{{ container_config_directory }}/:ro"
|
- "{{ 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"
|
- "/etc/localtime:/etc/localtime:ro"
|
||||||
- "kolla_logs:/var/log/kolla/"
|
- "kolla_logs:/var/log/kolla/"
|
||||||
- "/sys/:/sys/:ro"
|
- "/sys/:/sys/:ro"
|
||||||
|
6
ansible/roles/collectd/templates/collectd.conf.j2
Normal file
6
ansible/roles/collectd/templates/collectd.conf.j2
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
FQDNLookup false
|
||||||
|
LoadPlugin syslog
|
||||||
|
LoadPlugin cpu
|
||||||
|
LoadPlugin interface
|
||||||
|
LoadPlugin load
|
||||||
|
LoadPlugin memory
|
@ -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
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user