Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix remote_write flaky test #21173

Merged
merged 2 commits into from
Sep 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Disable Kafka metricsets based on Jolokia by default. They require a different configuration. {pull}20989[20989]
- Fix panic index out of range error when getting AWS account name. {pull}21101[21101] {issue}21095[21095]
- Handle missing counters in the application_pool metricset. {pull}21071[21071]
- Fix remote_write flaky test. {pull}21173[21173]

*Packetbeat*

Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/prometheus/_meta/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ rule_files:
# - "second_rules.yml"

remote_write:
- url: "http://REMOTE/write"
- url: "http://0.0.0.0:9201/write"

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
Expand Down
20 changes: 0 additions & 20 deletions metricbeat/module/prometheus/_meta/run.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
#!/bin/sh


for i in 1 2 3 4 5;
do
a=`nslookup host.docker.internal | grep "** server can't find " | wc -l`;
if [ $a -gt 0 ]; then
# this works only on Linux envs
HOST_DOMAIN="0.0.0.0"
else
# this works only on Mac envs
HOST_DOMAIN="host.docker.internal"
break
fi
done



REMOTE="$HOST_DOMAIN:9201"

sed -i "s/REMOTE/$REMOTE/g" /etc/prometheus/prometheus.yml

/bin/prometheus --config.file=/etc/prometheus/prometheus.yml \
--storage.tsdb.path=/prometheus \
--web.console.libraries=/usr/share/prometheus/console_libraries \
Expand Down
1 change: 0 additions & 1 deletion metricbeat/module/prometheus/test_prometheus.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ def test_query(self):
self.assert_fields_are_documented(evt)


@unittest.skip("Flaky test: https://github.com/elastic/beats/issues/20967")
class TestRemoteWrite(metricbeat.BaseTest):

COMPOSE_SERVICES = ['prometheus-host-network']
Expand Down