Page 1 of 1

ERROR:fetching Envmon table in script:sgichk_cisco_chassis.

Posted: Wed Aug 05, 2020 2:11 pm
by nmarbue79
Hi,
I am trying to monitor cisco model 9000 switch with script => ./sgichk_cisco_chassis.pl
from console it works fine as you can see in the output =>
./sgichk_cisco_chassis.pl -H XXX.XX.XX.XX -C XXXXXXX
OK: All Environmental Sensors ok
Switch 1 Slot 1 Temp: Outlet_A = 30 = Normal
Switch 1 Slot 1 Temp: Outlet_B = 30 = Normal
Switch 1 Slot 1 Temp: Inlet_A = 32 = Normal
Switch 1 Slot 1 Temp: Inlet_B = 30 = Normal
Switch 1 Slot 1 Temp: UADP_0_0 = 40 = Normal
Switch 1 Slot 1 Temp: UADP_0_1 = 39 = Normal
Switch 1 Slot 1 Temp: UADP_0_2 = 39 = Normal
Switch 1 Slot 1 Temp: UADP_0_3 = 40 = Normal
Switch 1 Slot 1 Temp: UADP_0_4 = 40 = Normal
Switch 1 Slot 1 Temp: UADP_0_5 = 39 = Normal
Switch 1 Slot 1 Temp: UADP_0_6 = 39 = Normal
Switch 1 Slot 1 Temp: UADP_0_7 = 42 = Normal
Switch 1 Slot 1 Temp: UADP_0_8 = 40 = Normal
Switch 1 Slot 1 Temp: Coretemp = 33 = Normal
Switch 1 Slot 1 Temp: OutletDB = 29 = Normal
Switch 2 Slot 1 Temp: Outlet_A = 34 = Normal
Switch 2 Slot 1 Temp: Outlet_B = 32 = Normal
Switch 2 Slot 1 Temp: Inlet_A = 35 = Normal
Switch 2 Slot 1 Temp: Inlet_B = 31 = Normal
Switch 2 Slot 1 Temp: UADP_0_0 = 44 = Normal
Switch 2 Slot 1 Temp: UADP_0_1 = 43 = Normal
Switch 2 Slot 1 Temp: UADP_0_2 = 43 = Normal
Switch 2 Slot 1 Temp: UADP_0_3 = 43 = Normal
Switch 2 Slot 1 Temp: UADP_0_4 = 44 = Normal
Switch 2 Slot 1 Temp: UADP_0_5 = 42 = Normal
Switch 2 Slot 1 Temp: UADP_0_6 = 42 = Normal
Switch 2 Slot 1 Temp: UADP_0_7 = 46 = Normal
Switch 2 Slot 1 Temp: UADP_0_8 = 44 = Normal
Switch 2 Slot 1 Temp: Coretemp = 35 = Normal
Switch 2 Slot 1 Temp: OutletDB = 32 = Normal
Switch 1 Fan 1/0 = Normal
Switch 2 Fan 0/0 = Normal
Switch 2 Fan 1/0 = Normal
Switch 1 Fan 0/0 = Normal
Switch 1 Power Supply 1 = Normal
Switch 2 Power Supply Module 0 = Normal
Switch 2 Power Supply 0 = Normal
Switch 2 Power Supply Module 1 = Normal
Switch 2 Power Supply 1 = Normal
Switch 1 Power Supply Module 0 = Normal
Switch 1 Power Supply 0 = Normal
Switch 1 Power Supply Module 1 = Normal

but inserting it into nagiosxi gives the following output error =>
ERROR:fetching Envmon table: "No response from remote host:xxxxxxxxx"

I attach a screenshot


Thank you, I'm looking forward for your answer

Re: ERROR:fetching Envmon table in script:sgichk_cisco_chass

Posted: Thu Aug 06, 2020 11:05 am
by scottwilkerson
Can you show the command you configured in Nagios XI for this plugin

Also, does the part you XXX out match what you used when running from the CLI?

Are there any special chars in the community string? If so did you escape them or quote them?

Re: ERROR:fetching Envmon table in script:sgichk_cisco_chass

Posted: Thu Aug 06, 2020 2:00 pm
by nmarbue79
the part XXX that is the host is the same in console as in commands in nagios I have 6 hosts and it happens to me in the 6 hosts, in console with the command ./sgichk_cisco_chassis.pl -H XXX.XX.XX.XX -C XXXXXXX works for all hosts, the command I do in nagios is =>$USER1$/sgichk_cisco_chassis.pl -H $ HOSTADDRESS $ -C $ COMMUNITY2 $,
I have rewritten it letter by letter without copying or pasting and it doesn't work.

I am attaching a screenshot, I don't know if it could be language settings

Re: ERROR:fetching Envmon table in script:sgichk_cisco_chass

Posted: Thu Aug 06, 2020 2:06 pm
by scottwilkerson

Code: Select all

$COMMUNIDAD2$
isn't a valid macro

Where are you trying to pull this value from?

Re: ERROR:fetching Envmon table in script:sgichk_cisco_chass

Posted: Thu Aug 06, 2020 2:09 pm
by scottwilkerson
If you have the actual community string there, it should not be surrounded by $ as this indicates a macro

Re: ERROR:fetching Envmon table in script:sgichk_cisco_chass

Posted: Fri Aug 07, 2020 3:20 am
by nmarbue79
In the file resources.cfg I have changed $ COMMUNITY2 $ for $ USER5 $ also change it in the command USER1 $ / sgichk_cisco_chassis.pl -H $ HOSTADDRESS $ -C $ COMMUNITY2 $ for USER1 $ / sgichk_cisco_chassis.pl -H $ HOSTADDRESS $ - C $ USER5 $ and everything worked correctly, it seems that the variables in the resources file have to be $ USER1 $, $ USER2 $ ......

thank you very much it is solved

Re: ERROR:fetching Envmon table in script:sgichk_cisco_chass

Posted: Fri Aug 07, 2020 7:35 am
by scottwilkerson
nmarbue79 wrote:In the file resources.cfg I have changed $ COMMUNITY2 $ for $ USER5 $ also change it in the command USER1 $ / sgichk_cisco_chassis.pl -H $ HOSTADDRESS $ -C $ COMMUNITY2 $ for USER1 $ / sgichk_cisco_chassis.pl -H $ HOSTADDRESS $ - C $ USER5 $ and everything worked correctly, it seems that the variables in the resources file have to be $ USER1 $, $ USER2 $ ......

thank you very much it is solved
Great!

Locking thread