#!/bin/bash -e

cp journalctl.yml.tmpl journalctl.yml
cat << EOF >> journalctl.yml
output:
  logstash:
    hosts: ["${LOGSTASH_HOST}"]
EOF

./journalbeat -e -v

#!/bin/bash -e

if [ -z "$LOGSTASH_HOST" ]; then
	echo "LOGSTASH_HOST is unset"
	exit 2	
fi

cp journalbeat.yml.tmpl journalbeat.yml
cat << EOF >> journalbeat.yml
output:
  logstash:
    hosts: ["${LOGSTASH_HOST}"]
EOF

./journalbeat -e -v

Check for LOGSTASH_HOST; use correct filename
Check for LOGSTASH_HOST; use correct filename
