Self archiving Application Usage Report

(imported topic written by Veneficus)

Hi there,

I need a custom report that shows the same data that the Console shows when you go to the Application Usage Information for a specific application.

I am after following information

Computers that have run Adobe Acrobat less than more than exactly x times

Computers that have run Adobe Acrobat within the last hours days weeks

Computers that have not run Adobe Acrobat within the last hours days weeks

Computers that first ran Adobe Acrobat within the last hours days weeks

Computers that first ran Adobe Acrobat before hours days weeks ago

Computers that have run Adobe Acrobat a total duration of more than less than hours days weeks

I need to be able to make this custom report as a self archiving report (5min interval).

Can anyone help?

Thanks,

Ven

(imported comment written by BenKus)

Hey Ven,

As you probably know, all the information you requested is available in the application tracking dashboard under the “Custom Statistics” section. In this section, you can VERY easily get information on the number of computers that have run the application in exactly the ways you want. You can then click on the number and get a list of the computers that math your query. (See attached picture.)

But it sounds like you are looking for more specific custom reports that you can periodically archive and probably automatically send to the licensing people? If so, you can use the custom report ability to create exactly the report you want based off the underlying application tracking data the BES Client is already collecting.

Here is what you want to do to create archived custom reports for custom application tracking statistics:

  1. The first step is to enable application tracking for Adobe Acrobat. This can be done easily by using the “Application Tracking Information” Dashboard, which is part of the “BES License and Inventory” Fixlet site. Find “Adobe Acrobat” in the list and then target the tracking to all the computers you wish to track (make it a policy action to track new computers that come into your deployment).

  2. Now you want to create the custom report with the statistics you asked for. To do this, you need to use our custom reports ability. I will get your started with a report that will list out some key statistics:

    Adobe Acrobat Application Usage Statistics

    Query Number of computers
    Run less than 10 times <?Relevance number of computers of (results (applicable computers of item 0 of it, item 1 of it)) whose (exists value whose (tuple string item 0 of it as integer < 10) of it) of (bes fixlet whose (name of it = "Application Usage Tracking Analysis: Adobe Acrobat"), bes property whose (name of it = "Application Usage Summary: Adobe Acrobat"))?>
    Run in the last 2 days <?Relevance number of computers of (results (applicable computers of item 0 of it, item 1 of it)) whose (exists value whose (tuple string item 2 of it as time > (now - (2 * day))) of it) of (bes fixlet whose (name of it = "Application Usage Tracking Analysis: Adobe Acrobat"), bes property whose (name of it = "Application Usage Summary: Adobe Acrobat"))?>
    First ran before the 72 hours ago <?Relevance number of computers of (results (applicable computers of item 0 of it, item 1 of it)) whose (exists value whose (tuple string item 1 of it as time < (now - (72 * second))) of it) of (bes fixlet whose (name of it = "Application Usage Tracking Analysis: Adobe Acrobat"), bes property whose (name of it = "Application Usage Summary: Adobe Acrobat"))?>

This will generate a report that looks like:

Adobe Acrobat Application Usage Statistics

Query Number of computers

Run less than 10 times 103

Run in the last 2 days 14

First ran before the 72 hours ago 1243

  1. Set this up as a custom report in BES Web Reports using the simple instructions at http://support.bigfix.com/bes/misc/customreports.html

  2. Save this report as a “Private Report”

  3. Use the “Scheduled Activity” behavior in Web Reports to archive this report periodically (5 minutes sounds excessive though… how about archive the report daily?)

Ben

(imported comment written by BenKus)

To expand on this custom report a bit, you will note from my sample code above, that the relevance query (using session relevance which is pre-processed and stuck into the HTML directly by the web reports) is very similar in each instance. In looks basically like this:

<?Relevance number of computers of (results (applicable computers of item 0 of it, item 1 of it)) whose (exists value whose (tuple string item 2 of it as time > (now - (2 * day))) of it) of (bes fixlet whose (name of it = "Application Usage Tracking Analysis: Adobe Acrobat"), bes property whose (name of it = "Application Usage Summary: Adobe Acrobat"))?>

I have bolded the pieces that you will change. The first option "tuple string item of it as " can be changed to:

  • tuple string item 0 of it as integer --> Number of times run
  • tuple string item 1 of it as time --> First time ran
  • tuple string item 2 of it as time --> Last time seen running
  • tuple string item 3 of it as time interval --> Total duration run

The second bolded piece will be changed depending on the metric you want to use. For instance:

  • tuple string item 0 of it as integer <= 20
  • tuple string item 1 of it as time > (now - 30 * day)
  • tuple string item 3 of it as time interval < (10 * hour)

Hopefully this helps you create your custom report. You can go crazy with the HTML and customize it completely.

Ben

(imported comment written by Veneficus)

Hi Ben,

One other question. How can I get more details like following:

ComputerID, ComputerName, How many times Adobe Acrobat run, Date Last run, date first run

Thanks,

Ven

(imported comment written by BenKus)

Hey Ven,

To get this type of data, you would do:

<table> <tbody> <th>Computer ID</th> <th>Computer Name</th> <th>OS</th> <th>Times Adobe Acrobat Ran</th> <th>Date First Run</th> <?relevance trs of ( td of (id of it as string) & td of name of it & td of value of result (it, bes property 
"OS") & td of tuple string item 0 of value of result (it, bes property 
"Application Usage Summary: Adobe Acrobat") & td of tuple string item 1 of value of result (it, bes property 
"Application Usage Summary: Adobe Acrobat") ) of bes computers whose (exists result (it, bes property 
"Application Usage Summary: Adobe Acrobat") whose (exists value of it AND error flag of it = 

false AND exists tuple string item 0 of value of it )) ?> </tbody> </table>

Hopefully that is straight-forward to build off of. Note the “whose clause” after the “bes computers” is all error checking to make sure the results exist in the appropriate format.

Ben

(imported comment written by Veneficus)

Hi Ben,

Thanks for your help. There is only one problem left though, Scheduler doesn’t seem to schedule any Custom Report. So, how can I schedule this report now? :slight_smile:

(imported comment written by jessewk)

Ven,

You need to ‘Store’ the report before it can be scheduled. See this thread:

http://forum.bigfix.com/viewtopic.php?id=94

-Jesse

(imported comment written by Veneficus)

Ok so now I managed to store the report. But it does a poorjob comverting the html table to .csv.

I guess I can use following format to make the data CSV:

(id of it as string) & “,” & (name of it) & “,” & (value of result (it, bes property “OS”))

But, How can I finish this line with carriage return & line feed?

(imported comment written by jessewk)

Ven,

If you want a carriage return & line feed, you can concatenate “%0a%0d” anywhere you want a new line.

But, I think that you actually want to append an HTML

to get the results you want. Here’s a relevance clause that will do that for the OS property.

<?relevance ( (id of it as string) & "," & name of it & ","& value of result (it, bes property "OS") & br ) of bes computers whose (exists result (it, bes property "OS") whose (exists value of it AND error flag of it = false AND exists tuple string item 0 of value of it )) ?>