From 2d2c1f14191fec670a10dcb0a7d48c0d3c53731f Mon Sep 17 00:00:00 2001 From: Bjoern Teipel Date: Tue, 9 May 2017 13:07:32 -0500 Subject: [PATCH] Telegraf playbook fixes The vm_quota.py is missing as telegraf plugin but still referenced inside the playbook-influx-telegraf.yml playbook. Additionally the my.cnf is not necessary to be present on the telegraf hosts/containers, in order to function. The override influxdb_protocol exposes the protocol to be used for communicating with influxdb, usually HTTP Change-Id: I90226d02e82d2516be4a4d84baff22e46ce709fb --- cluster_metrics/playbook-influx-telegraf.yml | 20 +------------------- cluster_metrics/templates/telegraf.conf.j2 | 2 +- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/cluster_metrics/playbook-influx-telegraf.yml b/cluster_metrics/playbook-influx-telegraf.yml index a90ddfc4..f5eedf72 100644 --- a/cluster_metrics/playbook-influx-telegraf.yml +++ b/cluster_metrics/playbook-influx-telegraf.yml @@ -46,18 +46,6 @@ - item.value.when_group | bool - item.value.group == inventory_hostname or inventory_hostname in item.value.group | default([]) - - name: Store my_cnf - slurp: - src: "/root/.my.cnf" - register: _my_cnf - changed_when: false - - name: Copy my.cnf file into telegraf home - copy: - content: "{{ _my_cnf.content | b64decode }}" - dest: "/root/.my.cnf" - mode: "0440" - owner: "telegraf" - group: "telegraf" - name: Drop telegraf config file template: src: templates/telegraf.conf.j2 @@ -86,12 +74,6 @@ - "python /opt/telegraf/ironic_nodes.py" group: "{{ groups['utility_all'][0] }}" when_group: "{{ (groups['ironic_api'] | default([]) | length) > 0 }}" - vm_quota: - plugin_name: "vm_quota.py" - command: - - "python /opt/telegraf/vm_quota.py" - group: "{{ groups['utility_all'][0] }}" - when_group: "{{ (groups['nova_compute'] | default([]) | length) > 0 }}" kvm: plugin_name: "kvm_virsh.py" command: @@ -105,4 +87,4 @@ group: "{{ groups['utility_all'][0] }}" when_group: "{{ (groups['cinder_volumes'] | default([]) | length) > 0 }}" influx_telegraf_targets: - - "{{ influxdb_host|default(internal_lb_vip_address) }}:{{ influxdb_port }}" + - "{{ influxdb_protocol|default('http') }}://{{ influxdb_host|default(internal_lb_vip_address) }}:{{ influxdb_port }}" diff --git a/cluster_metrics/templates/telegraf.conf.j2 b/cluster_metrics/templates/telegraf.conf.j2 index b27fc808..ba78b178 100644 --- a/cluster_metrics/templates/telegraf.conf.j2 +++ b/cluster_metrics/templates/telegraf.conf.j2 @@ -36,7 +36,7 @@ omit_hostname = false [[outputs.influxdb]] - urls = [{{ influx_telegraf_targets | map('quote') | join(',') }}] + urls = ["{{ influx_telegraf_targets | map('quote') | join(',') }}"] database = "{{ influxdb_db_name }}" precision = "s" write_consistency = "any"