-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prometheus Exporter in attack (#534)
Closes #477, #534 Signed-off-by: Flávio Stutz <[email protected]> Signed-off-by: Tomás Senart <[email protected]>
- Loading branch information
1 parent
73d929f
commit 81403a6
Showing
11 changed files
with
1,185 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM golang:1.20-alpine3.18 AS BUILD | ||
|
||
RUN apk add make build-base git | ||
|
||
WORKDIR /vegeta | ||
|
||
# cache dependencies | ||
ADD go.mod /vegeta | ||
ADD go.sum /vegeta | ||
RUN go mod download | ||
|
||
ADD . /vegeta | ||
|
||
RUN make generate | ||
RUN make vegeta | ||
|
||
FROM alpine:3.18.0 | ||
|
||
COPY --from=BUILD /vegeta/vegeta /bin/vegeta | ||
|
||
ENTRYPOINT ["vegeta"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
version: '3.5' | ||
|
||
services: | ||
|
||
vegeta: | ||
build: . | ||
image: tsenart/vegeta | ||
ports: | ||
- 8880:8880 | ||
command: sh -c 'echo "GET https://www.yahoo.com" | vegeta attack -duration=300s -rate=5 -prometheus-addr=0.0.0.0:8880 | vegeta report --type=text' | ||
|
||
prometheus: | ||
image: flaviostutz/prometheus | ||
ports: | ||
- 9090:9090 | ||
environment: | ||
- SCRAPE_INTERVAL=10s | ||
- SCRAPE_TIMEOUT=10s | ||
- STATIC_SCRAPE_TARGETS=vegeta@vegeta:8880 | ||
|
||
grafana: | ||
image: flaviostutz/grafana:5.2.4 | ||
ports: | ||
- 3000:3000 | ||
environment: | ||
- GF_SECURITY_ADMIN_PASSWORD=mypass | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.