HenriWahl / checkmk-agent-plugin-yum

Checks for updates on RPM-based distributions via yum.
GNU General Public License v2.0
24 stars 22 forks source link

Enable WATO rule override of state when reboot is required #11

Closed moschlar closed 6 years ago

moschlar commented 6 years ago

Hi Henri,

would you mind merging this change and uploading a new version of the mkp?

Regards, Moritz

HenriWahl commented 6 years ago

Thanks for your contribution! New file was uploaded already.

moschlar commented 6 years ago

Thanks! Could you also upload it to the Check_MK Exchange at https://mathias-kettner.de/check_mk_exchange_upload.php?HTML=yes ?

HenriWahl commented 6 years ago

Yes I did so yesterday.

HenriWahl commented 6 years ago

After using your changes I get an UNKOWN error for all hosts which need reboots:


Exception | TypeError ('NoneType' object is unsubscriptable)
-- | --
Traceback | File "/omd/sites/monitor/share/check_mk/modules/check_mk_base.py", line 1506, in do_all_checks_on_host     result = sanitize_check_result(check_function(item, params, info), check_uses_snmp(checkname))    File "/omd/sites/monitor/local/share/check_mk/checks/yum", line 73, in check_yum     level = params["reboot_req"]
-- | --
Local Variables | {'_no_item': None,  'info': [[u'yes'], [u'0']],  'level': 0,  'msg': '',  'packages': 0,  'params': None,  'reboot_req': u'yes'}
-- | --

I guess this is not intended? Or is there something I should change in settings?

HenriWahl commented 6 years ago

I solved this in https://github.com/HenriWahl/checkmk-agent-plugin-yum/commit/f96cac058276af2c7da0ce4ab7f27550273df6c3 Latest 2.0.7 is uploaded here and to Check_MK Exchange.

moschlar commented 6 years ago

Ah thanks!