"Source Severity" for each of the patches

(imported topic written by SystemAdmin)

With this relevance below how would I also get the “Source Severity” for each of the Fixlets

(

name of item 1 of it, name of item 0 of it

)

of

(

source fixlets of components of component group of bes fixlets

whose

(

baseline flag of it = true

and

id of it = “BASELINE_MS10-002”

)

, members of bes computer group

whose

(

id of it = “GROUP_ALL_CITRIX_SERVERS”

)

)

whose

(

relevant

(

item 1 of it, item 0 of it

)

)

(imported comment written by Lee Wei)

Mamacher,

The statement does not look right because the IDs should be integers rather than the provided strings.

You might have to use: name of it = “BASELINE_MS10-002”, and the same for bes computer group.

Back to your question, item 0 refers to the Source Fixlets.

So the statement:

(name of item 1 of it, name of item 0 of it)

can be modified as follows to include source severity:

(names of item 1 of it, names of item 0 of it, source severity of item 0 of it)

In case Source Severity is Null, you are going to get an error, so the following is a statement that will error check and protect against that.

(

names of item 1 of it, names of item 0 of it,

(

if

(

exists source severity of item 0 of it

)

then

(

source severity of item 0 of it

)

else

(

“n/a”

)

)

)

Lee Wei

(imported comment written by SystemAdmin)

Last Question… :slight_smile:

First off, this is for a report, and the baseline and computer group are numbers… sorry

how would I get a “value of setting “GROUP” of client” which is a managed property

into the statement below

this works… fine but need extra setting value

name of item 1 of it, name of item 0 of it, source severity of item 0 of it

doesnt work…

name of item 1 of it, value of setting “GROUP” of item 1 of it, name of item 0 of it, source severity of item 0 of it

This is the working relevance without the “GROUP” info

