Business categorization for your virtual environment
Post Reply
tntteam
Enthusiast
Posts: 68
Liked: 5 times
Joined: Aug 28, 2015 12:40 pm
Full Name: tntteam
Contact:

veeam one v9 grouping dynamic based on Location

Post by tntteam »

Hi,

I'm trying to group VMs based on folder, but most of the time there is subfolders.
I know in v8 it was not possible, is it possible in v9 ? I just upgraded and found the "Location" attribute, but interface won't show me what's inside "Location" because of characters length limitation in the rule editor :

If I put only "Location" in expression and enter a test VM, I get :

Expression result
>Virtual Infrastructure>vcenter.domain>DatacenterName>ClusterName...

Hello 2016 and slider bars to replace "..." :)

I tried :

Case
If IndexOf("TeamA", Location) > 0 Then "A"
If IndexOf("TeamB", Location) > 0 Then "B"
Else "Other"
End

Not working.

Any help ?

Thanks and sorry for my terrible english :)

sample hierarchy :

Datacenter
---> Cluster
--->--->TeamA
--->--->--->Prod
--->--->--->--->VM1
--->--->--->--->VM2
--->--->--->Test
--->--->--->--->Subtests
--->--->--->--->--->VM3
--->--->--->--->--->VM4
--->--->--->VM5
--->--->--->VM6
--->--->TeamB
--->--->--->Prod
--->--->--->--->VM7
--->--->--->--->VM8
--->--->--->Test
--->--->--->--->VM9
--->--->--->VM10
--->--->--->VM11
tntteam
Enthusiast
Posts: 68
Liked: 5 times
Joined: Aug 28, 2015 12:40 pm
Full Name: tntteam
Contact:

Re: veeam one v9 grouping dynamic based on Location

Post by tntteam »

Nevermind, I used the datastore names as they contains team name.

CASE
WHEN IndexOf(ToUpperCase(Datastore), "TEAMA") > 1 THEN "A"
WHEN IndexOf(ToUpperCase(Datastore), "TEAMB") > 1 THEN "B"
ELSE "Other"
END
Vitaliy S.
VP, Product Management
Posts: 27055
Liked: 2710 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: veeam one v9 grouping dynamic based on Location

Post by Vitaliy S. »

tntteam wrote:Case
If IndexOf("TeamA", Location) > 0 Then "A"
If IndexOf("TeamB", Location) > 0 Then "B"
Else "Other"
End

Not working.
Can you please try this expression? Should work.

Code: Select all

Case
If IndexOf(Location, "TeamA") > 0 Then "A"
If IndexOf(Location, "TeamB") > 0 Then "B"
Else "Other"
End
tntteam
Enthusiast
Posts: 68
Liked: 5 times
Joined: Aug 28, 2015 12:40 pm
Full Name: tntteam
Contact:

Re: veeam one v9 grouping dynamic based on Location

Post by tntteam »

The problem is subfolders

if VM is in subfolder, it won't work because veeam-one is not aware of vmware blue folders view hierarchy
Vitaliy S.
VP, Product Management
Posts: 27055
Liked: 2710 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: veeam one v9 grouping dynamic based on Location

Post by Vitaliy S. »

Actually it is aware, if you use one of these parameters (Folder or UserLocation) you should be able to categorize VMs based on their folders. Additionally, VM folders (blue ones) are available in static rules. Let me know if that helps!
tntteam
Enthusiast
Posts: 68
Liked: 5 times
Joined: Aug 28, 2015 12:40 pm
Full Name: tntteam
Contact:

Re: veeam one v9 grouping dynamic based on Location

Post by tntteam »

Weird, taking my sample hierarchy :

Datacenter
---> Cluster
--->--->TeamA
--->--->--->Prod
--->--->--->--->VM1
--->--->--->--->VM2
--->--->--->Test
--->--->--->--->Subtests
--->--->--->--->--->VM3
--->--->--->--->--->VM4
--->--->--->VM5
--->--->--->VM6
--->--->TeamB
--->--->--->Prod
--->--->--->--->VM7
--->--->--->--->VM8
--->--->--->Test
--->--->--->--->VM9
--->--->--->VM10
--->--->--->VM11

If I use

Case
If IndexOf(Location, "TeamA") > 0 Then "A"
If IndexOf(UserLocation, "TeamA") > 0 Then "A"
If IndexOf(Folder, "TeamA") > 0 Then "A"
Else "Other"
End

