From 96a1ce196e08e2bf7d82e3e6d24b66197c4736d5 Mon Sep 17 00:00:00 2001
From: Mark Goddard <mark@stackhpc.com>
Date: Mon, 15 Jun 2020 12:19:27 +0100
Subject: [PATCH] Fix prometheus-elasticsearch-exporter flags

The flag -es.uri is no longer accepted - it should be --es.uri.
Similarly with -web.listen-address. The following error is seen:

    elasticsearch_exporter: error: unknown short flag '-e', try --help

This change switches to double dashed long options.

Change-Id: I039f4cad970352146462450742056f5990a81b06
Closes-Bug: #1880242
---
 .../templates/prometheus-elasticsearch-exporter.json.j2         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ansible/roles/prometheus/templates/prometheus-elasticsearch-exporter.json.j2 b/ansible/roles/prometheus/templates/prometheus-elasticsearch-exporter.json.j2
index 06573a2034..2ec2fe7d3c 100644
--- a/ansible/roles/prometheus/templates/prometheus-elasticsearch-exporter.json.j2
+++ b/ansible/roles/prometheus/templates/prometheus-elasticsearch-exporter.json.j2
@@ -1,5 +1,5 @@
 {
-    "command": "/opt/elasticsearch_exporter/elasticsearch_exporter -es.uri http://{{ api_interface_address | put_address_in_context('url') }}:{{ elasticsearch_port }} -web.listen-address {{ api_interface_address | put_address_in_context('url') }}:{{ prometheus_elasticsearch_exporter_port }}",
+    "command": "/opt/elasticsearch_exporter/elasticsearch_exporter --es.uri http://{{ api_interface_address | put_address_in_context('url') }}:{{ elasticsearch_port }} --web.listen-address {{ api_interface_address | put_address_in_context('url') }}:{{ prometheus_elasticsearch_exporter_port }}",
     "config_files": [],
     "permissions": [
         {
-- 
GitLab