Hello all, as I understand the exporting and collecting of ressources it is not possible to import resources via wildcards. The situation I have is the following: One Host which is the munin-monitoring host and one which is the nagios host. All computers in our network export resources of the type File for both the nagios and the munin host. I collect those ressources via "File <<| |>>" on the hosts, which means that both, nagios and munin ressources are imported on both munin and nagios host. I would like to have something like: "File <<| name == "nagios_%" |>>" on the nagios host and "File <<| name == "munin_%" |>> on the munin host. This is not possible, right? To achieve something like this, would it be enough to create different ressources for those two types? Something like: define muninfile(){ file{ ... same paramaters that previously were there... } } And then export those via @@muninfile and import the via Muninfile <<| |>>? Same for nagios? That should work right? Anyway, I guess the preferred solution would be to have substring search for "File <<| name == "somesubstring" |>>" Thanks for the help, udo. -- :: udo waechter - root@zoide.net :: N 52º16''30.5" E 8º3''10.1" :: genuine input for your ears: http://www.auriculabovinari.de :: your eyes: http://ezag.zoide.net :: your brain: http://www.zoide.net
On Jan 24, 2008 5:49 PM, udo waechter <udo.waechter@uni-osnabrueck.de> wrote:> Hello all, > as I understand the exporting and collecting of ressources it is not > possible to import resources via wildcards. > > The situation I have is the following: > One Host which is the munin-monitoring host and one which is the > nagios host. > > All computers in our network export resources of the type File for > both the nagios and the munin host. > I collect those ressources via "File <<| |>>" on the hosts, which > means that both, nagios and munin ressources are imported on both > munin and nagios host. > > I would like to have something like: "File <<| name == "nagios_%" |>>" > on the nagios host and "File <<| name == "munin_%" |>> on the munin > host. > This is not possible, right? > To achieve something like this, would it be enough to create different > ressources for those two types? Something like: > > define muninfile(){ > file{ > ... same paramaters that previously were there... > } > } > And then export those via @@muninfile and import the via Muninfile <<| > |>>? > Same for nagios? > > That should work right? Anyway, I guess the preferred solution would > be to have substring search for "File <<| name == "somesubstring" |>>"Hi, I''ve git something like that in my git repository but I haven''t had the time to test it thoroughly. It''s in the features/collection branch. For it to work the patch from bug 997 should also be applied. It introduces a new operator =~ which allows the right hands side to be a string that can be used with fnmatch, so * ? and ! can be used. I haven''t had the time to test it and I''m also not sure this is a good approach but it''s a start. Btw, my git repo it git://home.vanbrabant.eu/puppet or http://home.vanbrabant.eu:8080/git/puppet for a web interface. gr, Bart -- Bart Vanbrabant <bart.vanbrabant@zoeloelip.be>
On 24/01/2008, udo waechter <udo.waechter@uni-osnabrueck.de> wrote:> Hello all, > as I understand the exporting and collecting of ressources it is not > possible to import resources via wildcards. > > The situation I have is the following: > One Host which is the munin-monitoring host and one which is the > nagios host. > > All computers in our network export resources of the type File for > both the nagios and the munin host. > I collect those ressources via "File <<| |>>" on the hosts, which > means that both, nagios and munin ressources are imported on both > munin and nagios host. > > I would like to have something like: "File <<| name == "nagios_%" |>>" > on the nagios host and "File <<| name == "munin_%" |>> on the munin > host. > This is not possible, right? > To achieve something like this, would it be enough to create different > ressources for those two types? Something like:I''m replying to you directly because I havent tested this much, or thought about caveats. I just ran into a similar problem the other day and tried something that I thought would be a possible solution, and it appeared to work. Use tags: @@foo { thing: tag => "baz" } Foo <<| tag == baz |>> Let me know how it goes if you can. Cheers
On Jan 25, 2008, at 3:49 AM, udo waechter wrote:> Hello all, > as I understand the exporting and collecting of ressources it is not > possible to import resources via wildcards.Correct. [...]> And then export those via @@muninfile and import the via Muninfile <<| > |>>? > Same for nagios? > > That should work right? Anyway, I guess the preferred solution would > be to have substring search for "File <<| name == "somesubstring" |>>"My plan has been to use tags for this, as referred to in the not- actually-private email on this thread. Last time I tried it, though, it only kind of worked; that is, it works if you explicitly tag the files with ''munin'' or ''nagios'', but not if you try to use the automatic tags. -- If you would be a real seeker after truth, it is necessary that at least once in your life you doubt, as far as possible, all things. -- Rene Descartes --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
Hey and thanks for this patch, Your web interface gives a 404 at least when calling the url you have given. without the puppet part it works. I have just tried the "define muninfile" and Muninfile <<||>> approach and it did not work. To all developers of puppet. Would it be possible to integrade Bart''s patches into puppet? The "=~" operator is just how it should be like. It is pretty annoying to always have all resources collected on all hosts... Thanks all, and thanks Bart for this, udo. On 24.01.2008, at 17:56, Bart Vanbrabant wrote:> On Jan 24, 2008 5:49 PM, udo waechter <udo.waechter@uni- > osnabrueck.de> wrote: >> Hello all, >> as I understand the exporting and collecting of ressources it is not >> possible to import resources via wildcards. >> >> The situation I have is the following: >> One Host which is the munin-monitoring host and one which is the >> nagios host. >> >> All computers in our network export resources of the type File for >> both the nagios and the munin host. >> I collect those ressources via "File <<| |>>" on the hosts, which >> means that both, nagios and munin ressources are imported on both >> munin and nagios host. >> >> I would like to have something like: "File <<| name == "nagios_%" | >> >>" >> on the nagios host and "File <<| name == "munin_%" |>> on the munin >> host. >> This is not possible, right? >> To achieve something like this, would it be enough to create >> different >> ressources for those two types? Something like: >> >> define muninfile(){ >> file{ >> ... same paramaters that previously were there... >> } >> } >> And then export those via @@muninfile and import the via Muninfile >> <<| >> |>>? >> Same for nagios? >> >> That should work right? Anyway, I guess the preferred solution would >> be to have substring search for "File <<| name == "somesubstring" | >> >>" > > Hi, > > I''ve git something like that in my git repository but I haven''t had > the time to test it thoroughly. It''s in the features/collection > branch. For it to work the patch from bug 997 should also be applied. > It introduces a new operator =~ which allows the right hands side to > be a string that can be used with fnmatch, so * ? and ! can be used. > > I haven''t had the time to test it and I''m also not sure this is a good > approach but it''s a start. > > Btw, my git repo it git://home.vanbrabant.eu/puppet or > http://home.vanbrabant.eu:8080/git/puppet for a web interface. > > gr, > > Bart > -- > Bart Vanbrabant <bart.vanbrabant@zoeloelip.be> > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users >-- :: udo waechter - root@zoide.net :: N 52º16''30.5" E 8º3''10.1" :: genuine input for your ears: http://www.auriculabovinari.de :: your eyes: http://ezag.zoide.net :: your brain: http://www.zoide.net
Thanks Luke. I''ll try that in some minutes. If this works, it solves my problem for now, nevertheless I think that an operator like Bart''s "=~" might be the natural and expected thing to have. Then, one could do substring searches on all parameters and would not be restricted to a xertain type of paramter. Have a nice day, udo. On 25.01.2008, at 05:58, Luke Kanies wrote:> On Jan 25, 2008, at 3:49 AM, udo waechter wrote: > >> Hello all, >> as I understand the exporting and collecting of ressources it is not >> possible to import resources via wildcards. > > Correct. > [...] >> And then export those via @@muninfile and import the via Muninfile >> <<| >> |>>? >> Same for nagios? >> >> That should work right? Anyway, I guess the preferred solution would >> be to have substring search for "File <<| name == "somesubstring" | >> >>" > > My plan has been to use tags for this, as referred to in the not- > actually-private email on this thread. > > Last time I tried it, though, it only kind of worked; that is, it > works if you explicitly tag the files with ''munin'' or ''nagios'', but > not if you try to use the automatic tags. > > -- > If you would be a real seeker after truth, it is necessary that at > least once in your life you doubt, as far as possible, all things. > -- Rene Descartes > --------------------------------------------------------------------- > Luke Kanies | http://reductivelabs.com | http://madstop.com > > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users >-- :: udo waechter - root@zoide.net :: N 52º16''30.5" E 8º3''10.1" :: genuine input for your ears: http://www.auriculabovinari.de :: your eyes: http://ezag.zoide.net :: your brain: http://www.zoide.net
On Jan 25, 2008 9:46 AM, udo waechter <udo.waechter@uni-osnabrueck.de> wrote:> Thanks Luke. > I''ll try that in some minutes. > If this works, it solves my problem for now, nevertheless I think that > an operator like Bart''s "=~" might be the natural and expected thing > to have. Then, one could do substring searches on all parameters and > would not be restricted to a xertain type of paramter. > Have a nice day, > udo.I just realized it probably doesn''t work for exported resources because there isn''t a rails translation. I''ve been looking at the possibilities but globbing and wildcard searching seems to be all a bit different on various databases. gr, Bart -- Bart Vanbrabant <bart.vanbrabant@zoeloelip.be>
On Jan 25, 2008 9:40 AM, udo waechter <udo.waechter@uni-osnabrueck.de> wrote:> Hey and thanks for this patch, > Your web interface gives a 404 at least when calling the url you have > given. without the puppet part it works.It''s without the puppet part, so http://home.vanbrabant.eu:8080/git/ gr, Bart -- Bart Vanbrabant <bart.vanbrabant@zoeloelip.be>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bart Vanbrabant wrote: | On Jan 25, 2008 9:40 AM, udo waechter <udo.waechter@uni-osnabrueck.de> wrote: |> Hey and thanks for this patch, |> Your web interface gives a 404 at least when calling the url you have |> given. without the puppet part it works. | | It''s without the puppet part, so http://home.vanbrabant.eu:8080/git/ Bart Would you be willing to document exported resources further? Perhaps create an ExportedResources web page? The material in VirtualResources is not really sufficient any more. Thanks James - -- James Turnbull (james@lovedthanlost.net) - -- Author of: - - Pulling Strings with Puppet (http://www.amazon.com/gp/product/1590599780/) - - Pro Nagios 2.0 (http://www.amazon.com/gp/product/1590596099/) - - Hardening Linux (http://www.amazon.com/gp/product/1590594444/) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHmazp9hTGvAxC30ARAh9hAKCEoWWLuWdGHVK84xG5Vsq4pFrmLQCg2Kc+ AlGlb1ZUrNbWCeuWHG+PSIg=z786 -----END PGP SIGNATURE-----
In the 0.24.1 version. I use File <<| tag == "someting" |>> ,but can''t work. can''t get any file. puppetmasterd is 0.24.1 ,and all the puppetd is 0.23.2 . what''s the reason. On 1/25/08, James Turnbull <james@lovedthanlost.net> wrote:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Bart Vanbrabant wrote: > | On Jan 25, 2008 9:40 AM, udo waechter <udo.waechter@uni-osnabrueck.de> > wrote: > |> Hey and thanks for this patch, > |> Your web interface gives a 404 at least when calling the url you have > |> given. without the puppet part it works. > | > | It''s without the puppet part, so http://home.vanbrabant.eu:8080/git/ > > Bart > > Would you be willing to document exported resources further? Perhaps > create an ExportedResources web page? The material in VirtualResources > is not really sufficient any more. > > Thanks > > James > > - -- > James Turnbull (james@lovedthanlost.net) > - -- > Author of: > - - Pulling Strings with Puppet > (http://www.amazon.com/gp/product/1590599780/) > - - Pro Nagios 2.0 > (http://www.amazon.com/gp/product/1590596099/) > - - Hardening Linux > (http://www.amazon.com/gp/product/1590594444/) > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.7 (Darwin) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFHmazp9hTGvAxC30ARAh9hAKCEoWWLuWdGHVK84xG5Vsq4pFrmLQCg2Kc+ > AlGlb1ZUrNbWCeuWHG+PSIg> =z786 > -----END PGP SIGNATURE----- > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users >-- Huang Mingyou