Reading Primary Relay in Action

It’s me again. I have googled, I have searched but I can only find how to set settings:

setting "<name>"="value" on "<date>" for client

But What I want to do is read a setting.

To be exact, I have relay auto-selection active. and I want to discovery the primary and failover relays that BF selected, then use these values for Tivoli Monitoring Primary and Failover gateways.

Is there a simple way to find out from the client what it has selected, or do I need to read and parse log files?

Regards,
R.

Try these

Q: values of settings "__RelayServer1" of client

Q: values of settings ("__RelayServer1"; "__RelayServer2") of client

1 Like

Is that available in actions too, or do I need to run qna then parse the output?

You should be able to leverage relevance such as the above in action script via ‘substitution’:

https://developer.bigfix.com/action-script/guide/substitution.html

An alternative to the relevance example above (which should work in most cases), is the same relevance that we use for the ‘Relay’ property, which is currently:

if ((it does not contain "127.0.0.1" and it does not contain "::1") of name of registration server) then (name of registration server) else if (exists setting "_BESRelay_PostResults_ParentRelayURL" of client and exists value of setting "_BESRelay_PostResults_ParentRelayURL" of client as string) then (preceding text of first "/" of (following text of first "//" of (value of setting "_BESRelay_PostResults_ParentRelayURL" of client))) else "BES Root Server"

2 Likes