Number of applicable fixlets to specific computer

(imported topic written by mxc0bbn)

I’m trying to figure out the best way to get the number of applicable fixlets to a particular machine. What I would eventually like to do is get a percentage of applicable fixlets to total fixlets for a specific computer. That is something that Web Reports doesn’t seem to have and I’m trying to figure out how to add it.

I figure if I can create the appropriate session relevance expression for getting the number of applicable fixlets for a specific computer I can always just do the math in a property and get it…but can’t seem to figure out the exact syntax.

(imported comment written by cstoneba)

hi, i’d suggest taking a look at the Compliance by Computer Group webreport. it can provide a compliance percentage against a single host or a group of hosts.

https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014743529

(imported comment written by Mark_Macherey)

Here’s a way to get the number of fixlets if you want to try these in the fixlet debugger you will need to set //, I have attached the analysis below

number of values of headers “Subject” of relevant fixlets of sites

to remove dupes

number of unique values of values of headers “Subject” of relevant fixlets of sites

Here’s some I use for relevant MS patches

Relevant Fixlet Count (Total) MS PATCHES

number of unique values of preceding texts of firsts “:” of values of headers “Subject” of relevant fixlets whose (value of headers “Subject” of it starts with “MS”) of sites whose (name of it = “Enterprise Security”)

Relevant Fixlet Count (ALL Fixlets <30 days) MS PATCHES

concatenation ", " of unique values of preceding texts of firsts “:” of values of headers “Subject” of relevant fixlets whose (value of headers “Subject” of it starts with “MS” and current date - value of header “X-Fixlet-Source-Release-Date” of it as date <= 30*day) of sites whose (name of it = “Enterprise Security”)

Relevant Fixlet Count (ALL Fixlets <60 days) MS PATCHES

concatenation ", " of unique values of preceding texts of firsts “:” of values of headers “Subject” of relevant fixlets whose (value of headers “Subject” of it starts with “MS” and current date - value of header “X-Fixlet-Source-Release-Date” of it as date <= 60*day) of sites whose (name of it = “Enterprise Security”)

Relevant Fixlet Count (ALL Fixlets <90 days) MS PATCHES

concatenation ", " of unique values of preceding texts of firsts “:” of values of headers “Subject” of relevant fixlets whose (value of headers “Subject” of it starts with “MS” and current date - value of header “X-Fixlet-Source-Release-Date” of it as date <= 90*day) of sites whose (name of it = “Enterprise Security”)

Relevant Fixlet Count (older then 90 days)

number of unique values of preceding texts of firsts “:” of values of headers “Subject” of relevant fixlets whose (value of headers “Subject” of it as lowercase starts with “ms” and current date - value of header “X-Fixlet-Source-Release-Date” of it as date >= 90*day) of sites whose (name of it = “Enterprise Security”)

Relevant Fixlet Count (ALL MS Fixlets older then 90 days)

concatenation ", " of unique values of preceding texts of firsts “:” of values of headers “Subject” of relevant fixlets whose (value of headers “Subject” of it as lowercase starts with “ms” and current date - value of header “X-Fixlet-Source-Release-Date” of it as date >= 90*day) of sites whose (name of it = “Enterprise Security”)

(imported comment written by BrianPGreen)

It would be easier to figure this out using session relevance. To get the number of relevant fixlets for a particular computer:

size of relevant fixlet set of (bes computer whose (id of it = 123))

To get the number of relevant fixlets for all computers:

(“Computer " & (id of it as string) & " has " & (size of relevant fixlet set of it as string) & " relevant fixlets”) of bes computers

(imported comment written by BrianPGreen)

The easiest way to figure out what you can do with session relevance is to use the ‘properites’ inspector. For example, for this problem, I would start off with:

properties whose (it as string contains “relevant”)

and then go from there.