Help with WR query custom

I have an analysis property that contains as its property

((display name of it | “” ) & " | " & (service name of it | “”) & " | " & (state of it | “”) & " | " & (start type of it | “”) & " | " & (login account of it | “”)) of services

called Services

Trying to use a stripped down version of that in WR Custom UI and get:

image

What am I doing wrong?

Based on the above, you’re specifying Client Relevance where Web Reports is expecting Session relevance. See https://developer.bigfix.com/relevance/ for general reference and for information about the differences.

That said, what are you trying to do? Are you trying to return the results of an analysis property in a custom Web Report?

Yes, I want analysis property in WR. I actually need it to work in a browser with query in the URL but need to start here.

I want to be able to run a web query in a browser with this (analysis property) as the query and get back those results in the browser.

((display name of it | “” ) & " | " & (service name of it | “”) & " | " & (state of it | “”) & " | " & (start type of it | “”) & " | " & (login account of it | “”)) of Services

Hmm…just to be 100% clear, do you want to have the Clients evaluate this immediate, and return the results live, or do you want to query the data associated with an analysis that is already collecting data (and is already stored in the BigFix database)? Depending on the answer, there are different approaches.

If you already have an analysis collecting this data, what is the Analysis Name and/or Property Name?

Analysis name is “TR - Services” and property name is Services.

I want to “want to query the data associated with an analysis that is already collecting data (and is already stored in the BigFix database”

Ultimately I want to be able to use it in a web browser like,

https://mysite/webreports?Username=user&Password=pass&page=EvaluateRelevanceOnly&expr=expression

where expression is encoded value that represents the relevance I have stated above and if this works, get back XML of the results.

OK, so, this would be session relevance then.

There should be loads of examples of this on the Forum, but here is one:

(name of computer of it | "n/a", values of it) of results of bes properties whose (name of it = "Services" AND name of source analysis of it = "TR - Services")

Note that you can evaluate session relevance such as this through the REST API as well: https://developer.bigfix.com/rest-api/api/query.html

Examples are the greatest, just have hard time finding or not looking in the right places.

Some questions.

Why do you put in the | “n/a”?
If I wanted to add a filter for service name “Spooler” do I add some sort of whose (name of it… clause?

The inclusion of | "n/a" is for some error handling in cases where the computer name doesn’t exist so that it will return ‘n/a’ for that field instead of erroring out. See Pipe Character in Relevance for some more examples.

As to a filter, it sounds like you want to filter on the value of the results, correct?

That might look something like:

(name of computer of it | "n/a", values whose (it as lowercase contains "spooler") of it) of results of bes properties whose (name of it = "Services" AND name of source analysis of it = "TR - Services")

1 Like

You rock dude, I had a web query for another thing I had working and I was able to encode the query and plug that in.

Thank you very much.

1 Like

Independently confirming @Aram does indeed rock!

4 Likes