execute command works on cli but not in web

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
h2user
Posts: 7
Joined: Mon Dec 23, 2019 3:33 pm

execute command works on cli but not in web

Post 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
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: execute command works on cli but not in web

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
h2user
Posts: 7
Joined: Mon Dec 23, 2019 3:33 pm

Re: execute command works on cli but not in web

Post by h2user »

Hey !! thankssss. that was indeed the problem.... thanks very much for the command !!!!!! realy cool !
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: execute command works on cli but not in web

Post by scottwilkerson »

h2user wrote:Hey !! thankssss. that was indeed the problem.... thanks very much for the command !!!!!! realy cool !
Great!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked