Add the possibility to use sudo in all unix agents if Agent not running as ROOT

16 votes

In larger companies and on customer servers it is common that on Unix systems 3rd party software like the Checkmk Agent can only be executed with a non root user. It would be therefor very helpful if you could execute the commands that need root with sudo instead.

You could place a variable $MK_SUDO in front of all commands that need root. If sudo should be used this variable could be filled via ENV (analogous to the other MK_ variables) with the corresponding "/bin/sudo" path.

If the variable contains the sudo path the command is executed with "/bin/sudo command -args", if the variable is empty the command is executed as before "command -args".

And list of required sudo rules in the documentation would also be very handy ;-)

Under consideration Checks&Agents Suggested by: Lars Sörensen Upvoted: 15 Apr Comments: 2

Comments: 2