On VM1, it gives "Other"
Vitaliy S.
VP, Product Management
Posts: 27055
Liked: 2710 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: veeam one v9 grouping dynamic based on Location

Post by Vitaliy S. »

Hmm... can you try to replace "if" with "when" in each line and see what result it returns?
tntteam
Enthusiast
Posts: 68
Liked: 5 times
Joined: Aug 28, 2015 12:40 pm
Full Name: tntteam
Contact:

Re: veeam one v9 grouping dynamic based on Location

Post by tntteam »

Vitaliy S. wrote:Hmm... can you try to replace "if" with "when" in each line and see what result it returns?
Not better. In fact I think I used "when" in my tests and reported "if" by mistake. Because using "if" gives "undefined" or "syntax error", depending on the mood of the syntax interpreter.

But did you reproduce it on your side? Multi sublevel of blue folders ? It works ?

If I enter "Location" alone in grouping expression with a sample VM, it shows :
>Virtual Infrastructure>vcenter-server-name>Datacenter Name>Cluster Name truncated followed by 3 dots...

This shows that "Location" will give wrong results as blue folder path is not aware of cluster, it only cares about datacenter.

If I enter "Folder" or "UserLocation" alone in grouping expression with a sample VM, it shows :
Nothing. It's empty.

Maybe it's because my vcenter version is old ? (5.1)
Vitaliy S.
VP, Product Management
Posts: 27055
Liked: 2710 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: veeam one v9 grouping dynamic based on Location

Post by Vitaliy S. »

Can you please execute this query against your database? If it results in zero records, then please contact our support team with a reference to this thread and let me your case ID. A hotfix might be required to resolve this.

Code: Select all

select * From reporter.LatestObjectProperty where PropertyID = 884
tntteam
Enthusiast
Posts: 68
Liked: 5 times
Joined: Aug 28, 2015 12:40 pm
Full Name: tntteam
Contact:

Re: veeam one v9 grouping dynamic based on Location

Post by tntteam » 1 person likes this post

Hi,

Yes this query returns no entries in database.

I opened a SR : 01715058
dhueber
Novice
Posts: 4
Liked: never
Joined: Jan 24, 2017 11:13 am
Full Name: David
Contact:

Re: veeam one v9 grouping dynamic based on Location

Post by dhueber »

Dear all,

sorry for doing an up on an older post but we are facing a similar problem with Veeam 9.5.

We have following folder structure in vCenter

Data Center
---> Division 1
---> Team A
---> VM1
---> VM2
---> Team B
---> VM1
---> VM2
---> VM3
---> Division 2
---> Team C
---> VM1
---> Team D
---> VM1

We are now trying to create groups and/or categories per team.

We tried multiple solutions we found in different posts but couldn't get it working.

Test1
Case
When ToUpperCase(folder) = "TEAM A" THEN "A"
When ToUpperCase(folder) = "TEAM B" THEN "B"
When ToUpperCase(folder) = "TEAM C" THEN "C"
When ToUpperCase(folder) = "TEAM D" THEN "D"
Else "Others"
End

All VMs are pointed to Others...

Test 2
CASE
WHEN IndexOf(ToUpperCase(Folder), "TEAM A") > 0 THEN "A"
WHEN IndexOf(ToUpperCase(Folder), "TEAM B") > 0 THEN "B"
ELSE "Others"
END

All VMs are pointed out to Others

Test 3
CASE
WHEN IndexOf(ToUpperCase(Location), "TEAM A") > 0 THEN "A"
WHEN IndexOf(ToUpperCase(Location), "TEAM B") > 0 THEN "B"
ELSE "Others"
END

All VMs are pointed out to Others

Test 4
We tries to create a category per team and then a rule for virtual machine objects type we applied it to a folder and selected "By infrastructure location" type.

This works almost fine unfortunately we do only see the first level of folder. All sub-folders are hidden and not taken in account.

Do you see what we are doing wrong here?

Many thanks for your support


David
Shestakov
Veteran
Posts: 7328
Liked: 781 times
Joined: May 21, 2014 11:03 am
Full Name: Nikita Shestakov
Location: Prague
Contact:

Re: veeam one v9 grouping dynamic based on Location

Post by Shestakov »

Hello David,
Since you don`t need groups to be created and deleted dynamically, I would suggest working with static ones.
You can create Category "Division 1" with static groups "Team A", "Team B"... with rules for each group adding VMs of particular folders into the groups.
Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest