VMware vSphere

 View Only
  • 1.  Datastore space monitoring

    Posted May 23, 2007 04:21 PM

    Is it possible create alarms when your data store becomes 95% full and then send an email with Virtual Center? When looking at the triggers, the closest thing i see is the Host Disk Usage Trigger but this does not seem to be right.

    I have looked at the Perl Script a little bit called Diskfree. Looking at it, it appears the script will monitor VM OS partitions and the size, but will it also monitor my datastore drive size?

    If so i have not been able to find any detailed install instructions for it. Does this script get run on the ESX Server or the Virtual Center Server?



  • 2.  RE: Datastore space monitoring

    Posted May 23, 2007 04:43 PM

    I guess one possible way if you're ambitious is to look at the database directly instead of VC.

    VPX_GUEST_DISK – Used to store disk space information for VM’s. This table has 4 columns, vm id (corresponds to VPX_VM table), path (drive letter), disk capacity and free space. It will have a row for each drive partition that a VM has configured.

    Sample SQL code to query Disk Space info from all VM’s (in gigabytes):

    select b.name, path, round(capacity/1073741824,2) "Total", round(free_space/1073741824 ,2) "Free" from vpx_guest_disk a, vpx_entity b where a.vm_id = b.id order by b.name



  • 3.  RE: Datastore space monitoring

    Posted May 23, 2007 05:22 PM

    What about the effect snapshot have on used disk space? Or a virtual machine that was not in inventory?

    brsockel, have a look at the following presentation:http://download3.vmware.com/vmworld/2006/labs2006/vmworld.06.lab05-SECURITY-MANUAL-APPENDIX.pdf

    It will get you headed down the right path. You can use snmp to query this info. Somewhere around page 20 it talks about a query that should help. You could then massage the results and alert based on a % or absolute value.



  • 4.  RE: Datastore space monitoring

    Posted May 23, 2007 06:06 PM

    Look at the Datastore table instead....

    VPX_DATASTORE – Used to store VMFS/NAS datastore information (storage URL, capacity, free space, type). This table has 9 columns and as many rows as you have defined data stores (RDM’s will not show up here).

    Hopefully the next version of VC has expanded alerts beyond the simple ones that it currently has.



  • 5.  RE: Datastore space monitoring

    Posted May 24, 2007 11:18 AM

    If there are any concerns that you need the most up to date information on disk usage, I would recommend SNMP over the VPX database. Virtual Center doesn't contain realtime datastore usage. I'm not sure what the polling interval is, but it is long enough where you would not be alerted to a filling/full volume for a potentially significant amount of time.

    If you're using server vendor agents, such as HP Insight Agents, they can be configured with disk usage thresholds, generating a trap when the usage eclipses user defined values. This works very well for us.



  • 6.  RE: Datastore space monitoring

    Posted May 24, 2007 12:52 PM

    I threw it out there as more of a suggestion rather then a recommendation just to let people know there are alternatives. Regular monitoring software is always the best way to go but the SQL database is a creative source of information that most people do not know about.