Kevin Wolf
2011-Oct-19 21:48 UTC
[Puppet Users] Collecting only certain virtual resources?
I''m currently working on automating our Nagios monitoring with Puppet. My plan is to have three different Nagios servers... one in each data center. I''d like to have the Chicago (location => ''CH3'') Nagios server only monitor servers who also reside in that data center. My question is, how do I go about collecting only the correct virtual resources on each Nagios server? Ideally, I''d like to collect only resources that belong to servers who''s location fact matches the location fact of the nagios server. For example: Nagios_host <<| |>> { notify => Class[''nagios::service''] } Nagios_service <<| |>> { notify => Class[''nagios::service''] } collects services and hosts for ALL data centers, not just where the location fact is ''CH3''. I''m using a single mysql DB for thin stored configs, and have three puppet masters, one in each location. All three are connecting to the same mysql db for stored configs. Any suggestions? There might just be some simple syntax that I''m missing. Thanks, Kevin. -- 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.
Gabriel Filion
2011-Oct-20 01:22 UTC
Re: [Puppet Users] Collecting only certain virtual resources?
Hello, You can use the "tag" argument to mark different resources and then collect only the resources with a certain tag. See an example on this page: http://docs.puppetlabs.com/guides/exported_resources.html On 11-10-19 05:48 PM, Kevin Wolf wrote:> I''m currently working on automating our Nagios monitoring with Puppet. > > My plan is to have three different Nagios servers... one in each data > center. I''d like to have the Chicago (location => ''CH3'') Nagios > server only monitor servers who also reside in that data center. > > My question is, how do I go about collecting only the correct virtual > resources on each Nagios server? Ideally, I''d like to collect only > resources that belong to servers who''s location fact matches the > location fact of the nagios server. > > For example: > > Nagios_host <<| |>> { notify => Class[''nagios::service''] } > Nagios_service <<| |>> { notify => Class[''nagios::service''] } > > collects services and hosts for ALL data centers, not just where the > location fact is ''CH3''. > > I''m using a single mysql DB for thin stored configs, and have three > puppet masters, one in each location. All three are connecting to the > same mysql db for stored configs. > > Any suggestions? There might just be some simple syntax that I''m > missing. > > Thanks, > Kevin. >-- Gabriel Filion -- 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.