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

Missing "catalog:" section in checkman causes error in gui #82

Closed swampdogmash closed 2 months ago

swampdogmash commented 2 months ago

A colleague pointed out to me that in CheckMK 2.2.0p24 the display of the man page for the yum plugin displays an error:

"yum: Cannot parse man page: 'catalog' yum "

It's in the file checkman/yum and it appears that in this version of CheckMK there is an expectation that the "catalog" field is present in the checkman file.

I temporarily added "catalog: custom/check" into the file and the error goes away, however reversing up the breabcrumb trail for the new path created for the man page then generates a new error as the topic "custom" is not present.

Changing the "catalog" to "generic" places the checkin manpage under the generic section and also removes the error.

I've not tested this on older versions of check mk, however adding an "unknown" field currently does not generate an error in 2.2.0p24. I am suggesting to add the catalog line but am not currently able to test it on older versions of CheckMK.

swampdogmash commented 2 months ago

adding "catalog: generic" also fixes this issue in 2.3.0p11. ....and 2.3.0p4.

HenriWahl commented 2 months ago

@swampdogmash could you help and add a pull request?

swampdogmash commented 2 months ago

Added https://github.com/HenriWahl/checkmk-agent-plugin-yum/compare/master...swampdogmash:checkmk-agent-plugin-yum:patch-11

HenriWahl commented 2 months ago

Thanks!