Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit e346824

Browse files
authored
Merge pull request #235 from grafana/27-mixtool-readme
Update mixin build instructions in README (fixes #223)
2 parents 6a9b00d + 995e360 commit e346824

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

README.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Jsonnet for Cortex
1+
# Jsonnet for Cortex on Kubernetes
22

3-
This repo has the jsonnet for deploying cortex and the related monitoring in Kubernetes.
3+
This repo has the jsonnet for deploying Cortex and the related monitoring in Kubernetes.
44

55
To generate the YAMLs for deploying Cortex:
66

@@ -27,6 +27,7 @@ To generate the YAMLs for deploying Cortex:
2727
EOF
2828
$ jb install github.com/grafana/cortex-jsonnet/cortex
2929
```
30+
3031
1. Use the example monitoring.jsonnet.example:
3132

3233
```console
@@ -52,13 +53,18 @@ To generate the YAMLs for deploying Cortex:
5253
$ tk export environments/default manifests
5354
```
5455

55-
To generate the dashboards and alerts for Cortex:
56+
# Monitoring for Cortex
5657

57-
```console
58-
$ cd cortex-mixin
59-
$ jb install
60-
$ mkdir out
61-
$ jsonnet -S alerts.jsonnet > out/alerts.yaml
62-
$ jsonnet -J vendor -S dashboards.jsonnet -m out
63-
$ jsonnet -J vendor -S recording_rules.jsonnet > out/rules.yaml
64-
```
58+
To generate the Grafana dashboards and Prometheus alerts for Cortex:
59+
60+
```console
61+
$ GO111MODULE=on go get github.com/monitoring-mixins/mixtool/cmd/mixtool
62+
$ GO111MODULE=on go get github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb
63+
$ git clone https://github.com/grafana/cortex-jsonnet
64+
$ cd cortex-jsonnet
65+
$ make build-mixin
66+
```
67+
68+
This will leave all the alerts and dashboards in cortex-mixin/cortex-mixin.zip (or cortex-mixin/out).
69+
70+
If you get an error like `cannot use cli.StringSliceFlag literal (type cli.StringSliceFlag) as type cli.Flag in slice literal` when installing [mixtool](https://github.com/monitoring-mixins/mixtool/issues/27), make sure you set `GO111MODULE=on` before `go get`.

0 commit comments

Comments
 (0)