Skip to content

Commit

Permalink
generate apm-server.docker.yml (#1956)
Browse files Browse the repository at this point in the history
  • Loading branch information
graphaelli authored Feb 26, 2019
1 parent 61f3324 commit 4e70225
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 25 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,12 @@ endif
is-beats-updated: python-env
@$(PYTHON_ENV)/bin/python ./script/is_beats_updated.py ${BEATS_VERSION}

apm-server.docker.yml: apm-server.yml
@sed -E -e 's/^ hosts: \["localhost:9200"\]/ hosts: ["elasticsearch:9200"]/' -e 's/ host: "localhost:8200"/ host: "0.0.0.0:8200"/' < apm-server.yml > apm-server.docker.yml

# Collects all dependencies and then calls update
.PHONY: collect
collect: fields go-generate add-headers create-docs notice
collect: fields go-generate add-headers create-docs notice apm-server.docker.yml

.PHONY: go-generate
go-generate:
Expand Down
52 changes: 28 additions & 24 deletions apm-server.docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ apm-server:

#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
# Array of hosts to connect to.
# Scheme and port can be left out and will be set to the default (http and 9200)
# In case you specify and additional path, the scheme is required: http://localhost:9200/path
# IPv6 addresses should always be defined as: https://[2001:db8::1]:9200
hosts: ["elasticsearch:9200"]

# Boolean flag to enable or disable the output module.
Expand Down Expand Up @@ -270,30 +274,30 @@ output.elasticsearch:
# * `setup.template.name`
# * `setup.template.pattern`
#index: "apm-%{[observer.version]}-%{+yyyy.MM.dd}"
indices:
- index: "apm-%{[observer.version]}-sourcemap"
when.contains:
processor.event: "sourcemap"

- index: "apm-%{[observer.version]}-error-%{+yyyy.MM.dd}"
when.contains:
processor.event: "error"

- index: "apm-%{[observer.version]}-transaction-%{+yyyy.MM.dd}"
when.contains:
processor.event: "transaction"

- index: "apm-%{[observer.version]}-span-%{+yyyy.MM.dd}"
when.contains:
processor.event: "span"

- index: "apm-%{[observer.version]}-metric-%{+yyyy.MM.dd}"
when.contains:
processor.event: "metric"

- index: "apm-%{[observer.version]}-onboarding-%{+yyyy.MM.dd}"
when.contains:
processor.event: "onboarding"
#indices:
# - index: "apm-%{[observer.version]}-sourcemap"
# when.contains:
# processor.event: "sourcemap"
#
# - index: "apm-%{[observer.version]}-error-%{+yyyy.MM.dd}"
# when.contains:
# processor.event: "error"
#
# - index: "apm-%{[observer.version]}-transaction-%{+yyyy.MM.dd}"
# when.contains:
# processor.event: "transaction"
#
# - index: "apm-%{[observer.version]}-span-%{+yyyy.MM.dd}"
# when.contains:
# processor.event: "span"
#
# - index: "apm-%{[observer.version]}-metric-%{+yyyy.MM.dd}"
# when.contains:
# processor.event: "metric"
#
# - index: "apm-%{[observer.version]}-onboarding-%{+yyyy.MM.dd}"
# when.contains:
# processor.event: "onboarding"

# A pipeline is a definition of processors applied to documents when writing them to Elasticsearch.
# APM Server comes with a default pipeline definition, located at `ingets/pipeline/definition.json`.
Expand Down

0 comments on commit 4e70225

Please sign in to comment.