Identify computers without a Computer Group

(imported topic written by JamesFord)

I have searched the forums and too my surprise could not find a solution to this issue, I"m assuming I am overlooking something simple. Here is my problem, we have to manage an organization with thousands of assets and currently assigning items is a manual process and installing agents happens by independent parties who do not have access to the console to ensure the computer gets added to the appropriate groups. I would like to create an automated group that is composed of all computers that do not have a computer group assigned, then this group could be used to generate reports and email certain individuals when new computers show up. Does anyone know how to accomplish this or have a better suggestion on how to maintain computer assets? I’m assuming this could be done with the Relevance language but unfortunately I have been unable to find the proper relevance search to produce the desired results.

(imported comment written by Lee Wei)

You are correct that you will have to write a Session Relevance query to get the desired output.

The conceptual solution would be as follows.

Use the Set operator in Session Relevance.

(All Computers) minus ( union of All Computers in All Available Computer Groups)

Lee Wei

(imported comment written by JamesFord)

Thanks Lee, any idea how to use this in an automatic group? It looks like you can only evaluate if a relevant expression is true or false when creating automatic groups so I guess I need to create a relevance expression that checks to see if the computer has a computer group, do you know what the relevance expression for this would be? Or do you know a better way to alert administrative personnel that new client machines have been added and need to be assigned to a group?

(imported comment written by Lee Wei)

There is not a way to ask the Client if it belongs to a Computer Group. This is a query that should be performed on the server side.

Hence writing a Session Relevance (this means on the server, versus Client Relevance which is executed on the agent side) is the best way to go.

Lee Wei

(imported comment written by Lee Wei)

Here are a few example statements that might be useful.

A Set of all computers

set of bes computers

This will show the number of computers in the system, it is equivalent to the simple “number of bes computers”, but written this way as an example for you to work with the Set operator

number of elements of set of bes computers

Union of Sets of the the computer groups you have. The result is a count of all computers belonging to at least one computer group. Note that an Element of a Set in this case is of type “BES Computer”

number of elements of union of member sets of bes computer groups

Here is the statement that will list the names of the Computers not belonging to any groups.

(name of it, operating system of it) of elements of ((set of bes computers) - (union of member sets of bes computer groups))

Lee Wei

(imported comment written by JamesFord)

Lee,

Thanks for the response, I have had no luck so far. Using the web reports QNA page to evaluate the session relevance statements it keeps giving me an error stating “Singular expression refers to nonexistent object.” Any thoughts?

(imported comment written by Lee Wei)

Can you please show us the Session Relevance statement that you entered?

Better still take a screen shot so that we can see the exact messages.

Lee Wei

(imported comment written by JamesFord)

Attached is a screenshot of the session relevance and the response from web reports.

(imported comment written by JamesFord)

I think I figured it out, needed to add the plural version of names and operating systems, the following session relevance evaluated correctly:

(names of it, operating systems of it) of elements of ((set of bes computers) - (union of member sets of bes computer groups))

Now I just need to figure out how to make this into a custom report which can be emailed to the appropriate administrator on a regular basis, any pointers or documents that will shed some light on creating custom web reports?

Thanks in advance!!!

(imported comment written by JamesFord)

So for those of you who have the same problem, here is the current solution, still working on making this pretty, but essentially you can create a custom web report using the following code. Go to “
Web Reports
” >> “
Explore Data
” >> “
Custom
” and click “
Edit Source
” and paste the following:

<?relevance (names of it, operating systems of it, ip addresses of it, active directory paths of it, last report times of it) of elements of ((set of bes computers) - (union of member sets of bes computer groups)) ?>

Hit preview to confirm it is working, then save the report. You can now schedule this report to run on a periodic basis and email the appropriate administrator to take action on assets which are unassigned to an appropriate computer group.

If anyone knows how to correctly add a data grid that allows you to sort by column headers to web reports, please let me know.