cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
32655
Views
110
Helpful
40
Comments
Jeffrey Foster
Cisco Employee
Cisco Employee

This version of the UCS Manager Nagios Plug-In is deprecated because it used a deprecated Python SDK


The following Nagios Plug-Ins are available for download from Cisco:

Cisco UCS Manager Plugin Release 0.9.4 for Nagios:

Details on this Release

Downloads (deprecated - no support provided for the 0.9.4 release on current Nagios versions):

Download Cisco UCS Manager Plugin Release 0.9.4 for Nagios

Documentation:

User Guide for Cisco UCS Manager Plugin Release 0.9.4 for Nagios

------------------------------

Cisco IMC Plugin Release 0.9.3 for Nagios:

Details on this release

Downloads:

Download Cisco IMC Plugin Release 0.9.3 for Nagios

Documentation:

User Guide for Cisco IMC Plug-In Release 0.9.3 for Nagios

Also available on Nagios exchange:

http://planet.nagios.org/archives/84-nagios-exchange/6338-cisco-imc-plugin

Note: Support is available only through the Cisco Communities forum.

External customers - For any queries/feedback on Plugins for Nagios, add a discussion to the Cisco Developed Integrations sub-space on Cisco UCS Communities

Internal (Cisco) customers and employees - Contact us at ucs-nagios@cisco.com for support questions and ask-ucs-tme@cisco.com or ask-ucs-pm@cisco.com for roadmap questions and feedback.

Comments
lapperb
Community Member

Eric,

Hoping you can give me a little push to help me get the Nagios plugin going.  I satisfied all the prerequisites (I believe) for the installation, but the auto discovery script is failing.  I am attempting to query a UCS C200 M2 server with the plugin.  Here is my command...

./cisco_imc_nagios -H 192.168.10.66 -u admin -p greendog91 -t class -q computeRackUnitMbTempStats -a ambientTemp -w 30 -c 50./cisco_imc_nagios -H 192.168.10.66 -u admin -p ********** -t class -q computeRackUnitMbTempStats -a ambientTemp -w 30 -c 50

...and here is the error I am receiving...

ImcValidationException  Message >> [ErrorMessage]: [Error]: Login : Invalid IMC Server <192.168.10.66>ImcValidationException  Message >> [ErrorMessage]: [Error]: Login : Invalid IMC Server <192.168.10.66>

Thanks,

Brian

Jeffrey Foster
Cisco Employee
Cisco Employee

Hi Brian,

I highly suspect the behavior you are seeing is a result of the firmware version you are running. This integration was intended for Cisco IMC 1.5 and later which is not supported on the C200 M2 platform. There is an early implementation of the XML API which is why you are seeing an error, but I do not believe we implemented the data you are requesting until 1.5.

If you have an M3 system running Cisco IMC 1.5 (or later) - could you try with that system?

Jeff

lapperb
Community Member

Thanks Jeff. Unfortunately, we do not have any newer UCS servers in our lab to try. I have a Nagios plugin that implements the XML API and that works for the most part. The only problem is it seems to leak TCP connections. After a period of time, the UCS machine being queried by the plugin builds up TCP connections in the "CLOSE WAIT" status to the point where all ports are consumed and the CIMC stops responding. I can reboot the CIMC to clean them up and it starts working again. The plugin uses the Google Go programming language. Do you have any insight into this issue? If so, I can include the plugin script and any additional details you may need for you to have a look.

Thanks,

Brian

Jeffrey Foster
Cisco Employee
Cisco Employee

Hi Brian,

The XML API model was rather small with IMC v1.4, was expanded significantly with v1.5 (and further still with v2.0). There are many new classes/objects and capabilities that are available in these updated CIMC versions. The session handling behavior you are describing was fixed in 1.5(4) where some development environments do not clean up old sessions with aaaLogout - leading to cases where the system reaches the maximum number of XML API sessions. Performing operations where you Login and Logout, or login and leverage the same session cookie where possible are best practices for leveraging this interface.

Jeff

hslai
Cisco Employee
Cisco Employee

I am trying this against CIMC 2.0(1a) on a UCS C220 M3 and getting "Exception: [ErrorMessage]: [Error]: Login : Invalid IMC Server" from ./NagiosAutoDiscoveryIMC.py

The same results with SSL and nonSSL.

Is this also incompatible?

pratripa
Level 1
Level 1

Hi Hslai,

Can you please confirm the  version of IMC Python SDK that you are using ?

You can find that by running the following

# python

