Giter Club home page Giter Club logo

Comments (5)

tuxmea avatar tuxmea commented on June 24, 2024

@knackjax can you provide an example how the alert rules must be for prometheus2? Can you also provide a PR?

from puppet-prometheus.

costela avatar costela commented on June 24, 2024

@tuxmea https://prometheus.io/blog/2017/06/21/prometheus-20-alpha3-new-rule-format/

I'm also taking a look at this, but if someone beats me to a PR, all the better! 😉

from puppet-prometheus.

costela avatar costela commented on June 24, 2024

Ideally, we'd support both formats, and maybe also take the chance and fix #69 while we're at it.

from puppet-prometheus.

knackjax avatar knackjax commented on June 24, 2024

I have a hack for this, which basically uses promtool to update to 2.0 syntax. We are just evaluating prometheus for our needs right now if we adopt it we will try to submit a cleaner solution

    exec { "promtool update ${alertfile_name}":
        user        => $user,
        group       => $group,
        command     => "${bin_dir}/promtool update rules ${config_dir}/${alertfile_name}",
        require     => [
            Package[$package_name],
            File["${config_dir}/${alertfile_name}"]
        ],
        unless      => "/usr/bin/test -f ${config_dir}/${alertfile_name}.yml",
        subscribe   => File["${config_dir}/${alertfile_name}"]
    }
    # ensure file was created
    file { "${config_dir}/${alertfile_name}.yml":
        ensure       => 'file',
        owner        => $user,
        group        => $group,
        validate_cmd => "${bin_dir}/promtool check rules ${config_dir}/${alertfile_name}.yml",
    }

from puppet-prometheus.

igalic avatar igalic commented on June 24, 2024

thanks @jhooyberghs for providing the fix!

from puppet-prometheus.

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.