Add BES root to relevance query

One of my developers wants a way to add in the query the name of the environment/root server a baseline lives on.

from this:

(id of it, name of it, source id of it, message of it) 
of bes fixlets 
whose ((name of site of it ="Desktop_Software") 
	AND (Baseline Flag of it = True) 
	)

to this:

(id of it, name of it & " - " & root server of it, source id of it, message of it) 
of bes fixlets 
whose ((name of site of it ="Desktop_Software") 
	AND (Baseline Flag of it = True) 
	)

Basically appending the root server name/masthead to the “name of it” column. We have 3 root servers and we need to determine which env we are hitting in the return.

Yes, I’m aware they could just add that in later if they knew what env they are hitting, but the given the some the SQL developer is doing this, he was hoping to add that into this relevance query.

If you have DSA, you might get more than one root server.

(id of item 0 of it, name of item 0 of it & " - " & item 1 of it, (if exists source id of item 0 of it then source id of item 0 of it else “N/A”),( if exists messages of item 0 of it then concatenation “||” of (it as string) of messages of item 0 of it else “n/A”))
of (bes fixlets
whose ((name of site of it =“Desktop_Software”) AND Baseline Flag of it), concatenation “|” of (preceding text of first “:” of following text of first “//” of it) of urls of current bes servers)

I have also added some checks in case your baselines don’t have messages and/or source ids

2 Likes

I wish I could say that works, but I get the error “A string constant had no ending quotation mark” I’m not sure where that’s erroring out at.

And we don’t use DSA. We have other recovery methods.

False alarm. It was an issue with the BigFix Session Relevance Tester. If I do a pure RESTAPI call with that, it works. Thanks!