Git Product home page Git Product logo

Comments (7)

gst avatar gst commented on July 17, 2024

writing a test case triggering the problem should be rather easy..

gonna give it a try..

from alignak.

gst avatar gst commented on July 17, 2024

Ok I could rather easily reproduce the problem in a test case.

from alignak.

gst avatar gst commented on July 17, 2024

@flaf,

I've a fix ready but I'm not sure it's enough about your described problem (it does fix the testcase I've though),

from where come your $(val1)$ and $(val2)$ in your config extract ?

from alignak.

gst avatar gst commented on July 17, 2024

from where come your $(val1)$ and $(val2)$ in your config extract ?

said nothing, this is all from here : http://shinken.readthedocs.org/en/latest/08_configobjects/service.html

"relevant" extract :

duplicate_foreach
This is used to generate serveral service with only one service declaration. 
Shinken understands this statement as : “Create a service for earch key in the variable”. 
Usually, this statement come with a “$KEY$” string in the service_description
 (to have a differente name) and in the check_command (you want also a 
different check) Moreover, one or several variables can be associated to each key. Then, 
values can be used in the service definition with $VALUE$ or $VALUEn$ macros.

define host {
  host_name    linux-server
  ...
  _partitions   var $(/var)$, root $(/)$
  _openvpns   vpn1 $(tun1)$$(10.8.0.1)$, vpn2 $(tun2)$$(192.168.3.254)$
  ...
}

define service{
       host_name               linux-server
       service_description     disk-$KEY$
       check_command           check_disk!$VALUE$
       ...
       duplicate_foreach       _partitions
}

I confirm I'm on a fix.. (it takes a bit longuer than my initial "easy" fix 'cause I'm going to rewrite most of the main functions involved in this "duplicate foreach" particular use case 'cause they're mostly bad (in their form and content).

from alignak.

Seb-Solon avatar Seb-Solon commented on July 17, 2024

If by any chance you still have no fix for that, you can have a look on Shinken side. It is supposed to be fixed. The fix is adding \s in regexp basically.

from alignak.

gst avatar gst commented on July 17, 2024

Seen that. But i'm doing more actually. Code smells, more problems than the one mentionned hère.

from alignak.

Seb-Solon avatar Seb-Solon commented on July 17, 2024

👍

from alignak.

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.