grafana/cortex-jsonnet

RUNTIME ERROR: field does not exist: _config

zhuyanxi opened this issue · 3 comments

When I want to generate the dashboards, I get an error:

RUNTIME ERROR: field does not exist: _config
dashboards.libsonnet:13:20-29 thunk <arr>
std.jsonnet:225:20-23 thunk <v>
std.jsonnet:32:25
std.jsonnet:32:16-27 thunk <a>
std.jsonnet:32:16-38 function <anonymous>
std.jsonnet:32:16-38 function <anonymous>
std.jsonnet:225:8-24 function <anonymous>
dashboards.libsonnet:13:9-55 object <anonymous>
During manifestation

Can you paste the command you run to try and generate the dashboards. Also the directory you are running the command from?

I get the same thing. My workflow is:

  1. Clone the git repository
  2. cd cortex-jsonnet
  3. Then follow the below
$ cd cortex-mixin
$ jb install
$ mkdir out
$ jsonnet -S alerts.jsonnet > out/alerts.yaml
$ jsonnet -J vendor -S dashboards.jsonnet -m out
$ jsonnet -J vendor -S recording_rules.jsonnet > out/rules.yaml

I've also tried the other steps in the README (initialising tank installing cortex & kube jsonnet libraries but there is no cortex-mixin directory in this.

Also found that those jsonnet files don't exist. Only libsonnet files

Hi @RyanW8! Sorry about this.

alerts.jsonnet, dashboards.jsonnet and recording_rules.jsonnet no longer exist in this repo, we've switched over to using mixtool. The correct instructions for builing the mixin are:

$ GO111MODULE=on go get github.com/monitoring-mixins/mixtool/cmd/mixtool
$ make build-mixin

I've update the READMEs now...