Jean Baptiste Favre
2012-Nov-23 09:51 UTC
[Puppet Users] Report processor and available variables
Hello, I''m trying to build a custom report processor so that I can get puppet metrics into Zabbix. I found one here: https://github.com/thomasvandoren/puppet-zabbix which basically works. The problem I have is that report processor mostly use self.host as hostname. But it represent certname in "puppet world". I tried @hostname, but still get certname instead of hostname. Is there any way to get the real hostname into report processor ? Regards, Jean-Baptiste Favre -- 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.
James Turnbull
2012-Nov-26 04:43 UTC
Re: [Puppet Users] Report processor and available variables
Jean Baptiste Favre wrote:> Hello, > I''m trying to build a custom report processor so that I can get puppet > metrics into Zabbix. > I found one here: https://github.com/thomasvandoren/puppet-zabbix which > basically works. > > The problem I have is that report processor mostly use self.host as > hostname. But it represent certname in "puppet world". > I tried @hostname, but still get certname instead of hostname. > > Is there any way to get the real hostname into report processor ?As you''re located on the master and all that gets passed to the report processor is the the contents of the report this is a little tricky. Off the top of my head you could use the self.host value to lookup the fact values from the node, i.e. if you''re using PuppetBD (http://docs.puppetlabs.com/puppetdb/1/index.html) or the Inventory Service (http://docs.puppetlabs.com/guides/inventory_service.html). Hope that helps! Regards James Turnbull -- James Turnbull 1-503-734-8571 To schedule a meeting with me: http://doodle.com/jamtur01 We are moving! New address: Puppet Labs, Inc., 926 NW 13th Ave., Suite 210, Portland, OR 97209. -- 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.
Jean Baptiste Favre
2012-Nov-28 10:13 UTC
Re: [Puppet Users] Report processor and available variables
Hello James, Yes, this help. I just felt confused that ''host'' report variable represents in fact ''certname'' value. That said, I''ll have a look on PuppetDB, which I do not use for now. Thanks, Jean Baptiste On 11/26/12 5:43 AM, James Turnbull wrote:> Jean Baptiste Favre wrote: >> Hello, >> I''m trying to build a custom report processor so that I can get puppet >> metrics into Zabbix. >> I found one here: https://github.com/thomasvandoren/puppet-zabbix which >> basically works. >> >> The problem I have is that report processor mostly use self.host as >> hostname. But it represent certname in "puppet world". >> I tried @hostname, but still get certname instead of hostname. >> >> Is there any way to get the real hostname into report processor ? > As you''re located on the master and all that gets passed to the report > processor is the the contents of the report this is a little tricky. Off > the top of my head you could use the self.host value to lookup the fact > values from the node, i.e. if you''re using PuppetBD > (http://docs.puppetlabs.com/puppetdb/1/index.html) or the Inventory > Service (http://docs.puppetlabs.com/guides/inventory_service.html). > > Hope that helps! > > Regards > > James Turnbull >-- 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.