I’m looking to create a simple report that exports as follows :
Computer | Critical | Important | Moderate | Low |
Comp1 4 7 4 0
Comp2 2 0 5 2
Is this possible? I know I can list the Computer name and the amount of relevant fixlets, but I don’t seem to be able to then split the fixlets into thier severity.
Here is some code you can paste into a custom report in Web Reports 6.0.
You may find that it takes a little while to run in a large deployment. You will also likely want to sort the tables, or refine it only include fixlets from particular sites, or only a subset of computers. If you have any trouble modifiying the code to do any of those things, let us know.
Computer Name
Critical
Important
Moderate
Low
<?relevance trs of (td of name of it & td of (number of relevant fixlets whose (source severity of it as lowercase = "critical") of it as string) & td of (number of relevant fixlets whose (source severity of it as lowercase = "important") of it as string) & td of (number of relevant fixlets whose (source severity of it as lowercase = "moderate") of it as string) & td of (number of relevant fixlets whose (source severity of it as lowercase = "low") of it as string)) of bes computers ?>
Great report, thanks for the code. I am however, having problems sorting them into a more structured format. At the moment we have an automatic group that groups any computer within a certain OU and it would be ideal to be able to add this as a column in the report.
Is this possible at all? When I used our “group computer” filter, it didn’t make any difference to the report. I looked at adding this as code but couldn’t see the correct commands for this.
what steps do I need to take to make the tables sortable?
There are 2 basic steps:
Load the sorting code
a. There are 2 ways to do this.
You can paste the contents of sorttable.js at the bottom of code for the report, enclosed in tags.
You can link the file in from an external location. This is the way I prefer so that I can include the script in multiple reports. Add this tag at the top of the report:
You will then need to add the sorttables.js file to the specified path. In this example, you would place the file at the root of the web reports server. By default:
Here’s a final version that will work if you place the sorttable.js file in the location I specified above:
<script type=
"text/javascript" src=
"../../sorttable.js"></script> <table class=
"sortable" id=
"results_table"> <tbody> <tr><th>Computer Name</th><th>Critical</th><th>Important</th><th>Moderate</th><th>Low</th></tr> <?relevance trs of (td of name of it & td of (number of relevant fixlets whose (source severity of it as lowercase =
"critical") of it as string) & td of (number of relevant fixlets whose (source severity of it as lowercase =
"important") of it as string) & td of (number of relevant fixlets whose (source severity of it as lowercase =
"moderate") of it as string) & td of (number of relevant fixlets whose (source severity of it as lowercase =
"low") of it as string)) of bes computers ?> </tbody> </table>
rharmer
This is very nice. Something that should be added to the base product or as an addon.
Yes, this has proven very popular. We will likely publish this one officially.
craigsmallman
When I used our “group computer” filter, it didn’t make any difference to the report.
I didn’t have any problems applying filters to this report. I tried a computer group filter and a retrieved properties filter. When you tried did the report show that a filter was applied above the column headings?
I didn’t have any problems applying filters to this report. I tried a computer group filter and a retrieved properties filter. When you tried did the report show that a filter was applied above the column headings?
Thanks again for the great code and your time. This is indeed perfect for our needs. When I ran the filter again, I noticed that all of my filters had been lost. I have no idea why this happened, but it does mean I have to recreate them all. The only thing I did was upgrade everything to the latest version but I dont see why that would effect it. Anyway, that would be the reason why the grouping didn’t work. I’ll redo the filters and try again.
Any way to expand this report to make each computer expandable so that you could list out which fixes where required?
Yes. If you change the line that starts: <?relevance trs of (td of name of it …
So that it says: <?relevance trs of (td of link of it …
That will make the names of the computers into links. Simply click on the computer name and it will take you the computer report for that machine. On the computer report will be a section with the relevant fixlets.
I have a manager looking for a report called “Compliance of approved patches”
I am thinking that this would be a similar report to the one you’ve been working with here, but I’d need to apply a computer group(s) and multiple baselines to the report.
Awesome…it would be great to see this one added to the canned reports. Great works guys…
I’d also like to be able to sort and filter on the location by ip groups I have done. This way I can get that exact info by location…as I have 200 + subnets.