Hi,

On 3/18/19 4:30 PM, Antony Stone wrote:

You can try to start by running 'get_host("your_host")' and then
continue with more complex stuff based on properties you get.

Yes, I can do everything I want to there:

<1> => a=get_host("first.server.com").vars.neighbour
null
<2> => a
"second.server.com"
<3> => b=get_host(get_host("first.server.com").vars.neighbour).display_name
null
<4> => b
"HA Pair: Berlin"

And, "HA Pair: Berlin" is indeed the display_name for "second.server.com",
which you can see is the value in vars.neighbour for "first.server.com"

So, I can get what I want in the console; it just doesn't work inside the
code.


I've not seen a thing that worked on console and not in the actual configuration. What output do you get when you try step by step (like above) while using log function?

If there is nothing that makes sense, I'd try to report this as an unexcepted behavior or bug in icinga.

cheers,
Vaclav
--
Václav Mach
tel: +420 234 680 206
CESNET, z.s.p.o.
www.cesnet.cz


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to