Python 2.4.3 (#1, Jan  9 2013, 06:47:03)

on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> import ImcSdk

>>> ImcSdk.__version__

'0.6.2'

>>>

If you are running an older version than 0.6.2 then I will suggest you to update to the latest version available in the communities.

https://communities.cisco.com/docs/DOC-50404

Also can you please share the output of the following python script below.

from ImcSdk import *

h=ImcHandle()

h.SetDumpXml()

h.Login('CIMC IP','user','password')

h.Logout()

Regards

-Prateek

Steve Galambos
Level 1
Level 1

Is there a list of class and dn parameters that can be used when querying a c-series IMC? I went through all of the documentation I could find, and it all has plenty of examples, but there doesn't seem to be a complete list of available parameters anywhere.

Jeffrey Foster
Cisco Employee
Cisco Employee

Hi Steve,

We continue to evolve the XML API and add more features and capabilities with each subsequent release. As a result, we have kept our documentation, including the XML API Programmers Guide more about the tools and principles than the specifics of the model - classes, attributes, etc.

That said, there are a few tools that are available to you to help with this from the Cisco IMC -

1. The first is the model browser, Visore. To get to Visore, navigate to https://<CIMCIP>/visore.html. Visore will require you to authenticate and from there you can query classes, navigate the model either using relationships (parent/child) or via a query. The Visore tool will also provide the XML passed to the IMC and the response from the IMC for your reference.

2. The second are the schema files (RACK-IN and RACK-OUT):

https://<CIMCIP>/visore/RACK-OUT.xsd   <-- Out Schema File

https://<CIMCIP>/visore/RACK-IN.xsd   <-- In Schema File


These definition files are where you will find a list of classes, objects, enumerated values, etc. which are specific to the version of the Cisco IMC that you are running. If you take a look at the OUT Schema, you will find the details that it sounds like you are looking for.

This sounds like it will satisfy your request (based on the version of IMC code you are running). Cheers!


Jeff

Rudolf Kleijwegt
Community Member

Guys,

How is the development of this plugin organised? Can I raise issues that can be improved?

For instance the way hostgroups are managed could be better. For now I edited my local copy of UcsNagiosFileHandler.py but I can imagine other users cope with this problem as well.

Rudolf

arusrini
Cisco Employee
Cisco Employee

Rudolf,

Do let us know what you'd like to see improved and we will address them at the earliest. What improvements would you like to see in hostgroups?

Arun

Rudolf Kleijwegt
Community Member

Hi Arun,

Right now the autodiscovery uses a hostsgrp.cfg file that specifies host groups using the members directive. Aditionally all the host object definitions contain a hostgroups directive and both seem to define the same host groups. I'm no Nagios guru but according to the documentation these are merged at runtime so it should run fine.


But when you want to add your own hostgroups this becomes a problem. For me it would be preferable to configure custom hostgroups in the cisco-ucs-host template. But right now any hostgroup I add to that template is overwritten by the host definition's hostgroups directive.

So not using hostgroups in the host definitions seems like an ideal solution. At least for me it is.

Rudolf

arusrini
Cisco Employee
Cisco Employee

Rudolf,

Thanks for that level of detailing. We'll take a look.

Arun

javier.pobeda
Level 1
Level 1

Hi all,

I downloaded this plugin and run it into my centreon/nagios system and it worked just fine.

I had to manually load the .cfg files generated by the autodiscover.py from centreon web interface, just to try this plugin.

Great job!

dlh0000011
Community Member

Installed the plug-in, Cisco ICM and UCS SDKs.   Python 2.7.5 installed on the system (CentOS 7.0).

Getting the following: Error is of Type :   Exception  Message >> syntax error: line 1, column 0

Any help appreciated.

[root@server autodiscovery]# ./NagiosAutoDiscoveryUCS.py

UCS host information csv file   /root/zips/cisco-ucs-nagios-0.9.3/autodiscovery/UCSHostInfo.csv

/root/zips/cisco-ucs-nagios-0.9.3/autodiscovery/NagiosAutoDiscoveryUCS.cfg File exists

Removing the folder path : /usr/local/nagios/etc/cisco/ucsObjs

Copying the payload to /usr/local/nagios/etc/cisco/ucsObjs

------------------------------------------------------------

Connecting to UCS - '192.168.1.1' with user 'admin' and password 'ABCDEFGHIJKL'

Connect using NoSsl as 'False', port as '443' and  proxy as 'None'

Error while trying to discover :  192.168.1.1

Error is of Type :   Exception  Message >> syntax error: line 1, column 0

------------------------------------------------------------

Connecting to UCS - '192.168.1.2' with user 'admin' and password 'ABCDEFGHIJKL'

Connect using NoSsl as 'False', port as '443' and  proxy as 'None'

Error while trying to discover :  192.168.1.2

Error is of Type :   Exception  Message >> syntax error: line 1, column 0

Error while trying to auto discover UCS Infrastructure. Check if any of the UCS are reachable.

[root@server autodiscovery]#  /usr/local/nagios/libexec/cisco_ucs_nagios -H 192.168.1.1 -u admin -p 'Password' -t class -q EquipmentFan -n 443

Error is of Type :   ParseError  Message >> syntax error: line 1, column 0

Error while trying to run the UCS Nagios monitoring service.

Check for Nagios logs as it may help finding error details.

[root@server autodiscovery]#

prvashis
Cisco Employee
Cisco Employee

Hi David,

Can you please provide us with the following details

- Which version of Cisco UCS Python SDK are you using currently ?

- What is the Cisco UCS firmware version on 192.168.1.1 that you are using ?

- If possible can you provide the output for the following

     #./NagiosAutoDiscoveryUCS.py --version

   #./NagiosAutoDiscoveryUCS.py --debug

- Please provide o/p of the plugin with --debug option.

   # /usr/local/nagios/libexec/cisco_ucs_nagios -H 192.168.1.1 -u admin -p 'Password' -t class -q EquipmentFan -n 443 --debug


This information will help us understand your problem better.


Regards,

Prateek

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:

Quick Links