Page 1 of 1

execute command works on cli but not in web

Posted: Fri Feb 28, 2020 9:17 am
by h2user
Hi

I was wondering why I get a result in the cli but not in the browser

/usr/local/nagios/libexec/check_ssh_fortigate_env.pl -H x.x.x.x-u username -p password

OK : Hardware NORMAL , see details

and in the webinterface is says

could not get result of 'execute sensor list' command

so it is running the script and looks like to the correct ip and user and password

Re: execute command works on cli but not in web

Posted: Fri Feb 28, 2020 4:21 pm
by cdienger
It could be permissions. Make sure to test with the nagios user when you run from the command line:

Code: Select all

su - nagios
/usr/local/nagios/libexec/check_ssh_fortigate_env.pl -H x.x.x.x -u username -p password

Re: execute command works on cli but not in web

Posted: Sat Feb 29, 2020 3:34 pm
by h2user
Hey !! thankssss. that was indeed the problem.... thanks very much for the command !!!!!! realy cool !

Re: execute command works on cli but not in web

Posted: Mon Mar 02, 2020 8:22 am
by scottwilkerson
h2user wrote:Hey !! thankssss. that was indeed the problem.... thanks very much for the command !!!!!! realy cool !
Great!

Locking thread