Giter Club home page Giter Club logo

Comments (15)

bastelfreak avatar bastelfreak commented on September 26, 2024

Hi @kamusin, thanks for bringing this up and the detailed explanation. Are you able to provide a patch for this?

from puppet-prometheus.

kamusin avatar kamusin commented on September 26, 2024

I'm working on a fix @bastelfreak, sorry for the delayed answer by the way.

from puppet-prometheus.

kamusin avatar kamusin commented on September 26, 2024

For now we are dealing this issue with this branch (https://github.com/kamusin/puppet-prometheus/tree/update-rule-files) since we do have hundreds of rules that need to be migrated (plus testing on the exporters)

the resulting prometheus.yaml configuration now looks like this:

--- /tmp/prometheus.yaml.original	2018-04-13 01:27:06.169501585 -0400
+++ /etc/prometheus/prometheus.yaml	2018-04-13 01:51:52.645730402 -0400
@@ -7,8 +7,9 @@
   scrape_interval: 30s
   scrape_timeout: 15s
 rule_files:
-- "/opt/prometheus/rules/something/*.rules"
-- "/opt/prometheus/rules/common/*.rules"
+- "/etc/prometheus/rules/*.rules"
+- "/etc/prometheus/rules/something/*.rules"
+- "/etc/prometheus/rules/common/*.rules"

from puppet-prometheus.

tuxmea avatar tuxmea commented on September 26, 2024

@kamusin can you rebase? Code is now in server.pp.

from puppet-prometheus.

kamusin avatar kamusin commented on September 26, 2024

thanks I will try to test this on our dev environment first

from puppet-prometheus.

bramblek1 avatar bramblek1 commented on September 26, 2024

Any updates @kamusin ? - I believe I have this working - but getting the tests to pass is difficult. @tuxmea the empty array for rule_files in spec/fixtures/files/prometheus*.yaml should be replaced with what is specified in data/defaults.yaml ?

from puppet-prometheus.

kamusin avatar kamusin commented on September 26, 2024

@bramblek1 sorry for not leaving any updates in a while I just pushed a branch to test version 6.0.6 (we are still on 4.1.1) in our dev environment (this time for real).

from puppet-prometheus.

bramblek1 avatar bramblek1 commented on September 26, 2024

@kamusin - please take a look at https://github.com/bramblek1/puppet-prometheus/tree/180_rule_files_param

We made similar changes - I think possibly yours does not support the definition of $extra_alerts.

from puppet-prometheus.

kamusin avatar kamusin commented on September 26, 2024

okay this might require some extra work from my side since the params.pp file it's gone and has broken a few spec tests, and it's also causing some dependency cycles too.

[modules]       # --- Caused by: ---
[modules]       # Puppet::Error:
[modules]       #   Could not find class ::prometheus::params for i-1212121212.us-west-2.compute.internal
[modules]       #   /usr/local/bundle/gems/puppet-5.5.2/lib/puppet/parser/compiler.rb:373:in `block in evaluate_classes'

from puppet-prometheus.

bramblek1 avatar bramblek1 commented on September 26, 2024

Isn't params gone now ? All the module hiera stuff has gotten rid of it. Have you rebased ? or are you trying to fix the older version?

from puppet-prometheus.

bastelfreak avatar bastelfreak commented on September 26, 2024

@bramblek1 correct. We migrated all logic from the params.pp file to hiera.

from puppet-prometheus.

kamusin avatar kamusin commented on September 26, 2024

@bramblek1 am running your Branch agains't our CI (sorry I assumed that your branch got merged into master which is not the case).

from puppet-prometheus.

kamusin avatar kamusin commented on September 26, 2024

this is going to take a while (we have a lot of references from prometheus::params in our code.

Finished in 22.75 seconds (files took 3.73 seconds to load)
24 examples, 21 failures

from puppet-prometheus.

bramblek1 avatar bramblek1 commented on September 26, 2024

@kamusin - I think it would make more sense to test this change in isolation using the CI for this repo, rather than by proxy. If your code is referencing prometheus::params - your issue is that v 6.x is already incompatible. Should I just send this as a PR instead or do you want to rebase yours?

from puppet-prometheus.

kamusin avatar kamusin commented on September 26, 2024

feel free to send a PR @bramblek1 , yeah I have tons of references in our repository to prometheus::params, unfortunately.

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.