Relevance to check results of action

I am looking for relevance to get the actions results of an action based on Time Issued. I would like to get number of total reported computers, number of completed, number of failed, and number of not reported, along with the completed/failed percentages. This is something I am assuming can be done since you can see it in the console.

image

1 Like

This can be done with Session Relevance, which can be used in many places, like Dashboards, Wizards, Web Reports, Session Relevance Tester, and more.

I would recommend trying this console dashboard, because I think it does what you want: https://github.com/jgstew/bigfix-content/blob/master/dashboards/BaselineStatusResults.ojo

1 Like

Stew,

This sounds great but I have never set up a new dashboard before. Is there documentation I can check out?

Yes, here: https://github.com/jgstew/bigfix-content/blob/master/dashboards/README.md#options-for-using-dashboards

If you just want to try a dashboard temporarily then you can enable the console debug menu and use the “load wizard” option. This is also what I would recommend when trying to create a new dashboard.

To just use an existing dashboard, especially if you want to make it available to all console operators, then I would recommend making a custom site called Custom Dashboards or similar with no computers subscribed, and then add the Dashboard.ojo file to the site. Give users read access that should be able to see the dashboard. Give users write access to the site that should be able to add or update dashboards.

Thanks for the information. However, what I am looking for is to use the API Query to get all the Baseline actions that are expired or open, the number of systems in the baseline, and percentage of completed, failed, or not relevant.

I also would like to take a step further and get the computer name of all the failed, completed or not relevant systems. This would be part two so not as important as the first part.

I know I can easily grab all the actions with the following statement:

names of top level bes actions whose(multiple flag of it AND “Open” = state of it or multiple flag of it AND “Stopped” = state of it or multiple flag of it AND “Expired” = state of it)

I am just having trouble putting together the number of systems in the baseline, and percentage of completed, failed, or not relevant.

Any help would be great.

I think what you want is “statuses of results of <bes action>”, as in

concatenation ";" of (multiplicity of it as string & " " & it) of unique values of (statuses of results of it as string) of (top level bes actions...)

Which gives a result like
16 Failed ;2066 Fixed ;60 Locked ;104 Waiting

One query that I’m using in a custom dashboard has some parameters that I tune based on a checklist control. For All Actions (including components of Baseline Actions), I use

/* Header Row */
(
 b of "ID" as html,
 b of "Link" as html,
 b of "Issuer" as html,
 b of "Site Name",
 b of "time issued" as html,
 b of "time expired" as html,
 b of "results" as html,
 b of "Computers" as html
);
/*Result Rows - must match data type of Header Row so cast "as html" */
(
 id of it as string as html,
 link of it,
 name of issuer of it as html,
 (if exists (names of sites of source fixlets of it) then name of site of source fixlet of it else "") as html,
 time issued of it as string as html,
 (if exists expiration time of it then expiration time of it as string else "") as html,
 concatenation ";" of (multiplicity of it as string & " " & it & " " as html) of unique values of (statuses of results of it as string)
,
"" as html
)
 of bes actions whose (state of it = "Open" and (if exists parent group of it then state of parent group of it = "Open" else true) and true)

To show only the Failed actions, and to list the computers on which it Failed, I use

/* Header Row */
(
 b of "ID" as html,
 b of "Link" as html,
 b of "Issuer" as html,
 b of "Site Name",
 b of "time issued" as html,
 b of "time expired" as html,
 b of "results" as html,
 b of "Computers" as html
);
/*Result Rows - must match data type of Header Row so cast "as html" */
(
 id of it as string as html,
 link of it,
 name of issuer of it as html,
 (if exists (names of sites of source fixlets of it) then name of site of source fixlet of it else "") as html,
 time issued of it as string as html,
 (if exists expiration time of it then expiration time of it as string else "") as html,
 concatenation ";" of (multiplicity of it as string & " " & it & " " as html) of unique values of (statuses of results of it as string)
,
concatenation (html("<br>")) of links of computers of results whose (status of it as string = "Failed") of it
)
 of bes actions whose (state of it = "Open" and (if exists parent group of it then state of parent group of it = "Open" else true) and  exists (statuses of results of it) whose (it as string = "Failed") )
1 Like

Jason,

This looks great. So the first statement you put up, if I wanted to go through every baseline that is open or expired and grab the name as well as over all results for each like you have posted then I should be able to use the multiple flag inspector with it ?

I think so; you should be able to change this “bes actions” to “top level bes actions” as you had earlier, and change my filter here to state of it = "Open" or state of it = "Expired"

Jason,

That worked thank you. However, hoping you good shed some light as to why I am getting and error:

“A string constant had no ending quotation mark”

When I try to run this statement using Bigfix API:

query?output=json&relevance=concatenation “;” of (multiplicity of it as string & " " & it) of unique values of (statuses of results of it as string) of bes actions whose(name of it = “WinBaseLine2008R2\w3b\201805051400”)

When you are using the API, you have to use “URL Encoding”. Depends some on the client you’re using, whether you have to do the encoding yourself or rely on your script/language/tool to do it for you.

A couple of nifty resources are


and

According to urlecoder.org you’d change your query to

query?output=json&relevance=concatenation%20%E2%80%9C%3B%E2%80%9D%20of%20%28multiplicity%20of%20it%20as%20string%20%26%20%22%20%22%20%26%20it%29%20of%20unique%20values%20of%20%28statuses%20of%20results%20of%20it%20as%20string%29%20of%20bes%20actions%20whose%28name%20of%20it%20%3D%20%E2%80%9CWinBaseLine2008R2%5Cw3b%5C201805051400%E2%80%9D%29

Jason,

The relevance you provided me works great but was wondering how I could change it so I could get the results for each baseline action, name and ID. I was hoping it could look like this or just output to json. Is this possible in a session relevance query?

ID 12345 | Name Winbaseline2012R2 | fixed 20 | failed 20 | 4 not relevant
ID 12346 | Name Winbaseline2008R2 | fixed 10 | failed 10 | 5 not relevant

this is the query that gives me all the results put together for every baseline.

concatenation “;” of (multiplicity of it as string & " " & it & " " as html) of unique values of (statuses of results of it as string) of top level bes actions whose(multiple flag of it AND “Open” = state of it or multiple flag of it AND “Stopped” = state of it or multiple flag of it AND “Expired” = state of it)

I have two statements I would like to combine.

(id of it,name of it ) of top level bes actions whose(multiple flag of it AND “Open” = state of it or multiple flag of it AND “Stopped” = state of it or multiple flag of it AND “Expired” = state of it)

concatenation “;” of (multiplicity of it as string & " " & it & " " as html) of unique values of (statuses of results of it as string) of top level bes actions whose(multiple flag of it AND “Open” = state of it or multiple flag of it AND “Stopped” = state of it or multiple flag of it AND “Expired” = state of it)

Any help would be great.

No console available to debug, but it should look something like

(id of it,name of it , concatenation “;” of (multiplicity of it as string & " " & it & " " as html) of unique values of (statuses of results of it as string) ) of top level bes actions whose(multiple flag of it AND “Open” = state of it or multiple flag of it AND “Stopped” = state of it or multiple flag of it AND “Expired” = state of it)

Hi Team,

I need to get the status of action.If the action is completed then I need to stop the action using relevance query.

Kindly anyone please help me on this.

Thanks,
Aiswarya Damodharan.