Create OMS Computer Groups Based on Operating System and Versions

I was working with a customer today and I was asked the question: “Why aren’t computers automatically grouped by OS (Linux and Windows) in OMS?  Further, if computers are not  automatically grouped by OS, is there an easy way to create this grouping?  Like SCOM, OMS is very flexible so my canned answer to questions like these is always “we can most likely make it happen”.  That said, I had not looked at his particular scenario so I was anxious to dig in and discover the answers for myself.

After a bit of investigation, I was happy to see that the new Heartbeat data does include fields for OSType, OSMajorVersion, and OSMinorVersion.  Using these fields we can very easily create computer groups based on OS and OS versions.  Nice!

Creating groups in OMS is quite easy, and grouping by OS is no exception.  Like everything in OMS, it’s all about knowing which fields to use for filtering and shaping views to display the output you are looking for.  In this case, I want to create 2 top-level groups, 1 of Linux and 1 for Windows Computers.  Additionally, I want to take it a bit further and create computer groups based on OS version.  Let’s get started.

NOTE:  If you are not getting Heartbeat data for Linux agents update the agent to the latest version and the issue should be resolved.  You can find the Linux agent available for download here.

  1. Navigate to the Log Search page and enter the following query to display Heartbeat entries:  Type=HeartbeatOS2
  2. To filter the query by OS, add the following syntax to the query. In this case I am grouping all Linux computers:  Type=Heartbeat OSType=Linux OSNew
  3. Now that I am only displaying computers with the OSType Linux, I am ready to create my group.  To create a group, I simply pipe my query to filter by “Distinct Computer”:  Type=Heartbeat OSType=Linux | Distinct ComputerOSNew1
  4. To create the computer group, select the save icon on the top left, fill out the name and category fields, select Yes to save the query as a computer group and select save.  Click here for more detailed information about creating OMS computer groups.NewOS2
  5. We now have a Linux Computers group which can be used for targeting queries.  In the following example I am targeting a performance query for % Memory Used at the Linux Computers group.OS-1
  6. We can take it a step further and create groups based on OS version.  In the following example I’m creating a Linux Computer Group for Ubuntu 15.10NewOS3.png
  7. We simply use the same logic applied to create the Linux computer groups above to create Windows computer and OS version groups.  We simply substitute OSType=Linux for OSType=Windows.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s