IC SunsetThe developerWorks Connections platform will be sunset on December 31, 2019. On January 1, 2020, this forum will no longer be available. More details available on our FAQ.
Topic
  • 10 replies
  • Latest Post - ‏2010-02-24T16:54:38Z by Lee Wei
koldenbu91
koldenbu91
7 Posts

Pinned topic Custom Report for Action Info

‏2009-12-16T22:07:04Z |
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.
  • Lee Wei
    Lee Wei
    599 Posts

    Re: Custom Report for Action Info

    ‏2009-12-17T00:03:31Z  
    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
  • koldenbu91
    koldenbu91
    7 Posts

    Re: Custom Report for Action Info

    ‏2009-12-18T17:52:52Z  
    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
  • Lee Wei
    Lee Wei
    599 Posts

    Re: Custom Report for Action Info

    ‏2009-12-18T18:04:30Z  
    koldenbu,

    Can you please post your Relevance statement?
    Something like the following:

    <?relevance (html "<option value=%22" & item 2 of it & html "%22>" & item 0 of it & " (" & item 1 of it & ")" & html "</option>") 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
  • koldenbu91
    koldenbu91
    7 Posts

    Re: Custom Report for Action Info

    ‏2009-12-18T19:51:34Z  
    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?
  • Lee Wei
    Lee Wei
    599 Posts

    Re: Custom Report for Action Info

    ‏2009-12-18T19:58:22Z  
    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 "</option>") 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.
  • koldenbu91
    koldenbu91
    7 Posts

    Re: Custom Report for Action Info

    ‏2009-12-21T12:30:53Z  
    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 "<option value=%22" & item 2 of it & html "%22>" & item 0 of it & " (" & item 1 of it & ")" & html "</option>") 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')?>
  • Lee Wei
    Lee Wei
    599 Posts

    Re: Custom Report for Action Info

    ‏2009-12-24T06:47:19Z  
    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
  • RosaMartin
    RosaMartin
    5 Posts

    Re: Custom Report for Action Info

    ‏2010-02-23T18:20:47Z  
    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
  • Lee Wei
    Lee Wei
    599 Posts

    Re: Custom Report for Action Info

    ‏2010-02-24T16:54:38Z  
    See post: http://forum.bigfix.com/viewtopic.php?id=4639
  • Lee Wei
    Lee Wei
    599 Posts

    Re: Custom Report for Action Info

    ‏2011-12-08T18:12:28Z  
    Here is the report attachment.