Using ESXCLI output
Many ESXCLI commands generate the output you might want to use in your application. You can run esxcli with the --formatter dispatcher option and send the resulting output as input to a custom parser script.
Below are ESXCLI commands to get vSAN HealthCheck status.
esxcli vsan health cluster list
esxcli --formatter=keyvalue vsan health cluster list
esxcli --formatter=xml vsan health cluster list
Option formatter can help us to get the output in machine-friendly formats for automated processing.
If we want to get a detailed Health Check description we can use the following command
esxcli vsan health cluster get -t "vSAN: MTU check (ping with large packet size)"
Option -t contains the name of a particular vSAN HealthCheck test.
Example of one vSAN Health Check:
[root@esx11:~] esxcli vsan health cluster get -t "vSAN: MTU check (ping with large packet size)"
vSAN: MTU check (ping with large packet size) greenPerforms a ping test with large packet size from each host to all other hosts.Ask VMware: http://www.vmware.com/esx/support/askvmware/index.php?eventtype=com.vmware.vsan.health.test.largepin...Only failed pingsFrom Host To Host To Device Ping result--------------------------------------------------------Ping resultsFrom Host To Host To Device Ping result----------------------------------------------------------------------192.168.162.111 192.168.162.114 vmk0 green192.168.162.111 192.168.162.113 vmk0 green192.168.162.111 192.168.162.112 vmk0 green192.168.162.112 192.168.162.111 vmk0 green192.168.162.112 192.168.162.113 vmk0 green192.168.162.112 192.168.162.114 vmk0 green192.168.162.113 192.168.162.114 vmk0 green192.168.162.113 192.168.162.112 vmk0 green192.168.162.113 192.168.162.111 vmk0 green192.168.162.114 192.168.162.111 vmk0 green192.168.162.114 192.168.162.112 vmk0 green192.168.162.114 192.168.162.113 vmk0 green
No comments:
Post a Comment