Last active
March 11, 2021 11:58
-
-
Save M0NsTeRRR/5fe8e4e44d4a6b0c1fecf2b88bd0e67c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pyvmomi is required | |
# pip install pyvmomi | |
from pyVim.connect import SmartConnectNoSSL, Disconnect | |
import ssl | |
s = ssl.SSLContext(ssl.PROTOCOL_TLSv1) | |
s.verify_mode = ssl.CERT_NONE | |
c = SmartConnectNoSSL(host='vcenter.homelab.lan.fr', user='root', pwd='password') | |
host = c.content.searchIndex.FindByDnsName(None,'server.homelab.lan',False) | |
health = host.runtime.healthSystemRuntime.systemHealthInfo.numericSensorInfo | |
print(health) | |
Disconnect(c) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment