Merge "Add remote_agent"
diff --git a/docker/swarm/stack/monitoring.yml b/docker/swarm/stack/monitoring.yml
index 4371367..7c03c35 100644
--- a/docker/swarm/stack/monitoring.yml
+++ b/docker/swarm/stack/monitoring.yml
@@ -15,6 +15,23 @@
driver_opts:
encrypted: 1
service:
+ remote_agent:
+ networks:
+ - monitoring
+ deploy:
+ replicas: 1
+ labels:
+ com.mirantis.monitoring: "remote_agent"
+ restart_policy:
+ condition: any
+ labels:
+ com.mirantis.monitoring: "remote_agent"
+ image: ${_param:docker_image_remote_agent}
+ ports:
+ - 15014:${telegraf:remote_agent:output:prometheus_client:bind:port}
+ volumes:
+ - ${telegraf:remote_agent:dir:config}:/etc/telegraf
+ - ${telegraf:remote_agent:dir:config_d}:/etc/telegraf/telegraf.d
alertmanager:
networks:
- monitoring
diff --git a/prometheus/server/target/dns.yml b/prometheus/server/target/dns.yml
index 7bbf92e..ed6602d 100644
--- a/prometheus/server/target/dns.yml
+++ b/prometheus/server/target/dns.yml
@@ -20,3 +20,8 @@
- 'tasks.monitoring_alertmanager'
type: A
port: ${prometheus:alertmanager:bind:port}
+ - name: 'remote_agent'
+ domain:
+ - 'tasks.monitoring_remote_agent'
+ type: A
+ port: ${telegraf:remote_agent:output:prometheus_client:bind:port}
diff --git a/telegraf/agent/remote.yml b/telegraf/agent/remote.yml
new file mode 100644
index 0000000..9404525
--- /dev/null
+++ b/telegraf/agent/remote.yml
@@ -0,0 +1,13 @@
+classes:
+- service.telegraf.agent.remote
+parameters:
+ telegraf:
+ remote_agent:
+ input:
+ internal:
+ output:
+ prometheus_client:
+ bind:
+ address: 0.0.0.0
+ port: 9126
+ engine: prometheus