Hi all,
I'm looking into a creating a few functions on how reporting health status for our VM environment, but am running into the following issue:
A few hosts currently have SSH enabled and are reporting a warning in the GUI.
However when trying to report the Warning from PowerCLI, it doesn't display this information:
Get-VMHost <hostname> | Select-Object -Expandproperty Extensiondata
This displays my OverallStatus and ConfigStatus as being Yellow, but my TriggeredAlarmState property is empty.
When looking at the GUI, the only warning that sets it to Yellow is SSH.
Now I know how to enable/disable SSH generally, but I just want to report that my system is getting an alarm/warning and what the warning is in this function.
I've also tried the following PowerCLI cmdlets, but unfortunately these also do not provide me with the required information:
Get-VMHost <hostname> | Get-View | Select-Object -Expandproperty TriggeredAlarmState
and
$Start = (Get-Date).AddDays(-1)
$Events = Get-VIEvent -Start $Start | Where-Object {$_ -is [VMWare.ViM.AlarmStatusChangedEvent] -And ($_.To -match "red|yellow")}
$Events
and
Get-Cluster <clusterentity> | Select-Object -Expandproperty ExtensionData
Unfortunately I'm not familiar on how to format my PowerCLI code in neat formatting [as @LucD normally does], but hopefully it's still clear what I mean.
Kind regards,
Robert
That is internally not considered as an alarm (there is no Alarm Definition for this btw), but as a configuration issue.
You can check with
$esx = Get-VMHost -Name MyEsx
$esx.ExtensionData.ConfigIssue |
Select CreatedTime,FullFormattedMessage
To format your code in the forum have a look at Some ways to enter PowerCLI code under the new forum SW
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
That is internally not considered as an alarm (there is no Alarm Definition for this btw), but as a configuration issue.
You can check with
$esx = Get-VMHost -Name MyEsx
$esx.ExtensionData.ConfigIssue |
Select CreatedTime,FullFormattedMessage
To format your code in the forum have a look at Some ways to enter PowerCLI code under the new forum SW
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You sir are a champ!
Exactly what I was looking for!
I was not triggered by this property simply due to it's visible value of {0}, but I really need to learn to dig a bit deeper in my VMWare objects