ImTheLucKyOne / check_mk_emcunity

Check_MK Extensions for Dell EMC Unity Storages
GNU General Public License v3.0
5 stars 8 forks source link

degraded pool / still in OK state #21

Closed pdcemulator closed 4 years ago

pdcemulator commented 4 years ago

Hi,

one of my pools is degraded caused by a failed drive. But the pool state is still OK, I had expect a WARN state.

Service State: OK Service Output: OK - 27.87% used (xx of xx TB), trend: +x GB / 24 hours, subscription: 64%, EMC State: Degraded/Warning (10) "The pool is currently degraded, and does not have enough spare space to initiate a rebuild. Replace the faulted drive, or add a drive of the same type and size or larger to the system."

I had a look into the check source, and it does not check the pool state. But this should be checked. According to the docs, the following health states are possible:

My ENV

ImTheLucKyOne commented 4 years ago

Hi,

I can not merge your request because the plugin uses the df_check_filesystem function to calculate the state like other filesystem checks do (with all the levels and stuff). But I will implement parse_emcstate to override the df state if emcstate is worse than df state.

Thank you for the report!

ImTheLucKyOne commented 4 years ago

I changed the filesystem checks _lun, _pool and _vmfs.

pdcemulator commented 4 years ago

I can not merge your request because the plugin uses the df_check_filesystem function to calculate the state like other filesystem checks do (with all the levels and stuff).

Just for information... I used the yield instead of return function. With yield, you are able to submit multiple "results" (status, output, performance values) for a single service. For example one for the status, a second for file system usage. Cmk uses the worst state as the final service state and the output get concattinated. You dont have to do this yourself in the check. This leads better readable check functions because you can seperate different things to check.