Hi,
I need a little help with syntax on this widget. I am trying to narrow the display down to only show Virtual Machines that "CDC" in the hostname. Please look at the screen shot to see the properties I have available.
We have a resource that filters this way under Filter Nodes (SQL):
Caption Like 'CDC*'
Maybe something like that?
I think @holleyc77 wants the CDC anywhere in the name, but @wilder's example gets it done if its always a prefix. If needed anywhere in the name it would look like:
Caption Like '*CDC*'
If you need to figure out if its virtualas well, it may not have that condition ready for you. Stringing conditions can be done with 'and' but if you need a more complicated filter with infomraiton not built in, we may want to move to the Custom Query or Custom Table widgets @mesverrum has created and collected lots of widget replacements as well over at https://github.com/Mesverrum/MyPublicWork .
But you likely don't need alot to do what you want. I may have overlooked it, but what widget are you trying to replace? We can likely whip up a SWQL statement to assist if you want the Custom Query widget to help you.
Hi @jm_sysadmin
This is for the "Top XX Hosts by CPU Load" widget. You are correct, I want to filter out of all my servers the server that have "CDC" in the name.
Would I use the HostName property? What would the syntax be?
If caption doesn't work try SysName , use 'not like ' to remove from th list
SysName not like '*CDC*'
@jm_sysadmin So SysName or Caption are not one of the options for the widget. I added a image of what is allowed. Thanks
ok, have you tried any? Hostname, Caption, whatever?
have tried:
HostName like '*cdc*'
Caption like '*cdc*'
DNSHostName like '*cdc*'
HostID like '*cdc*'
no joy with any of them...as a note, I have used this syntax with other widgets and it works great. Attached an image of the results.
If it was a syntax error you should have got an error message like incorrect SQL inside the widget. But here there is no such error showing.
For which module you are trying this, is it VMan?