Monitoring Lenovo xclarity using Nagios
Monitoring Lenovo xclarity using Nagios
Hi,
We are using Lenovo hardware and we have Xclarity admin for monitoring the all the servers.
We tried to integrate Xclarity to nagios referring the link below.
https://sysmgt.lenovofiles.com/help/ind ... lcome.html
Completed till step 4 successfully and from step 5 its all execution in command line.
We have Nagios XI installed and we would like to proceed from step 5 in Nagios XI.
Would be great if you could help on this since XI is UI based and easy to understand and setup.
Thanks.
We are using Lenovo hardware and we have Xclarity admin for monitoring the all the servers.
We tried to integrate Xclarity to nagios referring the link below.
https://sysmgt.lenovofiles.com/help/ind ... lcome.html
Completed till step 4 successfully and from step 5 its all execution in command line.
We have Nagios XI installed and we would like to proceed from step 5 in Nagios XI.
Would be great if you could help on this since XI is UI based and easy to understand and setup.
Thanks.
Re: Monitoring Lenovo xclarity using Nagios
Once you've installed a plugin and can confirm it runs from the command there are only a few steps that need to be done in XI to complete the integration:
-define the command
-define a service to use the command
https://assets.nagios.com/downloads/nag ... ios-XI.pdf covers the details of these steps.
-define the command
-define a service to use the command
https://assets.nagios.com/downloads/nag ... ios-XI.pdf covers the details of these steps.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Monitoring Lenovo xclarity using Nagios
Hi,
Thanks for the document link share.
We tried the steps as mentioned in the link.
https://sysmgt.lenovofiles.com/help/ind ... lcome.html
In step 5 its mentioned we have to provide the instance name as given in step 3 (<XCLARITY_ADMINISTRATOR_NAME> is the name of the XClarity Administrator instance that you specified in step 3.)
But while executing step 3 command it did ask me only username password and URL.
So which name i can use it while defining the command and service.
And its throwing below error if i try with any name,
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
Thanks.
Thanks for the document link share.
We tried the steps as mentioned in the link.
https://sysmgt.lenovofiles.com/help/ind ... lcome.html
In step 5 its mentioned we have to provide the instance name as given in step 3 (<XCLARITY_ADMINISTRATOR_NAME> is the name of the XClarity Administrator instance that you specified in step 3.)
But while executing step 3 command it did ask me only username password and URL.
So which name i can use it while defining the command and service.
And its throwing below error if i try with any name,
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
Thanks.
Re: Monitoring Lenovo xclarity using Nagios
Use "system" for the instance name, let us know if that works.
Re: Monitoring Lenovo xclarity using Nagios
Tried to use 'system' as user name and added to NagiosXI.
But while service check getting the attached error.
Thanks.
But while service check getting the attached error.
Thanks.
You do not have the required permissions to view the files attached to this post.
Re: Monitoring Lenovo xclarity using Nagios
What I meant was for you to use your standard username and password for the configurator but use the system in the command definition:
Did you do that?
Are you using version 1.0.0 or 1.1.0? 1.1.0 version is here:
Code: Select all
command_line $USER1$/xclarity_integrator_check.py --lxca systemAre you using version 1.0.0 or 1.1.0? 1.1.0 version is here:
Code: Select all
https://support.lenovo.com/ro/en/solutions/HT507298Re: Monitoring Lenovo xclarity using Nagios
Yes , i tried doing the same.
And the Xclarity version we are using is 2.6.0.
Please let me know the corresponding plugin to be used.
Thanks.
And the Xclarity version we are using is 2.6.0.
Please let me know the corresponding plugin to be used.
Thanks.
Re: Monitoring Lenovo xclarity using Nagios
Use this one here and rerun through the procedure to generate your credentials:
https://support.lenovo.com/ro/en/solutions/HT507298
Make sure you su - nagios before running the commands:
https://sysmgt.lenovofiles.com/help/ind ... lcome.html
https://support.lenovo.com/ro/en/solutions/HT507298
Make sure you su - nagios before running the commands:
https://sysmgt.lenovofiles.com/help/ind ... lcome.html
Re: Monitoring Lenovo xclarity using Nagios
We tried the below and please find the logs.
Kindly advise.
[root@XXXX libexec]# python xclarity_integrator_check_v1.0.0.py generate_credentials
Enter username: admin
Enter password:
Enter URL for LXCA instance (example: https://10.252.48.38)
URL: https://XX.XXX.XX.XX
Please set a password for your new keyring
Password:
Password (again):
Please input your password for the keyring
Password:
Please input your password for the keyring
Password:
Please input your password for the keyring
Password:
Traceback (most recent call last):
File "xclarity_integrator_check_v1.0.0.py", line 540, in <module>
generate_hash_credentials()
File "xclarity_integrator_check_v1.0.0.py", line 200, in generate_hash_credentials
certificate = get_certificate(url, username, password)
File "xclarity_integrator_check_v1.0.0.py", line 111, in get_certificate
return api_call_certificate("{0}/signingCertificate/pem".format(url), username, password)
File "xclarity_integrator_check_v1.0.0.py", line 82, in api_call_certificate
response.raise_for_status()
File "/usr/lib/python2.7/site-packages/requests/models.py", line 834, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden
Kindly advise.
[root@XXXX libexec]# python xclarity_integrator_check_v1.0.0.py generate_credentials
Enter username: admin
Enter password:
Enter URL for LXCA instance (example: https://10.252.48.38)
URL: https://XX.XXX.XX.XX
Please set a password for your new keyring
Password:
Password (again):
Please input your password for the keyring
Password:
Please input your password for the keyring
Password:
Please input your password for the keyring
Password:
Traceback (most recent call last):
File "xclarity_integrator_check_v1.0.0.py", line 540, in <module>
generate_hash_credentials()
File "xclarity_integrator_check_v1.0.0.py", line 200, in generate_hash_credentials
certificate = get_certificate(url, username, password)
File "xclarity_integrator_check_v1.0.0.py", line 111, in get_certificate
return api_call_certificate("{0}/signingCertificate/pem".format(url), username, password)
File "xclarity_integrator_check_v1.0.0.py", line 82, in api_call_certificate
response.raise_for_status()
File "/usr/lib/python2.7/site-packages/requests/models.py", line 834, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden
Re: Monitoring Lenovo xclarity using Nagios
You're not running the right script.
Use the script here:
https://support.lenovo.com/ro/en/solutions/HT507298
Likely need to do this as well:
Code: Select all
cd /usr/local/nagios/libexec
python Xclarity_integrator_check.py generate_credentialshttps://support.lenovo.com/ro/en/solutions/HT507298
Likely need to do this as well:
Code: Select all
chown apache.nagios /usr/local/nagios/libexec/Xclarity_integrator_check.py
chmod ug+x /usr/local/nagios/libexec/Xclarity_integrator_check.py