Report processor and available variables

32 views
Skip to first unread message

Jean Baptiste Favre

unread,
Nov 23, 2012, 4:51:57 AM11/23/12
to puppet...@googlegroups.com
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

James Turnbull

unread,
Nov 25, 2012, 11:43:05 PM11/25/12
to puppet...@googlegroups.com
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.

Jean Baptiste Favre

unread,
Nov 28, 2012, 5:13:01 AM11/28/12
to puppet...@googlegroups.com
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
Reply all
Reply to author
Forward
0 new messages