Skip to content

Commit

Permalink
Fix beat_index_prefix to work for ES templates.
Browse files Browse the repository at this point in the history
  • Loading branch information
simitt committed Sep 11, 2017
1 parent 3fe347f commit c4cdc25
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions libbeat/scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ BEAT_NAME?=libbeat ## @packaging Name of the application
BEAT_DESCRIPTION?=Sends events to Elasticsearch or Logstash ## @packaging Description of the application
BEAT_PATH?=github.com/elastic/beats/${BEAT_NAME}
BEAT_PACKAGE_NAME?=${BEAT_NAME}
BEAT_INDEX_PREFIX?=$(BEAT_NAME)
BEAT_INDEX_PREFIX?=${BEAT_NAME}
BEAT_URL?=https://www.elastic.co/products/beats/${BEAT_NAME} ## @packaging Link to the homepage of the application
BEAT_DOC_URL?=https://www.elastic.co/guide/en/beats/${BEAT_NAME}/current/index.html ## @packaging Link to the user documentation of the application
BEAT_LICENSE?=ASL 2.0 ## @packaging Software license of the application
Expand Down Expand Up @@ -265,12 +265,12 @@ update: python-env collect
@echo "Updating generated files for ${BEAT_NAME}"

@# Update config files.
@cat _meta/beat.yml ${ES_BEATS}/libbeat/_meta/config.yml | sed -e "s/beatname/${BEAT_NAME}/g;s/index-prefix/${BEAT_INDEX_PREFIX}/g" > ${BEAT_NAME}.yml
@cat _meta/beat.yml ${ES_BEATS}/libbeat/_meta/config.yml | sed -e "s/beatname/${BEAT_NAME}/g;s/index-prefix/${BEAT_INDEX_PREFIX}/g" > ${BEAT_NAME}.yml
@if [ -e _meta/beat.reference.yml ]; then \
cat _meta/beat.reference.yml ${ES_BEATS}/libbeat/_meta/config.reference.yml | sed -e "s/beatname/${BEAT_NAME}/g;s/index-prefix/${BEAT_INDEX_PREFIX}/g" > ${BEAT_NAME}.reference.yml ; \
else \
cat _meta/beat.yml ${ES_BEATS}/libbeat/_meta/config.reference.yml | sed -e "s/beatname/${BEAT_NAME}/g;s/index-prefix/${BEAT_INDEX_PREFIX}/g" > ${BEAT_NAME}.reference.yml ; \
fi; fi;
cat _meta/beat.reference.yml ${ES_BEATS}/libbeat/_meta/config.reference.yml | sed -e "s/beatname/${BEAT_NAME}/g;s/index-prefix/${BEAT_INDEX_PREFIX}/g" > ${BEAT_NAME}.reference.yml ; \
else \
cat _meta/beat.yml ${ES_BEATS}/libbeat/_meta/config.reference.yml | sed -e "s/beatname/${BEAT_NAME}/g;s/index-prefix/${BEAT_INDEX_PREFIX}/g" > ${BEAT_NAME}.reference.yml ; \
fi;
@chmod 0640 ${BEAT_NAME}.yml ${BEAT_NAME}.reference.yml

@# Update libbeat fields.generated.yml
Expand Down

0 comments on commit c4cdc25

Please sign in to comment.