Hello,
I have the following command :
/usr/lib/centreon/plugins//centreon_linux_ssh.pl --plugin=os::linux::local::plugin --mode=cmd-return --hostname='1.2.3.4' --ssh-backend='libssh' --ssh-username='my_user' --ssh-password='' --ssh-port='' --exec-command='/home/my_user/my_script.sh' --exec-command-options='' --manage-returns='%(code) == 0,OK,All is fine#%(code) == 1,WARNING,Little problem#%(code) == 2,CRITICAL,Big problem#,UNKNOWN,Command problem' --verbose
I have no problem with this command, but I’m not fully satisfied
My script (my_script.sh) returns one line of text in all cases, and I want to get this output in --manage-return option
How can I do this?
Many thanks for your help!