Skip to content

Commit 4e2be5c

Browse files
committed
chore: update http.server root
1 parent 97610f9 commit 4e2be5c

File tree

1 file changed

+34
-13
lines changed

1 file changed

+34
-13
lines changed

.github/workflows/e2e-tests-linux-split.yml

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,6 @@ jobs:
249249
SLACK_TITLE: 'Test automation results :rocket:'
250250
SLACK_USERNAME: lace-qa-bot
251251
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
252-
PUSH_URL: ${{ secrets.GRAFANA_PUSH_URL }} # e.g., https://prometheus-us-central1.grafana.net/api/prom/push
253-
PUSH_USER: ${{ secrets.GRAFANA_USERNAME }} # e.g., 787878
254-
PUSH_PASS: ${{ secrets.GRAFANA_PASSWORD }} # e.g., eyJrIjoxxxxxxxxxxxxxxyMX0=
255252

256253
- name: Deleting chrome tmp files
257254
id: clean-chrome-tmp-files
@@ -273,31 +270,55 @@ jobs:
273270
path: ./artifacts/metrics
274271

275272
- name: Create Prometheus config
273+
env:
274+
PUSH_URL: ${{ secrets.GRAFANA_PUSH_URL }} # e.g., https://prometheus-us-central1.grafana.net/api/prom/push
275+
PUSH_USER: ${{ secrets.GRAFANA_USERNAME }} # e.g., 787878
276+
PUSH_PASS: ${{ secrets.GRAFANA_PASSWORD }} # e.g., eyJrIjoxxxxxxxxxxxxxxyMX0=
276277
run: |
277278
cat >prometheus.yml <<EOF
278279
global:
279-
scrape_interval: 15s
280+
scrape_interval: 5s
280281
scrape_configs:
281282
- job_name: 'e2e-perf-metrics'
282283
static_configs:
283-
- targets: ['http-server:8000']
284-
metrics_path: '/prometheus.txt'
284+
- targets: ['pushgateway:9091']
285285
remote_write:
286286
- url: "$PUSH_URL"
287287
basic_auth:
288288
username: "$PUSH_USER"
289289
password: "$PUSH_PASS"
290290
EOF
291-
cat ./artifacts/metrics/prometheus.txt
291+
pwd
292+
ls -al ./artifacts/metrics/prometheus.txt
292293
293-
- name: Start Python HTTP server
294+
- name: Start pushgateway server
294295
run: |
295-
docker run -d --name http-server -v $(pwd):/app -w /app -p 8000:8000 python:3.11-slim python -m http.server 8000 > http.log 2>&1
296+
docker run -d --name pushgateway -p 9091:9091 prom/pushgateway
297+
cat ./artifacts/metrics/prometheus.txt | curl --data-binary @- http://localhost:9091/metrics/job/e2e-perf
298+
#docker run -d --name http-server -v $(pwd):/app -w /app -p 8000:8000 python:3.11-slim python -m http.server 8000 > http.log 2>&1
299+
printf '\n*****************\n'
300+
echo 'This is my current directory:'
296301
pwd
302+
printf '\n*****************\n'
303+
echo 'This is ls -al in that directory'
304+
ls -al
305+
printf '\n*****************\n'
306+
297307
- name: Run Prometheus
298308
run: |
299-
docker run -d --name prometheus -v $(pwd):/etc/prometheus -p 9090:9090 --link http-server prom/prometheus:latest --config.file=/etc/prometheus/prometheus.yml --web.listen-address=:9090 > prom.log 2>&1
300-
sleep 60
301-
# Uncomment for troubleshooting.
302-
curl http://localhost:9090/api/v1/query?query=e2e_cpu_seconds_total
309+
# Enable logs for debugging
310+
#docker run --name prometheus -v $(pwd):/etc/prometheus -p 9090:9090 --link pushgateway:pushgateway prom/prometheus:latest --config.file=/etc/prometheus/prometheus.yml --web.listen-address=:9090 --log.level=debug
311+
docker run -d --name prometheus -v $(pwd):/etc/prometheus -p 9090:9090 --link pushgateway:pushgateway prom/prometheus:latest --config.file=/etc/prometheus/prometheus.yml --web.listen-address=:9090 > prom.log 2>&1
312+
sleep 20
313+
# # Uncomment for troubleshooting.
314+
#printf '\n*****************\n'
315+
#printf '\n curl e2e_cpu_seconds_total \n'
316+
#curl http://localhost:9090/api/v1/query?query=e2e_cpu_seconds_total
317+
#printf '\n*****************\n'
318+
#printf '\n send_failures_total \n'
319+
#curl 'http://localhost:9090/api/v1/query?query=prometheus_remote_storage_queue_send_failures_total'
320+
#printf '\n*****************\n'
321+
#printf '\n storage_retries_total \n'
322+
#curl 'http://localhost:9090/api/v1/query?query=prometheus_remote_storage_retries_total'
323+
303324

0 commit comments

Comments
 (0)