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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to