diff --git a/orchestrator/setup-filebeat.sh b/orchestrator/setup-filebeat.sh index 79d379d..4fc557f 100755 --- a/orchestrator/setup-filebeat.sh +++ b/orchestrator/setup-filebeat.sh @@ -56,7 +56,7 @@ UpdateFilebeatConfig() { if grep -q "username: \"$user\"" "$temp_file" && \ grep -q "password: \"$password\"" "$temp_file" && \ - grep -q "hosts: [\"$host\"]" "$temp_file"; then + grep -q "hosts: \[\"$host\"\]" "$temp_file"; then mv "$temp_file" "$config_file" LogInformation "Updated Elasticsearch settings: user=$user" else diff --git a/orchestrator/setup-logstash.sh b/orchestrator/setup-logstash.sh index d2b59a2..aec90b4 100755 --- a/orchestrator/setup-logstash.sh +++ b/orchestrator/setup-logstash.sh @@ -56,7 +56,7 @@ UpdateOutputConfig() { if grep -q "user => \"$user\"" "$temp_file" && \ grep -q "password => \"$password\"" "$temp_file" && \ - grep -q "hosts => [\"$host\"]" "$temp_file"; then + grep -q "hosts => \[\"$host\"\]" "$temp_file"; then mv "$temp_file" "$output_file" LogInformation "Updated Elasticsearch settings: user=$user" else diff --git a/orchestrator/setup-metricbeat.sh b/orchestrator/setup-metricbeat.sh index e19cc68..3caf1cc 100755 --- a/orchestrator/setup-metricbeat.sh +++ b/orchestrator/setup-metricbeat.sh @@ -56,7 +56,7 @@ UpdateMetricbeatConfig() { if grep -q "username: \"$user\"" "$temp_file" && \ grep -q "password: \"$password\"" "$temp_file" && \ - grep -q "hosts: [\"$host\"]" "$temp_file"; then + grep -q "hosts: \[\"$host\"\]" "$temp_file"; then mv "$temp_file" "$config_file" LogInformation "Updated Elasticsearch settings: user=$user" else