cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
789
Views
0
Helpful
6
Replies

Monitoring Cisco equipment

alex3105
Level 1
Level 1

Good morning,

I have Cisco UCS 6248UP 48, Cisco UCS C220, Cisco UCS B200 M4 Blade Server, and Cisco UCS 5108 Blade Server Chassis that I want to monitor with Nagios.

I have my Nagios 4.4.1 server where I already have Cisco switches and other equipment too. But I have problems when I want to use plugins with these devices.

I tried to use the cisco-ucs-nagios-0.9.4.tar and cisco-imc-nagios-0.9.4.tar and I get the same error when installing it

[root @ localhost cisco-imc-nagios-0.9.4] # ./installer.py
File "./installer.py", line 94
except Exception, cfg_err:
^
SyntaxError: invalid syntax

Could you please indicate how to fix it or if they are the right plugins to monitor my equipment

Greetings from Peru.

6 Replies 6

Sergey Lisitsin
VIP Alumni
VIP Alumni

alex3105,

 

This is clearly a Python error, so you would be better off asking this on the likes of stackoverflow.com. Another thing that I would suggest is check whether you have got all the required Python modules installed and if you are running the correct version of Python.

Ok .. I could confirm with which of the plugins I can monitor the equipment.

OK, I've had a quick look and it appears like the script writers are missing parentheses in a few places. Can you please open the file installer.py in a text editor and modify the following lines:
line 94 replace
except Exception, cfg_err:
with:
except (Exception, cfg_err):
line 122 replace
except Exception, err:
with:
except (Exception, err):
and finally line 479 replace
except Exception, err:
with
except (Exception, err):

Make sure to keep the indentation levels the same. Basically, you just add parentheses AFTER the keyword "except " and BEFORE the colon sign in these 3 lines.
When you do that, save the file and try to launch it again.

Thanks for the help .. I made the changes but now the message appears You could indicate me how to correct it .. apparently there are several parentheses ..

 

[root@localhost cisco-ucs-nagios-0.9.4]# ./installer.py
File "./installer.py", line 125
print str(err)
^
SyntaxError: invalid syntax

OK, this is just an output in case of an error. Not sure why it doesn't like it, but you can try to comment it putting # symbol in the beginning of line 125. In case of that particular error you won't have the error code, but we are trying to get it installed without errors, so shouldn't have too big of an impact.

Add several corrections to the file but unfortunately I can not make it work .. It is missing several parentheses and has syntax errors that hinder its operation .. If someone had the file corrected for Nagios 4.4.1 and Centos 7 I will thank you.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card