Re: [Nagios-devel] Inherited custom object vars using definitions

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Inherited custom object vars using definitions

Post by Guest »

I would like to report this as a bug - what is the proper procedure?

Best regards,
Steffen Poulsen


> -----Oprindelig meddelelse-----
> Fra: [email protected]=20
> [mailto:[email protected]] P=E5 vegne=20
> af Steffen Poulsen
> Sendt: 1. oktober 2007 16:05
> Til: Nagios Developers List
> Emne: [Nagios-devel] Inherited custom object vars using=20
> definitions inresource.cfg
>=20
> Hi,=20
>=20
> We would like to utilize resource.cfg for holding secrets, and we are
> trying to do something like this:
>=20
> Passwords in resource.cfg:
>=20
> $USER20$=3Dsecret1
> $USER21$=3Dsecret2
>=20
> Each host use one of the passwords in hosts.cfg:
>=20
> define host {
> use generic-host
> host_name host1
> alias host1
> address ip1
> _snmp_community $USER20$
> }
>=20
> Services use the community in services.cfg:
>=20
> define service {
> use generic-service
> host_name host1
> service_description snmp_check_load
> check_command check_snmp_11187
> }
>=20
> define command {
> command_name check_snmp_11187
> command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C
> $_HOSTSNMP_COMMUNITY$ -o .1.3.6.1.... -w 70=20
> }
>=20
> But $_HOSTSNMP_COMMUNITY$ appears to be not set once it reaches the
> command_line?
>=20
> Using something like this (defining the password directly in=20
> hosts.cfg,
> without going through resource.cfg):
>=20
> _snmp_community secret3
>=20
> Appears to work ok - so what is hindering the other approach? Is there
> an undocumented expansion order preventing the hierarchical use? And,
> more importantly - is this per spec or in error? :-)
>=20
> Best regards,
> Steffen Poulsen
>=20
> --------------------------------------------------------------
> -----------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Nagios-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/lis ... gios-devel
>=20





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked