We are able to run the shell script from putty and getting the output, if we run the same from nagios web UI we are getting the following message. PFA shell script file, please check it and do the needful.
Command Line output:
[root@swnagios libexec]# /usr/local/nagios/libexec/check_exception_in_impala.sh http://10.128.50.17:25000/queries
no queries are running in exceptions in http://10.128.50.17:25000/queries
Nagios Web UI output :
Code: Select all
COMMAND: /usr/local/nagios/libexec/check_exception_in_impala.sh http://10.128.50.17:25000/queries
OUTPUT: BASH=/bin/sh
BASHOPTS=cmdhist:extquote:force_fignore:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath
BASH_ALIASES=()
BASH_ARGC=([0]="1")
BASH_ARGV=([0]="http://10.128.50.17:25000/queries")
BASH_CMDS=()
BASH_LINENO=([0]="0")
BASH_SOURCE=([0]="/usr/local/nagios/libexec/check_exception_in_impala.sh")
BASH_VERSINFO=([0]="4" [1]="1" [2]="2" [3]="1" [4]="release" [5]="x86_64-redhat-linux-gnu")
BASH_VERSION='4.1.2(1)-release'
DATA=
DIRSTACK=()
EUID=48
GROUPS=()
HOST=http://10.128.50.17:25000/queries
HOSTNAME=swnagios.mgmt.steelwedge.com
HOSTTYPE=x86_64
IFS='
'
JAVA_HOME=/opt/jdk1.7.0_75
KRB5RCACHETYPE=none
LANG=en_US
MACHTYPE=x86_64-redhat-linux-gnu
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/sbin:/usr/sbin:/bin:/usr/bin
PIPESTATUS=([0]="1")
POSIXLY_CORRECT=y
PPID=23717
PS4='+ '
PWD=/usr/local/nagiosxi/html/includes/components/ccm
SHELL=/sbin/nologin
SHELLOPTS=braceexpand:hashall:interactive-comments:posix
SHLVL=4
TERM=xterm
UID=48
USAGE='USAGE :check_exception_in_impala.sh urlString'
_=