@@ -276,28 +276,41 @@ jobs:
276276 run : |
277277 cat >prometheus.yml <<EOF
278278 global:
279- scrape_interval: 15s
279+ scrape_interval: 5s
280280 scrape_configs:
281281 - job_name: 'e2e-perf-metrics'
282282 static_configs:
283- - targets: ['http-server:8000']
284- metrics_path: '/prometheus.txt'
283+ - targets: ['pushgateway:9091']
285284 remote_write:
286285 - url: "$PUSH_URL"
287286 basic_auth:
288287 username: "$PUSH_USER"
289288 password: "$PUSH_PASS"
290289 EOF
291- cat ./artifacts/metrics/prometheus.txt
290+ pwd
291+ ls -al ./artifacts/metrics/prometheus.txt
292292
293- - name : Start Python HTTP server
293+ - name : Start pushgateway server
294294 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
295+ docker run -d --name pushgateway -p 9091:9091 prom/pushgateway
296+ cat ./artifacts/metrics/prometheus.txt | curl --data-binary @- http://localhost:9091/metrics/job/e2e-perf
297+ #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
298+ printf '\n*****************\n'
299+ echo 'This is my current directory:'
296300 pwd
301+ printf '\n*****************\n'
302+ echo 'This is ls -al in that directory'
303+ ls -al
304+ printf '\n*****************\n'
297305 - name : Run Prometheus
298306 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.
307+ 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
308+ sleep 200
309+ # # Uncomment for troubleshooting.
310+ printf '\n*****************\n'
311+ printf '\n curl e2e_cpu_seconds_total \n'
302312 curl http://localhost:9090/api/v1/query?query=e2e_cpu_seconds_total
313+ printf '\n*****************\n'
314+ printf 'cat prom.log'
315+ cat prom.log
303316
0 commit comments