Giter VIP home page Giter VIP logo

Comments (5)

tomwilkie avatar tomwilkie commented on June 26, 2024

Hi Adam - what version of jsonnet are you using? Does make lint also fail?

We use jsonnet 0.10 in the CI and it works...

from kubernetes-mixin.

adamdecaf avatar adamdecaf commented on June 26, 2024

I'm on the same jsonnet version.

$ jsonnet -version
Jsonnet commandline interpreter v0.10.0
$ make lint
jsonnet -S lib/alerts.jsonnet > prometheus_alerts.yaml
find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \
		while read f; do \
			jsonnet fmt -n 2 --max-blank-lines 2 --string-style s --comment-style s "$f" | diff -u "$f" -; \
		done
promtool check rules prometheus_rules.yaml
Checking prometheus_rules.yaml
  SUCCESS: 29 rules found

promtool check rules prometheus_alerts.yaml
Checking prometheus_alerts.yaml
  SUCCESS: 15 rules found

The generated yaml has quotes around it, so maybe this was my fault.

- "expr": |
      sum(irate(node_network_receive_drop{job="default/node-exporter",device="eth0"}[1m])) +
      sum(irate(node_network_transmit_drop{job="default/node-exporter",device="eth0"}[1m]))
    "record": ":node_net_saturation:sum_irate"

from kubernetes-mixin.

tomwilkie avatar tomwilkie commented on June 26, 2024

Weird, would be good to get to the bottom of what happened. Perhaps the original set was generated with a different version of jsonnet? Feel free to close if you can't reproduce.

from kubernetes-mixin.

adamdecaf avatar adamdecaf commented on June 26, 2024

Oh. I know the issue.

These rules are vendored into coreos/prometheus-operator, which is what I'm using. To make some edits locally I rewrote that ConfigMap from the /rules html, which doesn't quote the recording rules.

screen shot 2018-05-11 at 8 43 25 am

Copying the above will throw this error.

from kubernetes-mixin.

adamdecaf avatar adamdecaf commented on June 26, 2024

I'm going to see what the prometheus folks say. prometheus/prometheus#4158

from kubernetes-mixin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.