$ # make sure to be outside of GOPATH or a go.mod project
$ GO111MODULE=on go get github.com/grafana/tanka/cmd/tk
$ GO111MODULE=on go get github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb
Initialise the Tanka, and install the Cortex and Kubernetes Jsonnet libraries.
To generate the Grafana dashboards and Prometheus alerts for Cortex:
$ GO111MODULE=on go get github.com/monitoring-mixins/mixtool/cmd/mixtool
$ GO111MODULE=on go get github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb
$ git clone https://github.com/grafana/cortex-jsonnet
$ cd cortex-jsonnet
$ make build-mixin
This will leave all the alerts and dashboards in cortex-mixin/cortex-mixin.zip (or cortex-mixin/out).
If you get an error like cannot use cli.StringSliceFlag literal (type cli.StringSliceFlag) as type cli.Flag in slice literal when installing mixtool, make sure you set GO111MODULE=on before go get.
请发表评论