EvaluateRelevance(’(name of item 1 of it, name of item 0 of it, source severity of item 0 of it) of (source fixlets of components of component group of bes fixlets whose (baseline flag of it = true and id of it is ’ + baselineName.value + '), members of bes computer group whose (id of it is ’ + computerGroup.value + ‘)) whose (relevant (item 1 of it, item 0 of it))’);

thanks in advance

(imported comment written by Lee Wei)

Mamacher,

There are 2 parts to this question.

Firstly, your Item 1 is a BES Computer object, so we need to find the construct to list any Retrieve Property.

The statement will look like the following.

(values of property results whose (name of property of it = 
"OS") of item 1 of it, name of item 1 of it, name of item 0 of it, source severity of item 0 of it)

OS is the example, and you can put any Retrieve Property in its place.

However, the client setting GROUP is not currently a Retrieve Property in your system. So you will have to add a new Retrieve Property and give it some name.

For example, MYGROUP has the relevane:

value of setting 
"GROUP" of client

Once the computers start reporting the property to the Server, you can run your query against the MYGROUP property.

Hope this makes sense,

Lee Wei

(imported comment written by SystemAdmin)

Thank you, yes it makes perfect sense.

The report Im using this in is “Relevant Baseline Fixlets Per Computer Group” and I wanted to add an additional field

called “1 - Group” this field is either “PROD” “NON PROD” this makes it easier for the business when we patch Prod and Non

the report now looks like below

NON PROD SERVER01 MS10-002 Cumulative Security Update for Internet Explorer - IE 6 Moderate

NON PROD SERVER02 MS10-002 Cumulative Security Update for Internet Explorer - IE 6 Critical

NON PROD SERVER03 MS10-002 Cumulative Security Update for Internet Explorer - IE 6 Moderate

PROD SERVER04 MS10-002 Cumulative Security Update for Internet Explorer - IE 6 Moderate

PROD SERVER05 MS10-002 Cumulative Security Update for Internet Explorer - IE 6 Moderate

PROD SERVER06 MS10-002 Cumulative Security Update for Internet Explorer - IE 6 Moderate

(

values of property results

whose

(

name of property of it as lowercase = “1 - group”

)

of item 1 of it,name of item 1 of it, name of item 0 of it, source severity of item 0 of it

)

of

(

source fixlets of components of component group of bes fixlets

whose

(

baseline flag of it = true

and

id of it is ’ + baselineName.value + ’

)

, members of bes computer group

whose

(

id of it is ’ + computerGroup.value + ’

)

)

whose

(

relevant

(

item 1 of it, item 0 of it

)

)

(imported comment written by SystemAdmin)

if I wanted to add another field to the query below how would I go about that

Original

( values of property results whose ( name of property of it as lowercase = 
"1 - group" )   of item 1 of it,name of item 1 of it, name of item 0 of it, source severity of item 0 of it ) of ( source fixlets of components of component group of bes fixlets whose ( baseline flag of it = 

true and id of it = 30038 ) , members of bes computer group whose ( id of it = 27912 ) ) whose ( relevant ( item 1 of it, item 0 of it ) )

produces output like this

NON PROD, SERVER01, MS10-002: Cumulative Security Update 

for Internet Explorer - IE 6 - Windows Server 2003 SP2 (x64), Moderate

what im looking for is to add another field like “LOCATION”

MILWAUKEE, NON PROD, SERVER01, MS10-002: Cumulative Security Update 

for Internet Explorer - IE 6 - Windows Server 2003 SP2 (x64), Moderate

the field “1 - group” is the PROD / NONPROD

I want to add a field called “location”

( values of property results whose ( name of property of it as lowercase = 
"1 - group" , name of property of it as lowercase = 
"location" )   of item 1 of it,name of item 1 of it, name of item 0 of it, source severity of item 0 of it ) of ( source fixlets of components of component group of bes fixlets whose ( baseline flag of it = 

true and id of it = 30038 ) , members of bes computer group whose ( id of it = 27912 ) ) whose ( relevant ( item 1 of it, item 0 of it ) )

above doesnt work, but thats the general idea ?

(imported comment written by Lee Wei)

It will be something like this:

(values of property results whose (name of property of it as lowercase = “location”) of item 1 of it, values of property results whose (name of property of it as lowercase = “1 - group”) of item 1 of it,name of item 1 of it, name of item 0 of it, source severity of item 0 of it) of (source fixlets of components of component group of bes fixlets whose (baseline flag of it = true and id of it = 30038) , members of bes computer group whose (id of it = 27912)) whose (relevant (item 1 of it, item 0 of it))

Lee Wei

(imported comment written by SystemAdmin)

wow, I tried so many different ways to combine these values and was pretty close to what you have,

I missed the “of item 1 of it,” between the 2 groups…

Thank you Lee

that works great

(imported comment written by SystemAdmin)

it seems that when i run the above query in the Presentation Debugger on a large list of computers it take on average about 45 seconds for it to return all results,

if i run it from the web server reports I get nothing, the only time i get something is when I use a computer group with like 5 - 10 servers in it…

then it returns the results in seconds… ?

is there a way to see whats going on ,

I do get an error “No Elements Found” in the Java Error Console ? on large sets of computers

(imported comment written by Lee Wei)

This is probably because when you test on a small subset, all the properties happen to exist.

When you run against the entire system, some computers might not be returning date. For example, missing Source Severity for Fixlet, or missing Computer Name for computers.

To protect and do error handling, you can change the item to include IF/THEN/ELSE constructs.

name of item 1 of it

(if (exists name of item 1 of it) then (name of item 1 of it) else (“None”))

source severity of item 0 of it

(if (exists source severity of item 0 of it) then (source severity of item 0 of it) else (“None”))

Lee Wei

(imported comment written by SystemAdmin)

I updated what you mentioned and added a few more error corrections… I now get results but it seems to be duplication each result

Heres the query

( values of property results whose ( ( 

if ( exists name of property of it ) then ( name of property of it ) 

else ( 
"<NO DATA>" ) ) as lowercase = 
"location" ) of item 1 of it, values of property results whose ( ( 

if ( exists name of property of it ) then ( name of property of it ) 

else ( 
"<NO DATA>" ) ) as lowercase = 
"1 - group" ) of item 1 of it, ( 

if ( exists name of item 1 of it ) then ( name of item 1 of it ) 

else ( 
"<NO DATA>" ) ) , ( 

if ( exists name of item 0 of it ) then ( name of item 0 of it ) 

else ( 
"<NO DATA>" ) ) , ( 

if ( exists source severity of item 0 of it ) then ( source severity of item 0 of it ) 

else ( 
"<NO DATA>" ) ) ) of ( source fixlets of components of component group of bes fixlets whose ( baseline flag of it = 

true and id of it = 
' + baselineName.value + ' ) , members of bes computer group whose ( id of it = 
' + computerGroup.value + ' ) ) whose ( relevant ( item 1 of it, item 0 of it ) )

Heres the output

AS-FLORENCE, PROD, SERVER01, UPDATE: Windows 2000 Service Pack 4 Available, Critical AS-FLORENCE, PROD, SERVER01, UPDATE: Windows 2000 Service Pack 4 Available, Critical AS-ATLANTA, PROD, SERVER02, UPDATE: Windows 2000 Service Pack 4 Available, Critical AS-ATLANTA, PROD, SERVER02, UPDATE: Windows 2000 Service Pack 4 Available, Critical AS-MIAMI, NON PROD, SERVER03, UPDATE: Windows 2000 Service Pack 4 Available, Critical AS-MIAMI, NON PROD, SERVER03, UPDATE: Windows 2000 Service Pack 4 Available, Critical AS-MIAMI, PROD, SERVER04, UPDATE: Windows 2000 Service Pack 4 Available, Critical AS-MIAMI, PROD, SERVER04, UPDATE: Windows 2000 Service Pack 4 Available, Critical

How and why is every line duplicated and how would I fix it…

Thanks

(imported comment written by Lee Wei)

mamacher,

When we have the tuples construct - (item0, item1, item2)

the results are actually the Product of the items.

If all your items return only one row, then it looks normal. However, it is possible in your case that either “location” or “1 - group” might be returning more than one row, causing the duplicates. Just my guess.

A simple example is that let’s say location is “IP Address”, and a computer has more than one IP addresses, then the results will look like this:

SERVER01, 192.168.0.10

SERVER01, 10.10.10.40

We can put a Concatenation function in front of the return values, and forcing them to generate only one row. This way, we might get the following result:

SERVER01, 192.168.0.10; 10.10.10.40

So, it your case, please try this:

( concatenation 
"; " of values of property results whose ((

if (exists name of property of it) then (name of property of it) 

else (
"<NO DATA>")) as lowercase = 
"location") of item 1 of it, concatenation 
"; " of values of property results whose ((

if (exists name of property of it) then (name of property of it) 

else (
"<NO DATA>")) as lowercase = 
"1 - group") of item 1 of it, (

if (exists name of item 1 of it) then (name of item 1 of it) 

else (
"<NO DATA>")) , (

if (exists name of item 0 of it) then (name of item 0 of it) 

else (
"<NO DATA>")) , (

if (exists source severity of item 0 of it) then (source severity of item 0 of it) 

else (
"<NO DATA>")) ) of (source fixlets of components of component group of bes fixlets whose (baseline flag of it = 

true and id of it = 
' + baselineName.value + ') , members of bes computer group whose (id of it = 
' + computerGroup.value + ')) whose (relevant (item 1 of it, item 0 of it))

I am appreciative of your efforts to get this working. Please send me an private message and I will help you get through the rest of the code.

Lee Wei

(imported comment written by SystemAdmin)

Sorry to bring this one back up but Im having issues again

the issue im having after putting all the checks in to take care of missing data

I get

Error: Singular expression refers to nonexistent object." in the presentation debugger

again “1 - group” is the “PROD/NON PROD” field

this is the “Baseline components per Computer group” with the 2 extra fields added

( concatenation 
"; " of unique values of values of property results whose ( ( 

if ( exists name of property of it ) then ( name of property of it ) 

else ( 
"<NO DATA>" ) ) as lowercase = 
"location" ) of item 1 of it, concatenation 
"; " of unique values of values of property results whose ( ( 

if ( exists name of property of it ) then ( name of property of it ) 

else ( 
"<NO DATA>" ) ) as lowercase = 
"1 - group" ) of item 1 of it, ( 

if ( exists name of item 1 of it ) then ( name of item 1 of it ) 

else ( 
"<NO DATA>" ) ) , ( 

if ( exists name of item 0 of it ) then ( name of item 0 of it ) 

else ( 
"<NO DATA>" ) ) , ( 

if ( exists source severity of item 0 of it ) then ( source severity of item 0 of it ) 

else ( 
"<NO DATA>" ) ) ) of ( source fixlets of components of component group of bes fixlets whose ( baseline flag of it = 

true and id of it = 34390 and name of it as string starts with 
"__" ) , members of bes computer group whose ( id of it = 34279 ) ) whose ( relevant ( item 1 of it, item 0 of it ) )

(imported comment written by SystemAdmin)

as it turns out the line "name of it as string starts with “"" caused it to not be relevant to any baseline unless I named it "

removing that line seems to have resolved the issue

(imported comment written by SystemAdmin)

another question along the same lines,

I’m trying to return data in relevance below but if something is or missing or in error the query fails and returns nothing

how would I put error checking in each of the lines below

(

names of it

, “|”

, concatenation “,” of unique values of values of (results from (bes property “IP address”) of it)

, “|”

, values of (results from (bes property “1 - Group”) of it)

, “|”

, values of (results from (bes property “Domain/Workgroup”) of it)

, “|”

, values of (results from (bes property “FQDN”) of it)

, “|”

, values of (results from (bes property “iLo Address”) of it)

, “|”

, values of (results from (bes property “Computer Model”) of it)

, “|”

, values of (results from (bes property “Location”) of it)

, “|”

, operating systems of it

, “|”

, cpus of it

, “|”

, last report times of it

)

of bes computers whose (name of it as lowercase = “server”)

(imported comment written by Lee Wei)

The statement will look something like this:

(if exists results from (bes property “FQDN”) of it

then values of (results from (bes property “FQDN”) of it)

else “None”)

(imported comment written by SystemAdmin)

(

names of it, (if exists (results from (bes property “Location”) of it) then (values of (results from (bes property “Location”) of it)) else “None”)

)

of bes computers whose (name of it as lowercase = “server”)

when I run above I just get “Results: 0 items returned”

the server has no property “Location” yet, it is a property that is manually set

if I run this below I get “True” ???

exists results from (bes property “Location”) of bes computers whose (name of it as lowercase = “server”)

(imported comment written by Lee Wei)

This is probably because the result exists, but the value returned is empty.

Try this, it will check to make sure there is a response from the server, and the value of the response is not null.

(

names of it,

( if ( (exists it and exists value of it) of result from (bes property “Location”) of it)

then (values of (results from (bes property “Location”) of it))

else “None”) )

of bes computers whose (name of it as lowercase = “server”)

(imported comment written by SystemAdmin)

that worked perfectly… thank you

( names of it , 
"|" , concatenation 
"," of unique values of values of (results from (bes property 
"IP address") of it) , 
"|" , (

if ( (exists it and exists value of it) of result from (bes property 
"1 - Group") of it) then values of (results from (bes property 
"1 - Group") of it) 

else 
"None") , 
"|" , (

if ( (exists it and exists value of it) of result from (bes property 
"Domain/Workgroup") of it) then values of (results from (bes property 
"Domain/Workgroup") of it) 

else 
"None") , 
"|" , (

if ( (exists it and exists value of it) of result from (bes property 
"FQDN") of it) then values of (results from (bes property 
"FQDN") of it) 

else 
"None") , 
"|" , (

if ( (exists it and exists value of it) of result from (bes property 
"iLo Interface") of it) then values of (results from (bes property 
"iLo Interface") of it) 

else 
"None") , 
"|" , (

if ( (exists it and exists value of it) of result from (bes property 
"Computer Model") of it) then values of (results from (bes property 
"Computer Model") of it) 

else 
"None") , 
"|" , (

if ( (exists it and exists value of it) of result from (bes property 
"Location") of it) then values of (results from (bes property 
"Location") of it) 

else 
"None") , 
"|" , operating system of it , 
"|" , cpu of it , 
"|" , last report time of it ) of bes computers whose (name of it as lowercase = 
"server")

(imported comment written by SystemAdmin)

Lee Wei

This is probably because the result exists, but the value returned is empty.

Try this, it will check to make sure there is a response from the server, and the value of the response is not null.

(
names of it,
( if ( (exists it and exists value of it) of result from (bes property “Location”) of it)
then (values of (results from (bes property “Location”) of it))
else “None”) )
of bes computers whose (name of it as lowercase = “server”)

Still having troubles with this…

if the value is " which many seem to be in that state, it still fails…

(

names of it ,

(

if

(

(

exists it

and

exists value of it

)

of result from

(

bes property “iLo Interface”

)

of it

)

then

(

values of

(

results from

(

bes property “iLo Interface”

)

of it

)

)

else

“None”

)

)

of bes computers

whose

(

name of it as lowercase = “server”

)