2020-04-27 21:19:27 +00:00
|
|
|
# All these commands must run from repository root.
|
|
|
|
|
2021-09-07 19:43:37 +00:00
|
|
|
vmalert:
|
2020-04-27 21:19:27 +00:00
|
|
|
APP_NAME=vmalert $(MAKE) app-local
|
|
|
|
|
|
|
|
vmalert-race:
|
|
|
|
APP_NAME=vmalert RACE=-race $(MAKE) app-local
|
|
|
|
|
|
|
|
vmalert-prod:
|
|
|
|
APP_NAME=vmalert $(MAKE) app-via-docker
|
|
|
|
|
|
|
|
vmalert-pure-prod:
|
|
|
|
APP_NAME=vmalert $(MAKE) app-via-docker-pure
|
|
|
|
|
2022-07-13 12:42:48 +00:00
|
|
|
vmalert-linux-amd64-prod:
|
|
|
|
APP_NAME=vmalert $(MAKE) app-via-docker-linux-amd64
|
2020-04-27 21:19:27 +00:00
|
|
|
|
2022-07-13 13:44:39 +00:00
|
|
|
vmalert-linux-arm-prod:
|
|
|
|
APP_NAME=vmalert $(MAKE) app-via-docker-linux-arm
|
|
|
|
|
2022-07-13 12:42:48 +00:00
|
|
|
vmalert-linux-arm64-prod:
|
|
|
|
APP_NAME=vmalert $(MAKE) app-via-docker-linux-arm64
|
2020-04-27 21:19:27 +00:00
|
|
|
|
2022-07-13 13:44:39 +00:00
|
|
|
vmalert-linux-ppc64le-prod:
|
|
|
|
APP_NAME=vmalert $(MAKE) app-via-docker-linux-ppc64le
|
|
|
|
|
|
|
|
vmalert-linux-386-prod:
|
|
|
|
APP_NAME=vmalert $(MAKE) app-via-docker-linux-386
|
2020-04-27 21:19:27 +00:00
|
|
|
|
2022-02-14 15:28:56 +00:00
|
|
|
vmalert-darwin-amd64-prod:
|
|
|
|
APP_NAME=vmalert $(MAKE) app-via-docker-darwin-amd64
|
|
|
|
|
|
|
|
vmalert-darwin-arm64-prod:
|
|
|
|
APP_NAME=vmalert $(MAKE) app-via-docker-darwin-arm64
|
|
|
|
|
2022-07-13 13:44:39 +00:00
|
|
|
vmalert-freebsd-amd64-prod:
|
|
|
|
APP_NAME=vmalert $(MAKE) app-via-docker-freebsd-amd64
|
2022-02-14 15:28:56 +00:00
|
|
|
|
2022-07-13 13:44:39 +00:00
|
|
|
vmalert-openbsd-amd64-prod:
|
|
|
|
APP_NAME=vmalert $(MAKE) app-via-docker-openbsd-amd64
|
2022-07-13 12:42:48 +00:00
|
|
|
|
2022-07-13 13:44:39 +00:00
|
|
|
vmalert-windows-amd64-prod:
|
|
|
|
APP_NAME=vmalert $(MAKE) app-via-docker-windows-amd64
|
2022-07-13 12:42:48 +00:00
|
|
|
|
2020-04-27 21:19:27 +00:00
|
|
|
package-vmalert:
|
|
|
|
APP_NAME=vmalert $(MAKE) package-via-docker
|
|
|
|
|
|
|
|
package-vmalert-pure:
|
|
|
|
APP_NAME=vmalert $(MAKE) package-via-docker-pure
|
|
|
|
|
|
|
|
package-vmalert-amd64:
|
|
|
|
APP_NAME=vmalert $(MAKE) package-via-docker-amd64
|
|
|
|
|
|
|
|
package-vmalert-arm:
|
|
|
|
APP_NAME=vmalert $(MAKE) package-via-docker-arm
|
|
|
|
|
|
|
|
package-vmalert-arm64:
|
|
|
|
APP_NAME=vmalert $(MAKE) package-via-docker-arm64
|
|
|
|
|
|
|
|
package-vmalert-ppc64le:
|
|
|
|
APP_NAME=vmalert $(MAKE) package-via-docker-ppc64le
|
|
|
|
|
|
|
|
package-vmalert-386:
|
|
|
|
APP_NAME=vmalert $(MAKE) package-via-docker-386
|
|
|
|
|
|
|
|
publish-vmalert:
|
|
|
|
APP_NAME=vmalert $(MAKE) publish-via-docker
|
|
|
|
|
|
|
|
test-vmalert:
|
2020-05-17 14:12:09 +00:00
|
|
|
go test -v -race -cover ./app/vmalert -loggerLevel=ERROR
|
2022-05-14 09:38:44 +00:00
|
|
|
go test -v -race -cover ./app/vmalert/templates
|
2020-05-17 14:12:09 +00:00
|
|
|
go test -v -race -cover ./app/vmalert/datasource
|
|
|
|
go test -v -race -cover ./app/vmalert/notifier
|
2020-06-01 10:46:37 +00:00
|
|
|
go test -v -race -cover ./app/vmalert/config
|
2021-08-31 09:28:02 +00:00
|
|
|
go test -v -race -cover ./app/vmalert/remotewrite
|
2023-06-01 09:38:48 +00:00
|
|
|
go test -v -race -cover ./app/vmalert/utils
|
2020-04-27 21:19:27 +00:00
|
|
|
|
|
|
|
run-vmalert: vmalert
|
2022-05-18 07:50:46 +00:00
|
|
|
./bin/vmalert -rule=app/vmalert/config/testdata/rules/rules2-good.rules \
|
2023-07-18 13:53:37 +00:00
|
|
|
-datasource.url=http://demo.robustperception.io:9090 \
|
|
|
|
-notifier.blackhole \
|
2020-05-13 18:32:21 +00:00
|
|
|
-remoteWrite.url=http://localhost:8428 \
|
|
|
|
-remoteRead.url=http://localhost:8428 \
|
2020-07-28 11:20:31 +00:00
|
|
|
-external.label=cluster=east-1 \
|
|
|
|
-external.label=replica=a \
|
2021-05-25 13:27:22 +00:00
|
|
|
-evaluationInterval=3s \
|
2022-05-18 07:50:46 +00:00
|
|
|
-configCheckInterval=10s
|
2020-04-27 21:19:27 +00:00
|
|
|
|
2022-02-02 12:11:41 +00:00
|
|
|
run-vmalert-sd: vmalert
|
|
|
|
./bin/vmalert -rule=app/vmalert/config/testdata/rules2-good.rules \
|
|
|
|
-datasource.url=http://localhost:8428 \
|
|
|
|
-remoteWrite.url=http://localhost:8428 \
|
2022-04-13 08:50:26 +00:00
|
|
|
-notifier.config=app/vmalert/notifier/testdata/mixed.good.yaml \
|
2022-02-02 12:11:41 +00:00
|
|
|
-configCheckInterval=10s
|
|
|
|
|
2021-06-09 09:20:38 +00:00
|
|
|
replay-vmalert: vmalert
|
2022-06-09 06:58:25 +00:00
|
|
|
./bin/vmalert -rule=app/vmalert/config/testdata/rules/rules-replay-good.rules \
|
2021-06-09 09:20:38 +00:00
|
|
|
-datasource.url=http://localhost:8428 \
|
|
|
|
-remoteWrite.url=http://localhost:8428 \
|
|
|
|
-external.label=cluster=east-1 \
|
|
|
|
-external.label=replica=a \
|
|
|
|
-replay.timeFrom=2021-05-11T07:21:43Z \
|
|
|
|
-replay.timeTo=2021-05-29T18:40:43Z
|
|
|
|
|
2022-07-13 13:44:39 +00:00
|
|
|
vmalert-linux-amd64:
|
|
|
|
APP_NAME=vmalert CGO_ENABLED=1 GOOS=linux GOARCH=amd64 $(MAKE) app-local-goos-goarch
|
2020-04-27 21:19:27 +00:00
|
|
|
|
2022-07-13 13:44:39 +00:00
|
|
|
vmalert-linux-arm:
|
|
|
|
APP_NAME=vmalert CGO_ENABLED=0 GOOS=linux GOARCH=arm $(MAKE) app-local-goos-goarch
|
2020-04-27 21:19:27 +00:00
|
|
|
|
2022-07-13 13:44:39 +00:00
|
|
|
vmalert-linux-arm64:
|
|
|
|
APP_NAME=vmalert CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(MAKE) app-local-goos-goarch
|
2020-04-27 21:19:27 +00:00
|
|
|
|
2022-07-13 13:44:39 +00:00
|
|
|
vmalert-linux-ppc64le:
|
|
|
|
APP_NAME=vmalert CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le $(MAKE) app-local-goos-goarch
|
2020-04-27 21:19:27 +00:00
|
|
|
|
2023-02-26 20:36:44 +00:00
|
|
|
vmalert-linux-s390x:
|
|
|
|
APP_NAME=vmalert CGO_ENABLED=0 GOOS=linux GOARCH=s390x $(MAKE) app-local-goos-goarch
|
|
|
|
|
2022-07-13 13:44:39 +00:00
|
|
|
vmalert-linux-386:
|
|
|
|
APP_NAME=vmalert CGO_ENABLED=0 GOOS=linux GOARCH=386 $(MAKE) app-local-goos-goarch
|
2020-07-31 10:42:09 +00:00
|
|
|
|
2022-07-13 13:44:39 +00:00
|
|
|
vmalert-darwin-amd64:
|
|
|
|
APP_NAME=vmalert CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(MAKE) app-local-goos-goarch
|
2020-04-27 21:19:27 +00:00
|
|
|
|
2022-07-13 13:44:39 +00:00
|
|
|
vmalert-darwin-arm64:
|
|
|
|
APP_NAME=vmalert CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 $(MAKE) app-local-goos-goarch
|
|
|
|
|
|
|
|
vmalert-freebsd-amd64:
|
|
|
|
APP_NAME=vmalert CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 $(MAKE) app-local-goos-goarch
|
|
|
|
|
|
|
|
vmalert-openbsd-amd64:
|
|
|
|
APP_NAME=vmalert CGO_ENABLED=0 GOOS=openbsd GOARCH=amd64 $(MAKE) app-local-goos-goarch
|
2021-03-16 18:49:07 +00:00
|
|
|
|
|
|
|
vmalert-windows-amd64:
|
2022-07-13 13:44:39 +00:00
|
|
|
GOARCH=amd64 APP_NAME=vmalert $(MAKE) app-local-windows-goarch
|
|
|
|
|
|
|
|
vmalert-pure:
|
|
|
|
APP_NAME=vmalert $(MAKE) app-local-pure
|