diff --git a/tasks/main.yml b/tasks/main.yml index e2f3e226b5ebaa6feaf4f79feaf8619da24dcb0c..d4703f4e3550187f1f3f07932a4e3bb908d73c51 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -22,6 +22,8 @@ - automake - pkg-config - uuid-dev + - python-dev + - python-yaml #FireQOS available from 15.04 #- firehol @@ -65,6 +67,28 @@ notify: - "Re-start NetData" + - name: "Configure Python Plugin" + template: + src='python.d.conf' + dest='/etc/netdata/python.d.conf' + owner='netdata' + group='netdata' + mode=644 + notify: + - "Re-start NetData" + + - name: "Configure Plugins" + template: + src='{{ item }}.conf' + dest='/etc/netdata/python.d/{{ item }}.conf' + owner='netdata' + group='netdata' + mode=644 + with_items: + - 'mysql' + notify: + - "Re-start NetData" + - name: "Check if KSM is available" stat: path='/sys/kernel/mm/ksm' register: ksm diff --git a/templates/mysql.conf b/templates/mysql.conf new file mode 100644 index 0000000000000000000000000000000000000000..645e28727632e67b00a89ff750f25b005d7c7da1 --- /dev/null +++ b/templates/mysql.conf @@ -0,0 +1,6 @@ +update_every: 5 +local: + user: 'root' + password: '{{ mysql_root_password|default("root") }}' + host: '127.0.0.1' + port: '3306' diff --git a/templates/python.d.conf b/templates/python.d.conf new file mode 100644 index 0000000000000000000000000000000000000000..1123436d6f5bfb8cbbca670836ac71bdcabc337d --- /dev/null +++ b/templates/python.d.conf @@ -0,0 +1,8 @@ +# This is the configuration for python.d.plugin +enabled: yes + +example: no +mysql: {{ (groups['dbserver-mysql'] is defined and inventory_hostname in groups['dbserver-mysql'])|ternary("yes", "no") }} +phpfpm: no +apache: {{ (groups['webserver'] is defined and inventory_hostname in groups['webserver'])|ternary("yes", "no") }} +nginx: no