scott smith
2008-Jul-19 19:28 UTC
[Puppet Users] Virtual resources and +> / Using Nagios_hostgroup
Is it not possible to use +> with a virtual resource? I have the following code: @@Nagios_hostgroup["foo"] { members +> $fqdn } but get the following error: Jul 19 12:17:31 ns1 puppetd[25031]: Could not retrieve catalog: Could not parse for environment production: Syntax error at ''[''; expected '']'' at /etc/puppet/modules/nagios/manifests/hostgroup.pp:13 At any rate, I am obviously trying to add members to a Nagios_hostgroup. Has anyone been able to do this? What should I be looking at? I have hit a roadblock with my nagios setup because I have multiple services on the same host that need monitored. The Nagios_service type uses service_description as its namevar, rendering this sort of thing basically impossible. I also want to keep the number of service entries as low as possible, so using hostgroups is preferable. But I simply can''t figure out how to get puppet to dynamically add a node to my hostgroup. Any input/suggestions would be greatly appreciated. -scott --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Peter Meier
2008-Jul-20 11:04 UTC
[Puppet Users] Re: Virtual resources and +> / Using Nagios_hostgroup
Hi> Is it not possible to use +> with a virtual resource?just a side note: these are exported resources not virtual. See http://reductivelabs.com/trac/puppet/wiki/VirtualResources vs. http://reductivelabs.com/trac/puppet/wiki/ExportedResources Slightly different features.> I have the following code: > > @@Nagios_hostgroup["foo"] { > members +> $fqdn > } > > but get the following error: > > Jul 19 12:17:31 ns1 puppetd[25031]: Could not retrieve catalog: Could > not parse for environment production: Syntax error at ''[''; expected '']'' > at /etc/puppet/modules/nagios/manifests/hostgroup.pp:13 > > At any rate, I am obviously trying to add members to a Nagios_hostgroup. > Has anyone been able to do this? What should I be looking at?hmm I''m not very sure, but tried without the @@?> I have hit a roadblock with my nagios setup because I have multiple > services on the same host that need monitored. The Nagios_service type > uses service_description as its namevar, rendering this sort of thing > basically impossible. > > I also want to keep the number of service entries as low as possible, so > using hostgroups is preferable. But I simply can''t figure out how to get > puppet to dynamically add a node to my hostgroup.one problem will be that you can only add them while subclassing the class of the original statement you have. If you''d like to do it the way your are trying to do it now. But other question: why having the entries as low as possible? Puppet manages them for you! However I don''t know Nagios that good, so there might be other arguments for a low amount of entries.> Any input/suggestions would be greatly appreciated.Well I think I couldn''t really help ;-) greets pete --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---