I have trouble getting a custom nrpe plugin to work. It works when I call it myself on the command line, but when it gets executed through nrpe, it doesn’t. The problem seems to be that the vyatta commands do work in a script running on an interactive shell, but not in scripts running on a non-interactive shell.
As a test I used the script in https://wiki.vyos.net/wiki/Command_scriptin:
run show interfaces[/code]
This gets the correct result in a shell, but returns nothing to nrpe. Does anyone know what I should do differently?