I''m very interested in the way that puppet appears to be able to generate nagios configurations though I can''t seem to find any documenation on how it works: http://reductivelabs.com/trac/naginator is clearly a placeholder page... Meanwhile the various pieces of info at links such as: http://reductivelabs.com/trac/puppet/wiki/TypeReference#nagios-host are just teasing me. Is there any actual documentation for this? I''m hoping the naginator link above is just a simple matter of a broken link... Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Jun 12, 2008, at 10:02 PM, Steve Wray wrote:> > I''m very interested in the way that puppet appears to be able to > generate nagios configurations though I can''t seem to find any > documenation on how it works: > > http://reductivelabs.com/trac/naginator > > is clearly a placeholder page... > > > Meanwhile the various pieces of info at links such as: > > http://reductivelabs.com/trac/puppet/wiki/TypeReference#nagios-host > > are just teasing me. > > Is there any actual documentation for this? I''m hoping the naginator > link above is just a simple matter of a broken link...Naginator is a library for parsing and generating nagios configuration files, and the nagios resource types use naginator to actually manage those configuration files through Puppet configurations. What exactly do you need to know? There isn''t a whole lot that seems necessary. -- Be wary of the man who urges an action in which he himself incurs no risk. -- Joaquin Setanti --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Luke Kanies wrote:> On Jun 12, 2008, at 10:02 PM, Steve Wray wrote: > >> I''m very interested in the way that puppet appears to be able to >> generate nagios configurations though I can''t seem to find any >> documenation on how it works: >> >> http://reductivelabs.com/trac/naginator >> >> is clearly a placeholder page... >> >> >> Meanwhile the various pieces of info at links such as: >> >> http://reductivelabs.com/trac/puppet/wiki/TypeReference#nagios-host >> >> are just teasing me. >> >> Is there any actual documentation for this? I''m hoping the naginator >> link above is just a simple matter of a broken link... > > Naginator is a library for parsing and generating nagios configuration > files, and the nagios resource types use naginator to actually manage > those configuration files through Puppet configurations. > > What exactly do you need to know? There isn''t a whole lot that seems > necessary.Well... I''m not sure! I reasoned that since there was a link to a page apparently specifically about the naginator that there would be some docco and that it had just been mislaid. It seems simple enough I guess. What I''d like to see are some examples of specifying hosts and services and doing some kind of puppet for loop to fill in the nagios config files for them. I''m really just getting started with puppet... and I need to set up nagios monitoring. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Jun 15, 2008, at 3:27 PM, Steve Wray wrote:> > Luke Kanies wrote: >> >> >> Naginator is a library for parsing and generating nagios >> configuration >> files, and the nagios resource types use naginator to actually manage >> those configuration files through Puppet configurations. >> >> What exactly do you need to know? There isn''t a whole lot that seems >> necessary. > > Well... I''m not sure! I reasoned that since there was a link to a page > apparently specifically about the naginator that there would be some > docco and that it had just been mislaid. > > It seems simple enough I guess. > > What I''d like to see are some examples of specifying hosts and > services > and doing some kind of puppet for loop to fill in the nagios config > files for them. I''m really just getting started with puppet... and I > need to set up nagios monitoring.With Puppet, you don''t write loops; instead, you directly specify what you want. I expect others will chime in with an example, but search the email archives for ''iteration'' or ''loop'', and you should see plenty of people discussing the topic. -- Get forgiveness now -- tomorrow you may no longer feel guilty. --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Luke Kanies wrote:> On Jun 15, 2008, at 3:27 PM, Steve Wray wrote: >> Luke Kanies wrote: >>> >>> Naginator is a library for parsing and generating nagios >>> configuration >>> files, and the nagios resource types use naginator to actually manage >>> those configuration files through Puppet configurations. >>> >>> What exactly do you need to know? There isn''t a whole lot that seems >>> necessary. >> Well... I''m not sure! I reasoned that since there was a link to a page >> apparently specifically about the naginator that there would be some >> docco and that it had just been mislaid. >> >> It seems simple enough I guess. >> >> What I''d like to see are some examples of specifying hosts and >> services >> and doing some kind of puppet for loop to fill in the nagios config >> files for them. I''m really just getting started with puppet... and I >> need to set up nagios monitoring. > > With Puppet, you don''t write loops; instead, you directly specify what > you want. > > I expect others will chime in with an example, but search the email > archives for ''iteration'' or ''loop'', and you should see plenty of > people discussing the topic.Ok for now, keeping it simple, I have already got a puppet section defining the /etc/hosts file with IP addresses, aliases etc. Like this: host { "localhost.localdomain": alias => "localhost", ip => "127.0.0.1", name => "localhost.localdomain" } Can I utilise this data to generate the nagios hosts? Or do I have to enter all of this info again, once for each host? What I''d like to be able to do is to define a base case with specified contact groups etc (a template if you will) and then have naginator produce nagios host definitions for each listed host using the information provided to puppet in the host definitions that I already have. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Luke Kanies wrote:> On Jun 12, 2008, at 10:02 PM, Steve Wray wrote: > >> I''m very interested in the way that puppet appears to be able to >> generate nagios configurations though I can''t seem to find any >> documenation on how it works: >> >> http://reductivelabs.com/trac/naginator >> >> is clearly a placeholder page... >> >> >> Meanwhile the various pieces of info at links such as: >> >> http://reductivelabs.com/trac/puppet/wiki/TypeReference#nagios-host >> >> are just teasing me. >> >> Is there any actual documentation for this? I''m hoping the naginator >> link above is just a simple matter of a broken link... > > Naginator is a library for parsing and generating nagios configuration > files, and the nagios resource types use naginator to actually manage > those configuration files through Puppet configurations. > > What exactly do you need to know? There isn''t a whole lot that seems > necessary.Ok I think I may have hit something non-obvious and in need of documentation. I have a file, nagios.pp which contains the following: class nagios2 { file { "/etc/nagios2": source => "puppet://puppet1.lan.tki.org.nz/files/nagios-server/etc/nagios2", owner => "root", group => "root", recurse => "true" } file { "/etc/nagios2/resource.cfg": group => "nagios" } nagios_host { "testhost": target => "/etc/nagios2/puppet_generated_hosts.cfg", } which I reasoned was as simple as the nagios_host could possibly get. When I run puppetd -vt on the client I get: line 3: syntax error at '' '' which is about as perplexing as anything I ever saw out of cfengine, even the "have you configured dns correctly" messages.... If I comment out the nagios_host section, apparently the syntax error on line 3 goes away. I''m inclined to believe that its not actually complaining about line 3 in this particular file though. I ran puppetd -dvt and that didn''t get me any closer to the truth of the matter. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Well I can''t find anything on how to determine exactly what puppet is complaining about in this case. Running puppetd -dvt tells me: <quote> info: Caching catalog at /var/lib/puppet/state/localconfig.yaml notice: Starting catalog run debug: Loaded state in 0.00 seconds debug: Prefetching naginator resources for nagios_host line 3: syntax error at '' '' </quote> which is pretty close to telling me nothing since the file that I have edited between everything being fine and getting this error is clearly not the file that has the error on ''line 3''. How do I perform more in-depth debugging to find out exactly where this ''syntax error'' is coming from? Thanks! Steve Wray wrote:> Luke Kanies wrote: >> On Jun 12, 2008, at 10:02 PM, Steve Wray wrote: >> >>> I''m very interested in the way that puppet appears to be able to >>> generate nagios configurations though I can''t seem to find any >>> documenation on how it works: >>> >>> http://reductivelabs.com/trac/naginator >>> >>> is clearly a placeholder page... >>> >>> >>> Meanwhile the various pieces of info at links such as: >>> >>> http://reductivelabs.com/trac/puppet/wiki/TypeReference#nagios-host >>> >>> are just teasing me. >>> >>> Is there any actual documentation for this? I''m hoping the naginator >>> link above is just a simple matter of a broken link... >> Naginator is a library for parsing and generating nagios configuration >> files, and the nagios resource types use naginator to actually manage >> those configuration files through Puppet configurations. >> >> What exactly do you need to know? There isn''t a whole lot that seems >> necessary. > > Ok I think I may have hit something non-obvious and in need of > documentation. > > I have a file, nagios.pp which contains the following: > > class nagios2 { > > file { "/etc/nagios2": > source => > "puppet://puppet1.lan.tki.org.nz/files/nagios-server/etc/nagios2", > owner => "root", > group => "root", > recurse => "true" > } > > file { "/etc/nagios2/resource.cfg": > group => "nagios" > } > > nagios_host { "testhost": > target => "/etc/nagios2/puppet_generated_hosts.cfg", > } > > which I reasoned was as simple as the nagios_host could possibly get. > > When I run puppetd -vt on the client I get: > > line 3: syntax error at '' > '' > > which is about as perplexing as anything I ever saw out of cfengine, > even the "have you configured dns correctly" messages.... > > If I comment out the nagios_host section, apparently the syntax error on > line 3 goes away. I''m inclined to believe that its not actually > complaining about line 3 in this particular file though. > > I ran puppetd -dvt and that didn''t get me any closer to the truth of the > matter. > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
I can''t tell if this is just due to my mailer, but if that source => "" stuff is split over two lines, this is the problem. On Mon, Jun 16, 2008 at 7:38 PM, Steve Wray <steve.wray@cwa.co.nz> wrote:> > Luke Kanies wrote: > > On Jun 12, 2008, at 10:02 PM, Steve Wray wrote: > > > >> I''m very interested in the way that puppet appears to be able to > >> generate nagios configurations though I can''t seem to find any > >> documenation on how it works: > >> > >> http://reductivelabs.com/trac/naginator > >> > >> is clearly a placeholder page... > >> > >> > >> Meanwhile the various pieces of info at links such as: > >> > >> http://reductivelabs.com/trac/puppet/wiki/TypeReference#nagios-host > >> > >> are just teasing me. > >> > >> Is there any actual documentation for this? I''m hoping the naginator > >> link above is just a simple matter of a broken link... > > > > Naginator is a library for parsing and generating nagios configuration > > files, and the nagios resource types use naginator to actually manage > > those configuration files through Puppet configurations. > > > > What exactly do you need to know? There isn''t a whole lot that seems > > necessary. > > Ok I think I may have hit something non-obvious and in need of > documentation. > > I have a file, nagios.pp which contains the following: > > class nagios2 { > > file { "/etc/nagios2": > source => > "puppet://puppet1.lan.tki.org.nz/files/nagios-server/etc/nagios2", > owner => "root", > group => "root", > recurse => "true" > } > > file { "/etc/nagios2/resource.cfg": > group => "nagios" > } > > nagios_host { "testhost": > target => "/etc/nagios2/puppet_generated_hosts.cfg", > } > > which I reasoned was as simple as the nagios_host could possibly get. > > When I run puppetd -vt on the client I get: > > line 3: syntax error at '' > '' > > which is about as perplexing as anything I ever saw out of cfengine, > even the "have you configured dns correctly" messages.... > > If I comment out the nagios_host section, apparently the syntax error on > line 3 goes away. I''m inclined to believe that its not actually > complaining about line 3 in this particular file though. > > I ran puppetd -dvt and that didn''t get me any closer to the truth of the > matter. > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Ashley Penney wrote:> I can''t tell if this is just due to my mailer, but if that source => "" > stuff is split over two lines, this is the problem.:) oh if only. Nah its all on one line. Its getting strange because I''ve tried several different ways of organising my files in the hope that something would give me a clue. Guess what? It works now but in a version of the file which was not working before. In fact the EXACT code quoted in this email now works with NO other changes to other code ANYWHERE. I''ve been restarting puppetmaster every time I edited files as I was finding that touching site.pp was not reliably being picked up for some reason. Maybe thats the real clue that I''ve been missing. So I have come full circle... still it would be extremely nice to have a methodology for isolating which file has a problem on line 3. Because it is just really frustrating to have no debug information whatsoever pointing me at a file with a syntax error; merely saying ''theres a syntax error'' is pretty useless when the error message doesn''t say line 3 of WHICH FILE! Oh well, its better than cfengine...> On Mon, Jun 16, 2008 at 7:38 PM, Steve Wray <steve.wray@cwa.co.nz > <mailto:steve.wray@cwa.co.nz>> wrote: > > > Luke Kanies wrote: > > On Jun 12, 2008, at 10:02 PM, Steve Wray wrote: > > > >> I''m very interested in the way that puppet appears to be able to > >> generate nagios configurations though I can''t seem to find any > >> documenation on how it works: > >> > >> http://reductivelabs.com/trac/naginator > >> > >> is clearly a placeholder page... > >> > >> > >> Meanwhile the various pieces of info at links such as: > >> > >> http://reductivelabs.com/trac/puppet/wiki/TypeReference#nagios-host > >> > >> are just teasing me. > >> > >> Is there any actual documentation for this? I''m hoping the naginator > >> link above is just a simple matter of a broken link... > > > > Naginator is a library for parsing and generating nagios > configuration > > files, and the nagios resource types use naginator to actually manage > > those configuration files through Puppet configurations. > > > > What exactly do you need to know? There isn''t a whole lot that seems > > necessary. > > Ok I think I may have hit something non-obvious and in need of > documentation. > > I have a file, nagios.pp which contains the following: > > class nagios2 { > > file { "/etc/nagios2": > source => > "puppet://puppet1.lan.tki.org.nz/files/nagios-server/etc/nagios2 > <http://puppet1.lan.tki.org.nz/files/nagios-server/etc/nagios2>", > owner => "root", > group => "root", > recurse => "true" > } > > file { "/etc/nagios2/resource.cfg": > group => "nagios" > } > > nagios_host { "testhost": > target => "/etc/nagios2/puppet_generated_hosts.cfg", > } > > which I reasoned was as simple as the nagios_host could possibly get. > > When I run puppetd -vt on the client I get: > > line 3: syntax error at '' > '' > > which is about as perplexing as anything I ever saw out of cfengine, > even the "have you configured dns correctly" messages.... > > If I comment out the nagios_host section, apparently the syntax error on > line 3 goes away. I''m inclined to believe that its not actually > complaining about line 3 in this particular file though. > > I ran puppetd -dvt and that didn''t get me any closer to the truth of the > matter. > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Jun 16, 2008, at 5:39 PM, Steve Wray wrote:> Ok for now, keeping it simple, I have already got a puppet section > defining the /etc/hosts file with IP addresses, aliases etc. Like > this: > > host { "localhost.localdomain": > alias => "localhost", > ip => "127.0.0.1", > name => "localhost.localdomain" > } > > > Can I utilise this data to generate the nagios hosts? Or do I have to > enter all of this info again, once for each host?It''s easiest to create a composite host that creates both of these, and just specify each of those: define myhost($ip) { host { $name: ip => $ip } nagios_host { $name: ip => $ip } } Or however they work. :) This idea of automatically generating one resource from another is interesting though. Hmm.> > What I''d like to be able to do is to define a base case with specified > contact groups etc (a template if you will) and then have naginator > produce nagios host definitions for each listed host using the > information provided to puppet in the host definitions that I > already have.You can''t really do this right now, unfortunately; the best I think you can ATM is the above composite definition. -- 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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Jun 16, 2008, at 7:42 PM, Steve Wray wrote:> Well I can''t find anything on how to determine exactly what puppet is > complaining about in this case. > > Running puppetd -dvt tells me: > > <quote> > info: Caching catalog at /var/lib/puppet/state/localconfig.yaml > notice: Starting catalog run > debug: Loaded state in 0.00 seconds > debug: Prefetching naginator resources for nagios_host > line 3: syntax error at '' > '' > </quote> > > which is pretty close to telling me nothing since the file that I have > edited between everything being fine and getting this error is clearly > not the file that has the error on ''line 3''. > > How do I perform more in-depth debugging to find out exactly where > this > ''syntax error'' is coming from?This is a syntax error in Naginator''s parsing of the Nagios configuration file. Naginator is essentially unchanged from when I wrote it years ago when using it with Cfengine. Puppet''s exceptions are generally far more helpful, but it looks like Naginator is a bit less helpful there. :/ I guess file this as a bug against Puppet. -- Opportunity is missed by most people because it is dressed in overalls and looks like work. -- Thomas A. Edison --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Luke Kanies wrote:> On Jun 16, 2008, at 7:42 PM, Steve Wray wrote: > >> Well I can''t find anything on how to determine exactly what puppet is >> complaining about in this case. >> >> Running puppetd -dvt tells me: >> >> <quote> >> info: Caching catalog at /var/lib/puppet/state/localconfig.yaml >> notice: Starting catalog run >> debug: Loaded state in 0.00 seconds >> debug: Prefetching naginator resources for nagios_host >> line 3: syntax error at '' >> '' >> </quote> >> >> which is pretty close to telling me nothing since the file that I have >> edited between everything being fine and getting this error is clearly >> not the file that has the error on ''line 3''. >> >> How do I perform more in-depth debugging to find out exactly where >> this >> ''syntax error'' is coming from? > > > This is a syntax error in Naginator''s parsing of the Nagios > configuration file. Naginator is essentially unchanged from when I > wrote it years ago when using it with Cfengine.Ahhhh so it *is* a problem with the generated nagios config file...? Because I had found that deleting the target file *sometimes* helped. But sometimes it didn''t seem to help so I just put it down to non-determinism.> Puppet''s exceptions are generally far more helpful, but it looks like > Naginator is a bit less helpful there. :/ > > I guess file this as a bug against Puppet.Yeah I wish I could give a more detailed description and reproduce it reliably but so far I have not been able to. Sometimes it bites and sometimes it doesn''t. Sometimes deleting the target helps and sometimes it doesn''t. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Jun 16, 2008, at 10:03 PM, Steve Wray wrote:>> >> This is a syntax error in Naginator''s parsing of the Nagios >> configuration file. Naginator is essentially unchanged from when I >> wrote it years ago when using it with Cfengine. > > Ahhhh so it *is* a problem with the generated nagios config file...? > Because I had found that deleting the target file *sometimes* helped. > But sometimes it didn''t seem to help so I just put it down to > non-determinism. > >> Puppet''s exceptions are generally far more helpful, but it looks like >> Naginator is a bit less helpful there. :/ >> >> I guess file this as a bug against Puppet. > > Yeah I wish I could give a more detailed description and reproduce it > reliably but so far I have not been able to. Sometimes it bites and > sometimes it doesn''t. Sometimes deleting the target helps and > sometimes > it doesn''t.Well, the "bug" in this case is that Naginator isn''t clear enough about where the syntax error is. But it certainly looks like some kind of whitespace problem, so maybe it''s a case where something looks right but actually isn''t. -- If you''re not part of the solution, you''re part of the precipitate. -- Henry J. Tillman --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---