Add prometheus-es-exporter

Change-Id: Ie6f9f5136d66cf2d2e73c359ca03d1e29d3c7f7c
Related-bug: PROD-27904 (PROD:27904)
diff --git a/docker/client/images/monitoring.yml b/docker/client/images/monitoring.yml
index 229152d..2189b52 100644
--- a/docker/client/images/monitoring.yml
+++ b/docker/client/images/monitoring.yml
@@ -7,6 +7,7 @@
       - ${_param:docker_image_alertmanager}
       - ${_param:docker_image_grafana}
       - ${_param:docker_image_prometheus}
+      - ${_param:docker_image_prometheus_es_exporter}
       - ${_param:docker_image_prometheus_gainsight}
       - ${_param:docker_image_prometheus_gainsight_elasticsearch}
       - ${_param:docker_image_prometheus_relay}
@@ -14,4 +15,4 @@
       - ${_param:docker_image_remote_agent}
       - ${_param:docker_image_remote_collector}
       - ${_param:docker_image_remote_storage_adapter}
-      - ${_param:docker_image_sf_notifier}
\ No newline at end of file
+      - ${_param:docker_image_sf_notifier}
diff --git a/docker/swarm/stack/monitoring/elasticsearch_exporter.yml b/docker/swarm/stack/monitoring/elasticsearch_exporter.yml
new file mode 100644
index 0000000..5cbc05e
--- /dev/null
+++ b/docker/swarm/stack/monitoring/elasticsearch_exporter.yml
@@ -0,0 +1,28 @@
+classes:
+- system.prometheus.elasticsearch_exporter.container
+parameters:
+  docker:
+    client:
+      stack:
+        monitoring:
+          network:
+            monitoring:
+              driver: overlay
+              driver_opts:
+                encrypted: 1
+          service:
+            elasticsearch_exporter:
+              command: --es-cluster ${_param:stacklight_log_address}:9200 --nodes-stats-disable --cluster-health-disable --indices-stats-disable
+              networks:
+                - monitoring
+              deploy:
+                replicas: 1
+                labels:
+                  com.mirantis.monitoring: "elasticsearch_exporter"
+                restart_policy:
+                  condition: any
+              labels:
+                com.mirantis.monitoring: "elasticsearch_exporter"
+              image: ${_param:docker_image_prometheus_es_exporter}
+              volumes:
+                - "${prometheus:elasticsearch_exporter:dir:config}/elasticsearch_exporter.cfg:/usr/src/app/exporter.cfg"
diff --git a/docker/swarm/stack/monitoring/init.yml b/docker/swarm/stack/monitoring/init.yml
index 134efdc..9fa4281 100644
--- a/docker/swarm/stack/monitoring/init.yml
+++ b/docker/swarm/stack/monitoring/init.yml
@@ -2,6 +2,7 @@
 - system.docker.swarm.stack.monitoring.prometheus
 - system.docker.swarm.stack.monitoring.prometheus.replicated
 - system.docker.swarm.stack.monitoring.alertmanager
+- system.docker.swarm.stack.monitoring.elasticsearch_exporter
 - system.docker.swarm.stack.monitoring.prometheus_relay
 - system.docker.swarm.stack.monitoring.pushgateway
 - system.docker.swarm.stack.monitoring.remote_agent
diff --git a/docker/swarm/stack/monitoring/prometheus_global.yml b/docker/swarm/stack/monitoring/prometheus_global.yml
index 6d8e4ba..925675a 100644
--- a/docker/swarm/stack/monitoring/prometheus_global.yml
+++ b/docker/swarm/stack/monitoring/prometheus_global.yml
@@ -2,6 +2,7 @@
 - system.docker.swarm.stack.monitoring.prometheus
 - system.docker.swarm.stack.monitoring.prometheus.global
 - system.docker.swarm.stack.monitoring.alertmanager
+- system.docker.swarm.stack.monitoring.elasticsearch_exporter
 - system.docker.swarm.stack.monitoring.prometheus_relay
 - system.docker.swarm.stack.monitoring.pushgateway
 - system.docker.swarm.stack.monitoring.remote_agent
diff --git a/prometheus/elasticsearch_exporter/container.yml b/prometheus/elasticsearch_exporter/container.yml
new file mode 100644
index 0000000..9f78f4a
--- /dev/null
+++ b/prometheus/elasticsearch_exporter/container.yml
@@ -0,0 +1,2 @@
+classes:
+- service.prometheus.elasticsearch_exporter.container
diff --git a/prometheus/server/target/dns/elasticsearch_exporter.yml b/prometheus/server/target/dns/elasticsearch_exporter.yml
new file mode 100644
index 0000000..3c331fd
--- /dev/null
+++ b/prometheus/server/target/dns/elasticsearch_exporter.yml
@@ -0,0 +1,12 @@
+parameters:
+  prometheus:
+    server:
+      target:
+        dns:
+          enabled: true
+          endpoint:
+            - name: 'elasticsearch_exporter'
+              domain:
+              - 'tasks.monitoring_elasticsearch_exporter'
+              type: A
+              port: 9206
diff --git a/prometheus/server/target/dns/init.yml b/prometheus/server/target/dns/init.yml
index 361d296..7363be1 100644
--- a/prometheus/server/target/dns/init.yml
+++ b/prometheus/server/target/dns/init.yml
@@ -1,5 +1,6 @@
 classes:
 - system.prometheus.server.target.dns.alertmanager
+- system.prometheus.server.target.dns.elasticsearch_exporter
 - system.prometheus.server.target.dns.prometheus
 - system.prometheus.server.target.dns.pushgateway
 - system.prometheus.server.target.dns.remote_agent