Monitoring Lenovo xclarity using Nagios

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ets_user
Posts: 78
Joined: Mon Mar 30, 2020 2:50 am

Re: Monitoring Lenovo xclarity using Nagios

Post by ets_user »

We are using Xclarity 2.6.0 version.
Can we use Xclarity 1.1.0 for the same?

If so below is the output after rying to run it with su - nagios user.
It seems libraries has to be added.

-bash-4.2$ python /usr/local/nagios/libexec/Xclarity_integrator_check.py generate_credentials
Traceback (most recent call last):
File "/usr/local/nagios/libexec/Xclarity_integrator_check.py", line 11, in <module>
from keyrings.cryptfile.cryptfile import CryptFileKeyring
File "/usr/lib/python2.7/site-packages/keyrings.cryptfile-1.3.4-py2.7.egg/keyrings/cryptfile/cryptfile.py", line 7, in <module>
from keyring.util import properties
ImportError: cannot import name properties

Please let me know how i can add this library.
ets_user
Posts: 78
Joined: Mon Mar 30, 2020 2:50 am

Re: Monitoring Lenovo xclarity using Nagios

Post by ets_user »

We have added the commdn below.
$USER1$/xclarity_integrator_check_v1.0.0.py --lxca system

And here is the error in Nagios XI.

Warning
(No output on stdout) stderr: Traceback (most recent call last):
File "/usr/local/nagios/libexec/xclarity_integrator_check_v1.0.0.py", line 553, in <module>
status_lxca_bad, status_lxca_good, exit_status = check_lxca(_args, write_to_log_flag)
File "/usr/local/nagios/libexec/xclarity_integrator_check_v1.0.0.py", line 483, in check_lxca
bad_devices, good_devices, exit_status = get_bad_devices(_args.lxca)
File "/usr/local/nagios/libexec/xclarity_integrator_check_v1.0.0.py", line 206, in get_bad_devices
devices = get_devices(lxca_instance).get("nodeList")
File "/usr/local/nagios/libexec/xclarity_integrator_check_v1.0.0.py", line 92, in get_devices
return api_call("{0}/nodes?includeAttributes=name,overallHealthState,ipv4Addresses&status=managed".format(storedUrl), lxca_instance)
File "/usr/local/nagios/libexec/xclarity_integrator_check_v1.0.0.py", line 74, in api_call
f.write(certificate)
TypeError: expected a character buffer object
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Monitoring Lenovo xclarity using Nagios

Post by ssax »

The system requirements show that it requires python 3.5.2 at the minimum:

https://sysmgt.lenovofiles.com/help/top ... cp=6_3_3_0

Let me look to see how this is done.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Monitoring Lenovo xclarity using Nagios

Post by ssax »

Run these commands to set it up:

Code: Select all

cd /usr/local/nagios/libexec
wget https://download.lenovo.com/servers/xclarity_integrator_check.py
chown apache.nagios xclarity_integrator_check.py
chmod ug+x xclarity_integrator_check.py
yum install python3 python36-keyring python36-requests -y
pip3 install keyrings.cryptfile pbkdf2
su - nagios
cd /usr/local/nagios/libexec
python3 xclarity_integrator_check.py generate_credentials
Use this for your command line:

Code: Select all

command_line /bin/python3 $USER1$/xclarity_integrator_check.py --lxca system
ets_user
Posts: 78
Joined: Mon Mar 30, 2020 2:50 am

Re: Monitoring Lenovo xclarity using Nagios

Post by ets_user »

Hi,

We have done the setup as advised.

But when we try to send the trap from Xclarity we are getting it in tcpdump.

We cannot see it in the snmp logs or the unknown logs and also not in the received traps in NagiosXI even we defined the MIB events.

PS: we are able to see other traps to confirm that it is working.

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

Re: Monitoring Lenovo xclarity using Nagios

Post by ssax »

I don't think that plugin has anything to do with SNMP traps.

Does this command now work?

Code: Select all

/bin/python3 /usr/local/nagios/libexec/xclarity_integrator_check.py --lxca system
For SNMP traps, did you follow this guide?

Code: Select all

https://assets.nagios.com/downloads/nagiosxi/docs/SNMP-Traps-With-NXTI.pdf
Are you seeing them in Admin > Unconfigured Objects?
Locked