check_vnxe.sh unknown status in XI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
hillhealthcenter
Posts: 174
Joined: Fri Sep 21, 2012 7:45 am
Location: New Haven, CT

check_vnxe.sh unknown status in XI

Post 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]#
Thanks so much,
Tom
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_vnxe.sh unknown status in XI

Post 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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
hillhealthcenter
Posts: 174
Joined: Fri Sep 21, 2012 7:45 am
Location: New Haven, CT

Re: check_vnxe.sh unknown status in XI

Post 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
Thanks so much,
Tom
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_vnxe.sh unknown status in XI

Post by scottwilkerson »

please attach check_vnxe.sh (zip first)
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
hillhealthcenter
Posts: 174
Joined: Fri Sep 21, 2012 7:45 am
Location: New Haven, CT

Re: check_vnxe.sh unknown status in XI

Post by hillhealthcenter »

Please see attached.
You do not have the required permissions to view the files attached to this post.
Thanks so much,
Tom
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_vnxe.sh unknown status in XI

Post 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?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_vnxe.sh unknown status in XI

Post 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?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
hillhealthcenter
Posts: 174
Joined: Fri Sep 21, 2012 7:45 am
Location: New Haven, CT

Re: check_vnxe.sh unknown status in XI

Post by hillhealthcenter »

Hi Scott,

The password includes an exclamation point.
Thanks so much,
Tom
hillhealthcenter
Posts: 174
Joined: Fri Sep 21, 2012 7:45 am
Location: New Haven, CT

Re: check_vnxe.sh unknown status in XI

Post 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
Thanks so much,
Tom
hillhealthcenter
Posts: 174
Joined: Fri Sep 21, 2012 7:45 am
Location: New Haven, CT

Re: check_vnxe.sh unknown status in XI

Post by hillhealthcenter »

BTW, I don't have a /etc/sudoers file. I do have a etc/sudoers.d directory.
Thanks so much,
Tom
Locked