alanrenouf / vCheck-vSphere

vCheck Daily Report for vSphere
MIT License
735 stars 325 forks source link

vCheck unable to detect when datastore alarm is disabled #387

Closed akarthikeyan16 closed 8 years ago

akarthikeyan16 commented 9 years ago

Hi Friends,

We are using the great vCheck script in our environment and noticed that from the report it shows only host with alarms disabled and unable to display the datastore with alarms disabled.

Could you kindly advise if there are any plugins to pull datastore with alarms disabled. Please advise.

Thanks,

akarthikeyan16 commented 9 years ago

Hi Sneddo,

Im awaiting for your reply. It will be very helpful any information. Can vCheck pull datastore with alarms disabled ?

Please advise,

Thanks, AK

vScripter commented 9 years ago

AK,

I don't think we are currently pulling this but we have marked this issue as an enhancement and will include it in a future version. Please stay tuned to new releases; we will close this issue once it's implemented. Thanks!

Sneddo commented 9 years ago

It's a simple enough plugin, effectively the same as the host alarms but using $Datastores instead.

I'll try to get to it tomorrow unless someone beats me to it.

akarthikeyan16 commented 9 years ago

Hi Sneddo,

Thanks, Let us know once the host alarm plugin is modified to check for datastore alarms. It will be really helpful.

Thanks, AK

Sneddo commented 9 years ago

Hey sorry, been a busy week. Give this a try, should do what you want:

# Start of Settings 
# End of Settings 

$Datastores | where {!$_.ExtensionData.AlarmActionsEnabled} | Select Name, @{n='AlarmActionsEnabled'; e={$_.ExtensionData.AlarmActionsEnabled}}

$Title = "Datastores with Alarms Disabled"
$Header = "Datastores with Alarms Disabled"
$Comments = "Datastores with Alarms Disabled"
$Display = "Table"
$Author = "John Sneddon"
$PluginVersion = 1.0
$PluginCategory = "vSphere"