Today’s task!

Today I was given a task to have my manager emailed once a day. If any of our Data Stores in ESX 3.5 are over 80% utilized. So I said to my self. What would be the easiest way to do this???? Well I’ve written two scripts in the past, that could help me accomplish that. The first script VMstoragePool.py will list all of the Data Stores in Vmware and its utilization. The 2nd script is check_datastore.py, and this script will return OK, WARNING, or CRITICAL, depending on the thresholds you set. So by effectively combining the 2 scripts I was able to get what I want. Example below…

 

So I can run this script in cron once a day and pipe the output to email him directly. Simple yet effective! On a side note, I fixed both chec_datastore.py and VMstoragePool.py to effectivly parse passwd’s that used characters like !@#$%^.

Both scripts can be downlaoded here..
check_datastore.py == Download

VMstoragePool.py == Download

This entry was posted in Blog, Python, VMware and tagged , . Bookmark the permalink.

3 Responses to Today’s task!

  1. complicated says:

    Download link does not work. Can you please fix it.

    Thanks.

  2. exacon says:

    hello,

    i would like to get these interesting scripts, but it seemed that the links are broken..

    so, plz. help..

    thanks..

Leave a Reply