Automation

 View Only
  • 1.  getting datastore usage history

    Posted Jun 01, 2011 03:04 AM

    When you go to the performance tab of a datastore you can see the graph of allocated and used space over a time range.

    How do you access these stats via powercli?

    get-stattype -entity * doesn't seem to return any stat types for datastores

    the point of this is i'm trying to script a report that shows the datastore usage percentage over the last 7 days

    e.g,  80%, 81%, 82%, 82%, 82%, 83%, 83%



  • 2.  RE: getting datastore usage history

    Posted Jun 16, 2011 05:59 AM

    no takers?



  • 3.  RE: getting datastore usage history

    Posted Jun 16, 2011 07:57 AM

    PowercLi - a simple 'Get-Datastore' - will return all Datastores, the Capacity and the amount of free space.

    Simply schedule this daily and pipe the outout to a file somewhere and you will have all the info you need.

    Sample output

    Name                               FreeSpaceMB      CapacityMB
    ----                               -----------      ----------
    DATASTORE119                             50642          477696
    DATASTORE112T2                           91838         1023488
    7578_local                               85814          137984
    DATASTORE105                             61535          477696

    Good luck



  • 4.  RE: getting datastore usage history

    Posted Jun 16, 2011 11:50 PM

    yes, interesting workaround.

    I could dump datastore objects using export-clixml to a file and read it in the next day.

    It will be an interesting scripting challenge. But I guess there is no other option since that data is not available via get-view or get-stat



  • 5.  RE: getting datastore usage history
    Best Answer

    Posted Jun 19, 2011 09:59 PM

    Have a look at my post called Datastore usage statistics



  • 6.  RE: getting datastore usage history

    Posted Jun 20, 2011 04:26 AM

    :smileygrin: now that's what I call answered! I need a triple points button when awarding that the correct answer lol

    Thanks heaps LucD!