Hi all,
I'm using HP SiteScope to monitor our datastores. I'm using a simple script monitor to bounce against our ESX 4.0 servers which runs the vdf command to return size, used, available, and percent used. When I call the script I pass the datastore name along with it. So the contents of the script are this.
sudo /usr/sbin/vdf /vmfs/volumes/$1
This returns the following:
Filesystem 1k-blocks Used Available Use% Mounted on
/vmfs/volumes/4c14635a-8d723b1c-031c-0844324ssa05f3
419168256 117296128 301872128 27% /vmfs/volumes/MY_DATASTORE
I’m then able to use these metrics to do reporting and alerting if a certain datastore gets filled up. This is a Lab Manager development environment so sometimes folks accidentally create too many VMs and run their datastores out of disk space. Hence the reason we need to monitor it from a datastore perspective.
Now enter ESXi 4.1. The vdf command no longer accepts the datastore name as an additional argument. I've tried a couple of different things but just don't seem to be finding the right solution.
So basically I just need the same metrics and be able to run it for each of my datastores. Does anyone know a different way of gathering this through the command line?
Thanks in advance.
Billy
with ls -lh you can indetify datastore name
and with df -h you can see size.
but i believe that better solutions is witch command line with VMA.
read a resolution of this kb show how get a free space in disk. http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=100356...
if you use vcenter click at top vcenter > Alarms > Definitions > Datastore usage on disk > Edit > Triggers > Here you can configure message of warning when disk ir full at 90% (% you can customize). and in actions you can configure to receive alert by email.
Hi Billy,
Have you looked at the vSphere Command-Line Interface 4.1 for Linux? You may have to use one of the vmkfstools commands instead of the Linux command you were using.
http://www.vmware.com/support/developer/vcli/vcli41/vsp4_41_vcli_relnotes.html
Hope this helps.
Andy
I've seen that resolution before. Unfortunately it does not address trying to look at one specifc datastore using the datastore name that shows in vCenter.
We've also considered changing the alarm definitions. The biggest reason we can't do this accurately is we have some datastores that are small and some that are very large. 95% means two completely different things in this situation. I've got to be able to measure each datastore and alert on a specific threshold.
CLI may be an option. I just need to dig into it.
What I was really trying to do is to be able to do a df and then grep out my actual datastore name. The only problem with that df only shows the hex (?) representation instead of what it shows in vCenter.
Thanks,
In the document I refer to they say you can query the vCenter server also which may give you the user friendly volume name you are looking for. Not sure if you have vCenter though.
Also, if you are using HP hardware and HP SIM, in the long run, you might want to look into using the HP OEM version of VMware ESXi provided by HP to get the SIM functionality and maybe read your volume sizes from SIM? We all (HP shops) will have to go that way eventually since VMware is going to ESXi in the next version.
Andy
with ls -lh you can indetify datastore name
and with df -h you can see size.
but i believe that better solutions is witch command line with VMA.
Thanks