VMware Cloud Community
TheBurn
Contributor
Contributor
Jump to solution

How to get Hardware status of ESXi Host from external monitoring system ?

Hello !

I've got hardware informations about ESXi host (such as CPU, disk, etc)

taht I want to retrieve outside of a vCenter/ESXi for an external monitoring system.

I've saw really really slighty that it would be possible throught Powershell...

Thanks for your help !

Tags (2)
Reply
0 Kudos
1 Solution

Accepted Solutions
Borja_Mari
Virtuoso
Virtuoso
Jump to solution

Hello,

the link i have commented, explian how to monitor ESXi hardware status using the CIM cmdlets of powershell 3.0.

Not virtual machines Smiley Wink

Do you want this, right? Smiley Happy

Check this code taken from the link, you should notice that connects to an esxi host, not virtual machines:

import-module CimCmdlets

2$ipaddress = "10.20.177.15"

3$HostUsername = "root"

4$CIOpt = New-CimSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck -Encoding Utf8 -UseSsl

5$Session = New-CimSession -Authentication Basic -Credential $HostUsername -ComputerName $Ipaddress -port 443 -SessionOption $CIOpt

6Get-CimInstance -CimSession $Session -ClassName CIM_Fan

Best regards,

Pablo

------------------------------------------------------------------------------------------------- PLEASE CONSIDER AWARDING any HELPFUL or CORRECT reply. Thanks!! Por favor CONSIDERA PREMIAR cualquier respuesta ÚTIL o CORRECTA . ¡¡Muchas gracias!! VCP3, VCP4, VCP5-DCV (VCP550), vExpert 2010, 2014 BLOG: http://communities.vmware.com/blogs/VirtuallyAnITNoob

View solution in original post

Reply
0 Kudos
10 Replies
jrmunday
Commander
Commander
Jump to solution

You can certainly get this information with PowerShell, please confirm exactly what information you want and the format (I'm assuming CSV).

Cheers,

Jon

vExpert 2014 - 2022 | VCP6-DCV | http://www.jonmunday.net | @JonMunday77
Reply
0 Kudos
ScreamingSilenc
Jump to solution

This should help you Monitoring ESX hardware with PowerShell | VMware PowerCLI Blog - VMware Blogs

Please consider marking this answer "correct" or "helpful" if you found it useful.
TheBurn
Contributor
Contributor
Jump to solution

Hi Jon,

Thanks for your reply.

I want to retreive more of all state of Hard drives (OK or KO, pe, if a disk failed to replace it as soon as possible).

Reply
0 Kudos
TheBurn
Contributor
Contributor
Jump to solution

Thank you Mustafa,

I'll have a look on this way than come back in case of any question Smiley Happy

Reply
0 Kudos
Borja_Mari
Virtuoso
Virtuoso
Jump to solution

Hello,

i would recommend you to check this:

http://www.virtu-al.net/2012/10/29/using-powershell-v3-0-cim-cmdlets-with-vmware-esxi-hosts/

Best regards,

Pablo

------------------------------------------------------------------------------------------------- PLEASE CONSIDER AWARDING any HELPFUL or CORRECT reply. Thanks!! Por favor CONSIDERA PREMIAR cualquier respuesta ÚTIL o CORRECTA . ¡¡Muchas gracias!! VCP3, VCP4, VCP5-DCV (VCP550), vExpert 2010, 2014 BLOG: http://communities.vmware.com/blogs/VirtuallyAnITNoob
TheBurn
Contributor
Contributor
Jump to solution

Here I've tryed with "Get-HardDisk" after been connected to my ESXi host,

but it's only for virtual machines ?

Or is there a way to check up the physical drives (and not virtuals) ?

Reply
0 Kudos
ScreamingSilenc
Jump to solution

Have you tried below command to get the Physical HDD details

1212.png

Please consider marking this answer "correct" or "helpful" if you found it useful.
Reply
0 Kudos
TheBurn
Contributor
Contributor
Jump to solution

I can not connect to ESXi host this way, Haven't got the "Connect-VIServer" commands.

Had tryed with "Connect-WSMan" too but it can not find the esxi host again :confused_face:

I've also tryed the script you gave me,

it returns me the "FAN speed" and "ambient temp" than only errors saying that class "XXX" is unfindable

Reply
0 Kudos
Borja_Mari
Virtuoso
Virtuoso
Jump to solution

Hello,

the link i have commented, explian how to monitor ESXi hardware status using the CIM cmdlets of powershell 3.0.

Not virtual machines Smiley Wink

Do you want this, right? Smiley Happy

Check this code taken from the link, you should notice that connects to an esxi host, not virtual machines:

import-module CimCmdlets

2$ipaddress = "10.20.177.15"

3$HostUsername = "root"

4$CIOpt = New-CimSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck -Encoding Utf8 -UseSsl

5$Session = New-CimSession -Authentication Basic -Credential $HostUsername -ComputerName $Ipaddress -port 443 -SessionOption $CIOpt

6Get-CimInstance -CimSession $Session -ClassName CIM_Fan

Best regards,

Pablo

------------------------------------------------------------------------------------------------- PLEASE CONSIDER AWARDING any HELPFUL or CORRECT reply. Thanks!! Por favor CONSIDERA PREMIAR cualquier respuesta ÚTIL o CORRECTA . ¡¡Muchas gracias!! VCP3, VCP4, VCP5-DCV (VCP550), vExpert 2010, 2014 BLOG: http://communities.vmware.com/blogs/VirtuallyAnITNoob
Reply
0 Kudos
TheBurn
Contributor
Contributor
Jump to solution

Hey Pablo !

Yes, that's right Smiley Happy

But even PowerShell or PowerCLI doesn't find module "CimCmdlets" :confused_face:

Reply
0 Kudos