Page 2 of 2

Re: Monitoring Lenovo xclarity using Nagios

Posted: Mon May 04, 2020 6:31 pm
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.

Re: Monitoring Lenovo xclarity using Nagios

Posted: Mon May 04, 2020 6:49 pm
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

Re: Monitoring Lenovo xclarity using Nagios

Posted: Tue May 05, 2020 12:31 pm
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.

Re: Monitoring Lenovo xclarity using Nagios

Posted: Tue May 05, 2020 12:58 pm
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

Re: Monitoring Lenovo xclarity using Nagios

Posted: Wed Jun 03, 2020 1:05 am
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.

Re: Monitoring Lenovo xclarity using Nagios

Posted: Wed Jun 03, 2020 4:22 pm
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?