Problem esxcli centos 7.X

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
nixe
Posts: 18
Joined: Tue Dec 12, 2017 9:17 am

Problem esxcli centos 7.X

Post by nixe »

Hello , when we try to execute a plugin from Nagios XI interface using the VMware SDK and esxcli command we get on the overview tab of the service this error: "Runtime error: coercing to Unicode: need string or buffer, NoneType found"
but if execute form command line or with the Button "Run check command" the plugin run fine

Code: Select all

[nagios@server libexec]$ pwd
/usr/local/nagios/libexec
[nagios@server libexec]$ ./check_esxcli_hpssacli -h 172.9.10.10 -d 22:9B:53:34:FB:C1:D6:51:A3:DA:C0:C4:C7:E6:47:9E:A9:5D:AF:32 -s 0
RAID OK - (HPE Smart Array E208i-a SR Gen10 in Slot 0 (Embedded) Array A logicaldrive 1 (7.28 TB, RAID 1+0, OK))
[nagios@nixecavm007 libexec]$ 
this script basically. execute the /usr/bin/esxcli and run a comand on vmware

Searching on the forum we find this post: https://support.nagios.com/forum/viewto ... =7&t=51535
but seems to be closed without solution

any information about how we can fix it?

Regards, Pablo
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Problem esxcli centos 7.X

Post by ssax »

If you edit the service and surround this with single-quotes, then apply config and force a check, does it work?

Code: Select all

'22:9B:53:34:FB:C1:D6:51:A3:DA:C0:C4:C7:E6:47:9E:A9:5D:AF:32'
Please PM or attach the plugin:

Code: Select all

/usr/local/nagios/libexec/check_esxcli_hpssacli
The only other thing I can think is maybe some environmental variables are being set for the nagios user when you SSH in but not when run from the backend without a TTY.
User avatar
nixe
Posts: 18
Joined: Tue Dec 12, 2017 9:17 am

Re: Problem esxcli centos 7.X

Post by nixe »

Hi. @ssax we trying with single quote, double quoute, whitout any quote, but the result is the same
i have multiple nagios instalacion and on all Centos/Rhel 7.X with the Vmware SDK 6.5 , 6.7 o 7.0 give this error on all
but on a nagios instalation on centos 6 with the same SDK 6.5 on the same platform (64 bit) the plugin work like a charm
and i repeate with console as nagios user or clicking on the button "run check command" on the CCM interface Works!!

PD: i send you the pluging via PM
thnx

regards , Pablo
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Problem esxcli centos 7.X

Post by ssax »

That plugin you sent has a different name than the plugin you listed in the forums here. Did you PM the proper one?

Please send me a copy of your profile from one of the systems you have it setup on, you can download it from Admin > System Profile by clicking the Download Profile button.
User avatar
nixe
Posts: 18
Joined: Tue Dec 12, 2017 9:17 am

Re: Problem esxcli centos 7.X

Post by nixe »

Hi @ssax i sent you the profile of a nagios test environment with the same problem via PM

Thnx
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Problem esxcli centos 7.X

Post by ssax »

The only PM from you I see only contains this file:

Code: Select all

check_esxcli_hparray.txt
There is no profile in any PM from you (again, I only see a single PM with and it only contains the file above). Please send it.
User avatar
nixe
Posts: 18
Joined: Tue Dec 12, 2017 9:17 am

Re: Problem esxcli centos 7.X

Post by nixe »

@ssax done!, I sent you the file again via PM

checkit!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Problem esxcli centos 7.X

Post by ssax »

Received, thank you, analyzing now.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Problem esxcli centos 7.X

Post by ssax »

PM sent. Please check.
User avatar
nixe
Posts: 18
Joined: Tue Dec 12, 2017 9:17 am

Re: Problem esxcli centos 7.X

Post by nixe »

ssax wrote:PM sent. Please check.
info sended :)
Locked