summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Kupidura <bkupidura@mirantis.com>2017-01-24 10:11:48 +0100
committerBartosz Kupidura <bkupidura@mirantis.com>2017-01-25 14:20:55 +0100
commit2bb2d9432bf2e32944a6a5ba8cea360ce3dd6f0d (patch)
tree779f962dc15674720b1de21e5a351bef7f73d205
parent08eec5545492e62685404ecb0cdd528b172841e6 (diff)
Add telegraf agent to memcached pod
Notes
Notes (review): Code-Review+1: Ruslan Kamaldinov <rkamaldinov@mirantis.com> Verified+1: Mirantis CCP CI <mirantis-fuel-ccp-ci@mirantis.com> Code-Review+1: sryabin <sryabin@mirantis.com> Code-Review+2: Proskurin Kirill <kproskurin@mirantis.com> Code-Review+2: Artur Zarzycki <azarzycki@mirantis.com> Workflow+1: Artur Zarzycki <azarzycki@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Fri, 27 Jan 2017 10:26:44 +0000 Reviewed-on: https://review.openstack.org/424524 Project: openstack/fuel-ccp-memcached Branch: refs/heads/master
-rw-r--r--service/files/telegraf.conf.j214
-rw-r--r--service/memcached.yaml24
2 files changed, 37 insertions, 1 deletions
diff --git a/service/files/telegraf.conf.j2 b/service/files/telegraf.conf.j2
new file mode 100644
index 0000000..462d580
--- /dev/null
+++ b/service/files/telegraf.conf.j2
@@ -0,0 +1,14 @@
1[agent]
2 interval = "15s"
3 round_interval = false
4 metric_batch_size = 1000
5 metric_buffer_limit = 10000
6 collection_jitter = "2s"
7 hostname = ""
8 omit_hostname = false
9
10[[outputs.prometheus_client]]
11 listen = ":{{ telegraf.prometheus_output_port.cont }}"
12
13[[inputs.memcached]]
14 servers = ["{{ network_topology["private"]["address"] }}:{{ memcached.port.cont }}"]
diff --git a/service/memcached.yaml b/service/memcached.yaml
index 00597c3..0d0b7e6 100644
--- a/service/memcached.yaml
+++ b/service/memcached.yaml
@@ -1,11 +1,33 @@
1dsl_version: 0.1.0 1dsl_version: 0.4.0
2service: 2service:
3 name: memcached 3 name: memcached
4 ports: 4 ports:
5 - {{ memcached.port }} 5 - {{ memcached.port }}
6 # {% if telegraf is defined %}
7 annotations:
8 service:
9 prometheus.io/scrape: "true"
10 prometheus.io/port: "{{ telegraf.prometheus_output_port.cont }}"
11 # {% endif %}
6 containers: 12 containers:
7 - name: memcached 13 - name: memcached
8 image: memcached 14 image: memcached
9 daemon: 15 daemon:
10 command: memcached -v -u memcached -l {{ memcached.address }} -m {{ memcached.ram }} -c {{ memcached.max_connections }} 16 command: memcached -v -u memcached -l {{ memcached.address }} -m {{ memcached.ram }} -c {{ memcached.max_connections }}
11 user: memcached 17 user: memcached
18 # {% if telegraf is defined %}
19 - name: memcached-telegraf
20 image: telegraf
21 daemon:
22 dependencies:
23 - etcd
24 - memcached
25 command: telegraf --config /etc/telegraf/telegraf.conf --input-filter memcached
26 files:
27 - telegraf-conf
28 # {% endif %}
29
30files:
31 telegraf-conf:
32 path: /etc/telegraf/telegraf.conf
33 content: telegraf.conf.j2