I figured out a way around this little problem, in our environment we also 
monitored the ILO and iDrac (remote console) ports on the servers.  Before 
puppet we included a custom variable called _bmc_address <ipaddress> and 
then had a command in turn that used this variable.  Since we intergrated 
puppet we had to figure out a way around this, instead we changed the 
command to look like this in the nagios config file

command_line  $USER1$/check_ping -H $ARG1$ -w 3000.0,80% -c 5000.0,100% -p 5

the $ARG1$ is the trick, this way when I do the service definition I can do 
this in the puppet exported resource:


check_command => "check_ipmi_ping!${::ipmi_ipaddress}",

Where the $::ipmi_address is a custom Facter fact we made that reads the 
output of "ipmitool lan print 1".

This allows us to assocatiate the service correctly with the hostname, but 
use a different address that the host's primary address.

BTW - I literally just implemented and tested this tonight.  The reason I 
came across this post was because I was searching for how to use custom 
variables in nagios with nagios resources in puppet. :)






On Tuesday, May 14, 2013 9:38:28 AM UTC-4, Mason wrote:
>
> Nagios support "custom object variables" (
> http://nagios.sourceforge.net/docs/nagioscore/3/en/customobjectvars.html) 
> buy prefixing them with an underscore:
>
> define host{
> host_name linuxserver
> *_mac_address 00:06:5B:A6:AD:AA*
> * _rack_number R32*
> }
>
> However, I can't determine how to use these with puppet nagios resources. 
> I'm assuming they aren't supported, but I'm also hoping that I just missed 
> it in the documentation. Is anyone creating custom nagios object variables 
> with puppet?
>
> Thanks for the help.
>
> — Mason Turner
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to