Get computer IDS from a name list

(imported topic written by iLorenz)

Hi

…using the Session Relevance Tester,I’m banging my head trying to find the solution to a ‘simple’ question:

I have a list of computers (a plural string) and I need to have their IDs.

the following pseudo-code exemplificates the problem:

(names of it) of (bes computers whose (name of it = (“computerA”;“computerB”))

I’ve experimented usings “sets of”, but again, while it is trivial to get the ID of a single computer given its name, I’ve been unable to do so for multiple names/lists of names)

Any help is greatly appreciated :slight_smile:

Thanks

(imported comment written by Lee Wei)

Here are 2 examples for you.

If you have many, the 2nd form might look tighter.

ids of bes computers whose (name of it = 
"computerA" or name of it = 
"computerB")   ids of bes computers whose (
"|" & name of it & 
"|" is contained by 
"|computerA|computerB|")

For the 2nd form, the reason we put “|” around the name is to avoid partial match. For example, without the “|”, computerA would have been a match for the following:

ids of bes computers whose (name of it is contained by 
"|computerABC|computerB|")

Lee Wei

(imported comment written by iLorenz)

Thanks for the fast reply Lee!

I’ve tried your soluntion and surely it works… but only if the list is short.

In our enviroment the list seems to be too long to be effective; our complete code is:

(ids of it) of bes computers whose ( name of it is contained by ( concatenation 
"|" of ( unique values of ( (preceding text of first 
"." of it|preceding text of first 
":" of it) of relay server of computer of it) of results of bes actions whose ( ID of it = 145145 ) ) ) )

(please excuse the poor indentation but the form seems a bit trobulesome on Chrome)

The ‘concatenation “|”’ consists of more than 5 thousands hostnames (witch could go up as high as 90k)… so the code above just takes ages (and eventually times out)

[btw, the :

(preceding text of first “.” of it|preceding text of first “:” of it) of relay server of computer of it

syntax if needed because some of our relay do report with the

hostname:port

syntax and the others do report as

hostname.fqdn:port

so we just extract the hostname this way]

(imported comment written by Lee Wei)

In you are using the Session Relevance Tester, it defaults to timing out after 60 seconds I believe.

In the 2nd tab “Configuration”, you can set to not time out.

Since you have a more involved use case, you might want to work with someone to figure out what is the end goal.

I cannot tell from the statement what we are trying to accomplish, and if there is a different way to get there.

Lee Wei

(imported comment written by iLorenz)

Thanks Lee

Yes, we’re aware of the timeout setting, but even with 30 minutes that relevance does not complete given the high number of clients we have.

Thanks to Brian Green tho, we now have a working solution in place. I’m posting it here should it be of use to other people:

(
id

of

it
)

of

items

1

of

(
set

of

(

(
preceding text

of
first

“.”

of

it|
preceding text

of
first

“:”

of

it
)

of

                                     relay servers

of
computer

of

it
)

of

                                           results

of
bes actions

whose

(

                                                 ID

of

it

=

147132

)

,
bes computers

)

whose

(

item

0

of

it

contains
name

of

item

1

of

it

)