Dynamic group of datastores larger than 1TB

Unleash the power of System Center for vSphere and Hyper-V | Veeam Task Manager for Hyper-V

Dynamic group of datastores larger than 1TB

Veeam Logoby nico.weytens » Fri Sep 21, 2012 9:45 am

I'm trying my luck on the forum as this is not too urgent, and I'm not sure whether this is related to OpsMgr or nworks. If required I can make an official case for this. Here goes...

I'm trying to create a new group with a dynamic membership of datastores larger than 1 TB. The idea is to target this group when making an override on the free space monitor.
For some reason I don't get the expected members, and I don't see what I'm doing wrong. This is the first dynamic membership I'm creating, so I hope it's not a newbie error :wink: but this seems to be quite straight forward...

We already have a group called nworks VMware Datastores, which comes by default with the MP I guess. The query is ( Object is DATASTORE AND True ). It has 1266 members.
I created a new group called nworks VMWare Datastores > 1024 GB with query ( Object is DATASTORE AND ( diskSize GB Greater than 1024 ) AND True ). To my surprise there are still 1265 members :?: Just clicking random datastores I see all kinds of sizes like 250, 300, 600, 750, 1300 etc.
I started experimenting with the query. Lowering the value to 600GB only seems to give me the datastores larger than 600GB (as expected), but... also gives me the local ESX 63GB disks, and none of the datastores larger than 1TB
When changing the value again, this time to 900GB, the group doesn't have any members at all :?:
As I know we have a couple of 900GB datastores I changed the query to ( Object is DATASTORE AND ( diskSize GB Greater than 899 ) AND True ) . The result is 3 members that are 900GB in size (not sure if we have others), and the larger datastores are missing again.

What's going on here? :|
nico.weytens
Influencer
 
Posts: 17
Liked: 2 times
Joined: Mon Jul 02, 2012 8:30 am
Location: Belgium
Full Name: Nico Weytens

Re: Dynamic group of datastores larger than 1TB

Veeam Logoby Alec King » Fri Sep 21, 2012 11:44 am

Hi Nico,

At first glance, I think that the group query is not doing a numeric comparison - the values are not being treated as numbers, but as strings. Regular Expression matching might be better to use here. Let me look into this a bit deeper and get back to you...

Cheers
Alec
Alec King
Veeam Software
 
Posts: 700
Liked: 116 times
Joined: Sun Jan 01, 2006 1:01 am

Re: Dynamic group of datastores larger than 1TB

Veeam Logoby nico.weytens » Fri Sep 28, 2012 6:03 am

Hi Alec, have you had any time to have another look at this (I can make an official support case if you'd prefer it).

I'm just wondering if this is a problem with SCOM storing integers as strings, or a small bug in the nworks MP that could be solved in a future version (or private update :mrgreen:).
I'm rusty with regular expressions, so I'd prefer if I'd be able to use the regular "greather than"/"smaller than" operators.
nico.weytens
Influencer
 
Posts: 17
Liked: 2 times
Joined: Mon Jul 02, 2012 8:30 am
Location: Belgium
Full Name: Nico Weytens

Re: Dynamic group of datastores larger than 1TB

Veeam Logoby Alec King » Fri Sep 28, 2012 7:56 am

Hi Nico,

Apologies for delay! I have established that SCOM is storing these values as string....which unfortunately means that you must use reg-exp. I haven't yet narrowed down the exact reg-exp required, because I'm a bit rusty there myself! ;-)
I think you could use a reg-exp that checks for <4 characters> in the diskSizeGB - that will give you datastores of 1000 GB and greater. Any smaller datastore will of course be 3 (or less) characters. For greatest accuracy, you can check for 4 numeric characters. I think 'matches regexp ####' might work but I haven't tested it....

And we will be able to change our method for storing these properties in the database, so in next MP update using standard < or > comparisons will work.
If I can help further let me know!
Cheers
Alec
Alec King
Veeam Software
 
Posts: 700
Liked: 116 times
Joined: Sun Jan 01, 2006 1:01 am

Re: Dynamic group of datastores larger than 1TB

Veeam Logoby nico.weytens » Fri Sep 28, 2012 8:20 am

Then for the time being we'll go for regular expressions :)
Not sure if this is the most optimised code, but in our situation this seems to work fine:
( Object is DATASTORE AND ( diskSize GB Matches regular expression .... ) AND True )

The result is a group of 84 datastores with sizes 1000GB or more. And after reviewing our complete datastore list that number is correct.

Thanks for your time, Alec
nico.weytens
Influencer
 
Posts: 17
Liked: 2 times
Joined: Mon Jul 02, 2012 8:30 am
Location: Belgium
Full Name: Nico Weytens

Re: Dynamic group of datastores larger than 1TB

Veeam Logoby Alec King » Fri Sep 28, 2012 8:33 am

That's great Nico, thanks for the update!
Did regexp of '####' match it?
Cheers
Alec
Alec King
Veeam Software
 
Posts: 700
Liked: 116 times
Joined: Sun Jan 01, 2006 1:01 am

Re: Dynamic group of datastores larger than 1TB

Veeam Logoby nico.weytens » Fri Sep 28, 2012 8:42 am

I think you're mistaken, Alec.
When I change the dots to hashes, there aren't any members in the group anymore.
Also when looking at the info about regex on wiki, there's no mentioning of # as some sort of operator.

so I'll keep the formula with ....
nico.weytens
Influencer
 
Posts: 17
Liked: 2 times
Joined: Mon Jul 02, 2012 8:30 am
Location: Belgium
Full Name: Nico Weytens

Re: Dynamic group of datastores larger than 1TB

Veeam Logoby Alec King » Fri Sep 28, 2012 8:51 am

Aha, OK. There is some differences between SCOM regexp and standard regexp, especially for GroupCalc - I was looking at this MS page http://support.microsoft.com/kb/2702651 which states that [0-9] is matched by '#'.
However, if your '....' check is working, then that's the real test :)

Cheers!
Alec
Alec King
Veeam Software
 
Posts: 700
Liked: 116 times
Joined: Sun Jan 01, 2006 1:01 am

Re: Dynamic group of datastores larger than 1TB

Veeam Logoby nico.weytens » Fri Oct 05, 2012 11:08 am 1 person likes this post

In the meantime I've further narrowed down the dynamic group, so needed to be extra creative with the query. :wink:
It might be useful to someone, so let me put it public:
(
Object is DATASTORE AND
( Datastore Cluster Name Does not contain VDI ) AND
( diskSize GB Does not match regular expression .... ) AND
( diskSize GB Does not match regular expression [6-9].. )
)


This gives me the datastores < 600GB not belonging to a Datastore Cluster that has "VDI" in its name.
There might be a more optimised regex query, but at least this works for me :)

cheers,
Nico
nico.weytens
Influencer
 
Posts: 17
Liked: 2 times
Joined: Mon Jul 02, 2012 8:30 am
Location: Belgium
Full Name: Nico Weytens

Re: Dynamic group of datastores larger than 1TB

Veeam Logoby Alec King » Fri Oct 05, 2012 11:42 am

Great info Nico, thanks for sharing! :-)
Alec King
Veeam Software
 
Posts: 700
Liked: 116 times
Joined: Sun Jan 01, 2006 1:01 am


Return to Veeam Management Pack for Microsoft System Center



Who is online

Users browsing this forum: No registered users and 3 guests