Page 1 of 3
check_vnxe.sh unknown status in XI
Posted: Thu Jun 21, 2018 12:35 pm
by hillhealthcenter
Hi,
I managed to get check_vnxe.sh to work at the nagios server command line but it displays an unknown status in XI.
Code: Select all
[root@nagiosxi libexec]# ./check_vnxe.sh 192.168.103.2 **** ******** ssd
OK - no faults detected
[root@nagiosxi libexec]#
Re: check_vnxe.sh unknown status in XI
Posted: Thu Jun 21, 2018 1:06 pm
by scottwilkerson
can you run it as the nagios user?
Code: Select all
sudo su nagios -c './check_vnxe.sh 192.168.103.2 **** ******** ssd'
If so, we would likely need to see the script, but you would want to make sure you have full paths to all executables inside if the script.
Re: check_vnxe.sh unknown status in XI
Posted: Thu Jun 21, 2018 3:20 pm
by hillhealthcenter
Hi Scott,
That command works at the command line also. However, I get this output in XI:
Code: Select all
(No output on stdout) stderr: /bin/sh: -c: line 0: unexpected EOF while looking for matching `''
/bin/sh: -c: line 1: syntax error: unexpected end of file
Re: check_vnxe.sh unknown status in XI
Posted: Thu Jun 21, 2018 3:24 pm
by scottwilkerson
please attach check_vnxe.sh (zip first)
Re: check_vnxe.sh unknown status in XI
Posted: Thu Jun 21, 2018 4:00 pm
by hillhealthcenter
Please see attached.
Re: check_vnxe.sh unknown status in XI
Posted: Thu Jun 21, 2018 4:07 pm
by scottwilkerson
I need to ask, does the username/password you are passing have any non-alphanumeric chars that can be interpreted when Nagios is passing arguments to the script?
Re: check_vnxe.sh unknown status in XI
Posted: Thu Jun 21, 2018 4:12 pm
by scottwilkerson
Boy I thought I was having dejavu ... There is another post from a few weeks back with literally the same script
https://support.nagios.com/forum/viewto ... =6&t=48934
I do notice in your script there is some info in the help
Code: Select all
Security warning: It is STRONGLY recommended that a read only user be created in VNXe and used with this script. The script will work with admin login but this is highly insecure!
Note: This plugin requires sudo access to run, at least under Nagios on Ubuntu. You will need to add a line to your sudoers file that looks something like this -
nagios ALL=(ALL) NOPASSWD:/usr/local/nagios/libexec/check_vnxe.sh
Be sure to only allow this script to run under sudo without password. You will also need to define the check command in Nagios to execute with sudo
Additionally, you must set the verification level to low by running /opt/emc/uemcli-1.5.4.1.0027/bin/setlevel.sh l as a root user or this plugin will fail.
Please send all comments/feedback to the author, Charles Bender, at [email protected]"
So did you add the entry to sudoers?
Re: check_vnxe.sh unknown status in XI
Posted: Thu Jun 21, 2018 8:34 pm
by hillhealthcenter
Hi Scott,
The password includes an exclamation point.
Re: check_vnxe.sh unknown status in XI
Posted: Fri Jun 22, 2018 7:20 am
by hillhealthcenter
I removed the exclamation point from the password. Now I get this output in XI:
Code: Select all
(No output on stdout) stderr: sudo: no tty present and no askpass program specified
Re: check_vnxe.sh unknown status in XI
Posted: Fri Jun 22, 2018 7:35 am
by hillhealthcenter
BTW, I don't have a /etc/sudoers file. I do have a etc/sudoers.d directory.