This post is more than 5 years old
16 Posts
0
159682
August 29th, 2013 07:00
Create custom report per cluster
Hello,
We are using custom attributes on our vms for setting customer tag. I need to create a report with all clusters,the need is to know what is using by customer.
for example :
Cluster list | |||
Cluster 1 | total memory | number cpu | |
customer 1 | total memory for this customer | total cpu for this customer | |
customer 2 | total memory for this customer | total cpu for this customer | |
Cluster 2 | total memory | number cpu | |
customer 1 | total memory for this customer | total cpu for this customer | |
customer 2 | total memory for this customer | total cpu for this customer | |
… | |||
… | … | … | … |
… | … | … | … |
… | … | … | … |
i know, ill need lots of request
I have the request get vm list for customer.
I'm working for the row table but i dont know how to handle the view ?
if someone have someting like that or can help, it will be a pleasure.
Thx
Davy,
No Events found!
DELL-Thomas B
171 Posts
0
September 12th, 2013 17:00
Here is the code, just change the attribute name to what your CA is and it will make the services for you and add VMs as they show up. I run it once a month/week just to create new services if you add a new 'Business Unit' or 'Customer' etc... From there, since it is a service it would be a lot easier to aggregate memory/cpu etc...
DELL-Thomas B
171 Posts
0
August 29th, 2013 13:00
What would probably be the easiest way off the top of my head is to build a function/query that will grab all of the VMs and then count the custom attributes(CA) for each type (which is customer name in this case) and then from that list/count of VMs to get your resources utilizations or core/memory allocated counts.
The alternative to that would be to build an array/map file that goes and does all of the work once and then use that to generate the table. I'd say it's half a day of PSO or so either way.
dpathammavong
16 Posts
0
August 29th, 2013 14:00
Thank you Bryant, i already have my request for vm list per CA
i have to continue.
If i can't do it ill look for PSO.
DELL-Thomas B
171 Posts
0
August 30th, 2013 01:00
How many VMs do you have in this environment and do you want this to be more of a report or a dashboard? The reason I ask is if there are a lot of VMs it could take awhile to query this and we might be best served with a batch query to get what we need in one chunk and/or use a hash map.
dpathammavong
16 Posts
0
August 30th, 2013 08:00
There is 1600 for 12 clusters, maybe ill dev the view by cluster.
dpathammavong
16 Posts
0
September 12th, 2013 13:00
Do you know how can i get the custom attribute list per cluster ?
DELL-Thomas B
171 Posts
0
September 12th, 2013 15:00
It would take a bit of coding, but what might be easier is I have a script that will take all the custom attributes for a type (Say a CA called 'Customer Name) and then build a services from that list. You could then take that and build your views from services.
dpathammavong
16 Posts
0
September 12th, 2013 17:00
Thank you Bryant, i try it tomorrow at work.
I'll tell you the result
dpathammavong
16 Posts
0
September 12th, 2013 17:00
thank you, your idea sounds cool, i can try your idea.
i did not learn how to script with groovy and vfog for the moment, i think it's the good moment