cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post

Custom SWQL VM Manager

This is just a simple SWQL query that I use to manage and view all of the virtual machines living in our vmWare vCenter environment.

I am able to quickly, and easily, search by server/vm name, IP address, hostname, whether it is being monitored or not, and if it is powered on or off.

The attached rar file includes various vendor/os icons, as well as a "SWQL_CustomQuery_VM_ViewManager.swql" file.

Simply open this file in notepad, or another text editor, copy it, and paste it into a "Custom Query" resource.

Copy lines 1-50, and paste them into the first box, "Custom SWQL Query", after you click the edit button on the "Custom Query" resource.

To enable the search features, you will need to make sure to click the "enable search" button, and then copy the entire query, and paste it into the 'Search SWQL Query" box.

There were a few vendor/os icons that I have included in the attached file, as I did not find all of the default icons to my liking.

If you want to use the icons in the attachment, then you will need to extract them, and place them in the following location on your main web server.

\inetpub\SolarWinds\NetPerfMon\images\Vendors\

If you do not want to use the icons, you will need to adjust the SWQL query, and remove/redirect the lines that point to those icon locations.(change bold/italicized part to match the icon you want it to show, or entirely remove the lines that have a bold/italicized part.)

'/NetPerfMon/images/Vendors/' +

  CASE

  WHEN VM.GuestName LIKE '%Red Hat Enterprise%' THEN '2312'

  WHEN VM.GuestName LIKE '%suse%' THEN '16_suse'

  WHEN VM.GuestName LIKE '%centos%' THEN '16_centos'

  WHEN VM.GuestName LIKE '%ubuntu%' THEN '16_ubuntu'

  WHEN VM.GuestName LIKE 'Other% Linux%' THEN '2021'

  WHEN VM.GuestName LIKE '%Microsoft Windows 7%' THEN '16_windows7'

  WHEN VM.GuestName LIKE '%Microsoft Windows Server%' THEN '16_windows_generic'

  ELSE '0'

  END +

+ '.gif' AS [_IconFor_OS],

When it is all said and done, you should have a basic little search/sort tool to keep an eye on your virtual machines.

sam_vim_custom_swql_vm_view_manager-001.PNG

Here are a few links to some other ways to help you work with, modify, and improve your Orion environment:

Custom SWQL VM Manager (You Are Already Here)

Custom SWQL Views Manager

Custom SWQL Views Manager Resource

Custom Node & Polling, Combined Details Resource

Custom User Links, Modified User Links Resource

Custom Query Resources, Increased Default Workspace

Thank you,

-Will

Labels (2)
Attachments
Comments

Very cool...how do I sort the list by Name?

gundamunit1​ Being within a custom query resource, you should just be able to click the header for the "Name" column, and that should sort the page by name value.

Yeah but I have to do that everytime I go to the tab where I placed the Custom Query.

It would nice if it can just sort by name or hostname.

gundamunit1​ Ah, I see... You can just add the following to the end of the query.

ORDER BY VM.Name

That should always order the list by name.

wluther​ Thanks, that did it.

This is great!

How could we can add in the vCenter Display Name?

Version history
Revision #:
1 of 1
Last update:
‎08-21-2015 03:29 PM
Updated by: