ActiveCheckConfig with different Nagios plugin name?

The documentation of the class ActiveCheckConfig(*, name, parameter_parser, commands_function) states that the name parameter is the “Active check name. Has to match active check executable name without the prefix check_.”

What do I do when the Nagios plugin does not have the same name as the check, @moritz ?

In my case it has the ending .pl because it is a Perl script. As I did not write the Nagios plugin I do not wish to rename it.

In the old active_check_info[] we had an attribute command_line where the Nagios plugin name could be anything. This also allowed to “re-use” existing Nagios plugins.

E.g. we have a check_restapi MKP which re-uses the Nagios plugin check_http. How would I implement this now?

1 Like

I’d suggest a simple wrapper, similar to this one. You could also try to use a symlink; but I am not sure if that would behave well when put into an MKP. Probably not.

1 Like

Such a simple idea. :smiley: