Custom Report for Action Info

(imported topic written by koldenbu91)

Does anyone know how to create a custom report which will give you the same info by device as is displayed in the Console when you show the Action Info. I would like to see a list of say servers for an action and the status such as “Fixed”, “Pending Restart”, “Failed” etc.

(imported comment written by Lee Wei)

koldenbu,

I created a simple report for you.

Right now it retrieves all the Actions, irrespective of their current State.

You can change that by editing line 87 and change “bes actions” to one of the following:

  • bes actions whose (state of it = ‘Open’)
  • bes actions whose (state of it = ‘Stopped’ or state of it = ‘Expired’)

Lee Wei

(imported comment written by Lee Wei)

Here is the report attachment.

(imported comment written by koldenbu91)

Thanks,

I put in the syntax that you suggested and I receive nothing to report on from the drop down list.

Can you please help

(imported comment written by Lee Wei)

koldenbu,

Can you please post your Relevance statement?

Something like the following:

<?relevance (html "" & item 0 of it & " (" & item 1 of it & ")" & html "") of (preceding text of first "||" of it, following text of last "||" of it, preceding text of first "||" of following text of first "||" of it) of unique values of(name of it & "||" & id of it as string & "||" & ((year of it as string & "/" & month of it as two digits & "/" & day_of_month of it as two digits) of date(local time zone) of it & " "& (two digit hour of it as string & ":" & two digit minute of it as string & ":" & two digit second of it as string) of time (local time zone) of it) of time issued of it as string) of bes actions ?>

I will take a look at the modified statement.

Lee Wei

(imported comment written by koldenbu91)

I just copied your Script and created a new report but changed the lines you suggested such as bes actions whose (state of it = ‘Open’)

The rest of the report is what you had sent. Is there something else I should have done?

(imported comment written by Lee Wei)

We need to verify that whatever you changed has the right construct, and that the query returns the appropriate results.

You can take the relevance query, without the <?relevance ?> tag and run it in Web Reports.

Go to http://corona:52312/webreports?page=QNA

Then paste the modified query:

(html “<option value=%22” & item 2 of it & html “%22>” & item 0 of it & " (" & item 1 of it & “)” & html “”) of (preceding text of first “||” of it, following text of last “||” of it, preceding text of first “||” of following text of first “||” of it) of unique values of(name of it & “||” & id of it as string & “||” & ((year of it as string & “/” & month of it as two digits & “/” & day_of_month of it as two digits) of date(local time zone) of it & " "& (two digit hour of it as string & “:” & two digit minute of it as string & “:” & two digit second of it as string) of time (local time zone) of it) of time issued of it as string) of bes actions

  • We should either get an error in the query, or
  • the results is just empty. If this is the case, we need to make sure that there are indeed Open actions.

Can you just show me the query used anyways? Thanks.

(imported comment written by koldenbu91)

Here are some of the actions that are open. I have taken out the user info for privacy reasons. Below that is your request.

12/18/2009 2:39:36 PM Open 0.00% (0/496) MS09-069 - 074 to Workstations (12/23/2009) - NO REBOOT\NO EXPIRE Action Group

12/18/2009 2:30:32 PM Open 1.89% (10/528) MS09-069 - 074 to Workstations (12/21/2009) Action Group

12/18/2009 2:24:48 PM Open 88.35% (3920/4437) MS09-069 - 074 to Workstations (12/18/2009) Action Group

12/17/2009 1:35:52 PM Open 100.00% (4/4) BES Client Setting: Unlock Computer Single Action

12/17/2009 1:33:09 PM Open 100.00% (4/4) BES Client Setting: Lock Computer for Unix Single Action

I can not access the web site http://corona:52312/webreports?page=QNA. It states that the page can not be displayed. As you can see I do have specific open actions. Below is the query using the “Open”.

<?relevance (html "" & item 0 of it & " (" & item 1 of it & ")" & html "") of (preceding text of first "||" of it, following text of last "||" of it, preceding text of first "||" of following text of first "||" of it) of unique values of(name of it & "||" & id of it as string & "||" & ((year of it as string & "/" & month of it as two digits & "/" & day_of_month of it as two digits) of date(local time zone) of it & " "& (two digit hour of it as string & ":" & two digit minute of it as string & ":" & two digit second of it as string) of time (local time zone) of it) of time issued of it as string) of bes actions whose (state of it = 'Open')?>

(imported comment written by Lee Wei)

Hi Koldenbu,

It is my fault that I gave you the statement with single quote. The BigFix string needs to be in double quotes.

So please use - (state of it = “Open”).

Sorry about that!

Lee Wei

(imported comment written by RosaMartin)

can this be done via an SQL script and the views? is so what would be the correct syntax. This is what I currently have but it seems to be pulling all actions - please help!

SELECT BES_ACTIONS.ActionID, BES_ACTIONS.ComputerID,

BES_ACTIONS.FixletID, BES_ACTIONS.Name,

BES_ACTIONS.Username, BES_ACTIONS.StartTime, ACTIONRESULTS.EndTime As ExpirationDate,

BES_ACTIONS.Sitename, BES_ACTIONS.ActionStatus

FROM BFEnterprise.dbo.ACTIONRESULTS INNER JOIN BFEnterprise.dbo.BES_ACTIONS ON ACTIONRESULTS.ActionID = BES_ACTIONS.ActionID

thank you

(imported comment written by Lee Wei)

See post: http://forum.bigfix.com/viewtopic.php?id=4639

Hi Leewei - Just wondering if I need to run a Custom Action script targeting a group (say 100s of them) so that I can pull info such the OS version, Agents version and hostames. I need to import all these output into a Web report or Excel. I tried this on one system , It was successful but i cannot find the output -
First , where I can find the output on the console (in summary it does not mentioned besides success) - The Bigfix Console is Window while my test is on Linux.
Your response is very much appreciated