Relevance Logic for a Custom Property Based on Relay Name

Hi everyone…

Beginner here. I have a need to create a custom property called “Country,” that will be populated based on the name of the Relay that a given client reports into. For example, if ClientServerA reports into the Chicago Relay, then the Country custom field would be populated as “United States.”

Try as I may with the Relevance language, I’ve not been able to figure out how to do this. Might I trouble anyone to assist, please?

Thank you!

Take a look at the ‘Location Property Wizard’ in the Bigfix console. I think that may do what you need…

If it’s not, let me know and I can help you out with this… how many relays are we talking about?

1 Like

Also, if the number of relays is manageable, meaning not in the hundreds, you could use something like this:

setting “Country”="{if (name of registration server as lowercase contains “relay1”) then (“USA”) else (if (name of registration server as lowercase contains “relay2”) then (“Japan”) else (if (name of registration server as lowercase contains “relay3”) then (“Mexico”) else (if (name of registration server as lowercase contains “relay4”) then (“Zambia”) else (if (name of registration server as lowercase contains “relay5”) then (“Ireland”) else (“Unknown”)))))}" on “{now}” for client

otherwise, I think I would consider using subnet.

For only a property, you can just use the relevance:

if (name of registration server as lowercase contains “relay1”) then (“USA”) else (if (name of registration server as lowercase contains “relay2”) then (“Japan”) else (if (name of registration server as lowercase contains “relay3”) then (“Mexico”) else (if (name of registration server as lowercase contains “relay4”) then (“Zambia”) else (if (name of registration server as lowercase contains “relay5”) then (“Ireland”) else (“Unknown”)))))

1 Like

We are talking about 58 relays, Menglish66.

And I will then need to further segregate to determine state and city, but I just want to clear the country hurdle first.

Thank you somuch menglish66!!!

1 Like

Hmmmm…

If you can figure out where this data already exists, e.g, maybe its hidden in naming convention?, maybe subnet? maybe it’s in the registry somewhere?, AD?, some other CMDB? then you might be able to pull all of it from one source.

If we’re just polling the relay, I doubt you will be able to get city and possibly state.

I have a table available of Relays and the countries in which they exist. I’m also going to extend that to include the state and city in which they exist. Typically, we’ve set up 1 relay at each location.

2 Likes