Computer group id in relevance

I have this relevance query which pull the taskid status for the last 24h.

–>(name of computer of it, ids of action of it, detailed status of it,name of action of it) of results of bes act
ions whose (id of source fixlet of it = 1290 AND time issued of it > (now - 1*day) )

We run the task against the “manual group”. That’s the group id. e.g
–Type Manual
–Group ID 00-48117

The group will be different every time we do the upgrade of the package. We are upgrading the package in batch of 100+ servers per group.

Is there any way to get the groupID also from the same relevance query?

Once I have the “groupID” I can run this “query.xml” against the groupID to get the “splunkforwader” version after the task completion. the task in actually doing the “splunkforwader” upgrade.

1 Like

When I used hte “computer group” and the “site” in the target element that seems works instead of “CustomRelevance” But I still can’t figure out how to get the groupname or groupid from the relevance.

→ (name of computer of it, ids of action of it, detailed status of it,name of action of it) of results of bes act
ions whose (id of source fixlet of it = 1290 AND time issued of it > (now - 1*day) )

Capture

Is this a CustomSite? Those sites usually have “CustomSite_” in front of their names in relevance

We don’t have _CustomSite in the front of the site

Try this in the Fixlet Debugger, set to evaluate in “Local Client Mode”

q: names of sites

Ah, I had to read a few times before I saw you are talking Session relevance instead of Client relevance.

https://developer.bigfix.com/relevance/reference/bes-computer-group.html

Going from a BES Computer object back up to a BES Computer Group seems a bit tricky…
Or are you trying to go from the BES Action object back up to the BES Computer Group?

Once you have the BES Computer Group, you can

(name of it, id of it) of <bes computer group>

Yah I did that to get the computer group and it’s ID.

Now I need to get the “id of bes action” from the group.

I need to tie these two statement to get the ActionID.

–>>(name of computer of it, ids of action of it, detailed status of it,name of action of it) of results of bes act
ions whose (id of source fixlet of it = 1290 AND time issued of it > (now - 1*day) )
… This gives me action ID

–>> (ids of it, names of it,names of site of it,id of bes action of it) of bes computer groups …???
… If I this give me actionID then I can use “computer group / site” to run the Query using API.

ActionID is the only way I can think of to tie together with computer group.

This is how the group looks like.

1 Like

I don’ t know which is easy way to match the ActionID to ComputerGroup
So I am thinking if i can get the “computer group/ ActionID” together.

A BES Action can target a BES Computer Group

I am thinking one of these properties of your BES Action might help with the “join”

selected groups string of <bes action> : string
targeting method of <bes action> : string 
targeting relevance of <bes action> : string 

https://developer.bigfix.com/relevance/reference/bes-action.html

Yes, just tested: taking a blank custom action on my computer group “New Group BOB”

(name of it, selected groups string of it, targeting method of it, targeting relevance of it) of bes actions whose (id of it = 16852)

Custom Action, All Computers By Group New Group BOB , By Property, exists true whose (if true then (exists setting "__Group_0_New Group BOB" whose (value of it is "True") of client) else false)
1 Like

OK, it was tricky enough that I could not help myself.
I have a way, but it is not as crisp and clean as I like.

plop your Action ID in here in place of the 16852 and see if you get a match:

(item 1 of item 0 of it, item 0 of item 1 of it) of ((name of it, id of it ) of bes computer groups, (id of it, selected groups string of it) of bes actions whose (id of it = 16852)) whose (item 1 of item 1 of it contains item 0 of item 0 of it )

2 Likes

I used this query as you have mentioned. And I got this result.

((name of it,names of site of it) of bes computer
groups, (id of it, selected groups string of it) of bes actions whose (id of it = 116237))

I will do string search via python to get the “sitename”/ groupname/ and after matching with actionid.

1 Like

how do i match the group so that I can get the correct site and groupname for that group.

(name of it, selected groups string of it, targeting method of it, targeting relevance of it,names of site of bes computer groups whose …) of bes actions whose (id of it = 116237)

I am getting close to get the computer group with this relevance as Brolly mentioned but can’t get the “computer group”.

(item 1 of item 0 of it, item 0 of item 1 of it) of ((name of it, name of site of it ) of bes computer groups, (id of it, ( concatenation “” of substrings separated by “By Group” of it) of ( concatenation “” of substrings separated by “All Computers” of it ) of selected groups string of it as trimmed string) of bes actions whose (id of it = 116237)) whose (item 1 of item 1 of it contains item 0 of item 0 of it )

Capture

1 Like

This relevance gives me what I am looking for

(item 1 of item 0 of it,item 0 of item 0 of it, item 0 of item 1 of it) of
((name of it, name of site of it ) of bes computer groups,
(id of it, ( concatenation “” of substrings separated by “By Group” of it) of ( concatenation “” of substrings separated by “All Computers” of it ) of selected groups string of it as trimmed string)
of bes actions whose (id of it = 116237)) whose (item 1 of item 1 of it contains item 0 of item 0 of it )

4 Likes

Sorry I left you hanging there bigfixforum, but delighted to see you found your way through!

Thanks brolly33. Appreciate your help.