There are TA Apps available for Windows and Unix server from Splunk which have the inputs configured for getting the diskspace from the servers. You can either install full TA apps or just diskspace portion of it to start collecting the same.
References
Unix App
http://docs.splunk.com/Documentation/UnixApp/latest/User/AbouttheSplunkAppforUnix
http://apps.splunk.com/app/833/
Windows App
http://docs.splunk.com/Documentation/WindowsApp/5.0.2/User/InstalltheSplunkTechnologyAdd-onforWindow...
https://apps.splunk.com/app/742/
Update
For windows servers, you can setup following perform input to capture the free space on the server. Once data in getting indexed, you can search on it.
[perfmon://FreeDiskSpace]
counters = Free Megabytes;% Free Space
disabled = 1
instances = *
interval = 60
object = LogicalDisk
For unix servers, download the TA app for Unix and just use the scripted input df.sh to get the same.
Is there any command I can use to get it directly