aklyuk / zabbix-hp-3par

16 stars 15 forks source link

Problem Discovery External Script #4

Open leandroschatts opened 3 years ago

leandroschatts commented 3 years ago

Hello, I'm having a problem to run in the zabbix item (External Script), running in the shell it works normally, but if run by zabbix it returns this error below:

My Zabbix: 5.0.13

Ubuntu 20.04

Python3

Value of type "string" is not suitable for value type "Numeric (unsigned)". Value "Traceback (most recent call last):

File "/usr/lib/zabbix/externalscripts/hp_3par_get_state_wbem.py", line 171, in discovering_resources

instances = hp_connect.EnumerateInstances(CIM_class, PropertyList=["Name","ElementName","DeviceID", "Tag", "SerialNumber", "Manufacturer"])

File "/usr/local/lib/python3.8/dist-packages/pywbem/_cim_operations.py", line 2645, in EnumerateInstances

result = self._imethodcall(

File "/usr/local/lib/python3.8/dist-packages/pywbem/_cim_operations.py", line 1763, in _imethodcall

reply_data, self._last_server_response_time = wbem_request(

File "/usr/local/lib/python3.8/dist-packages/pywbem/_cim_http.py", line 389, in wbem_request

raise AuthError(msg, conn_id=conn.conn_id)

pywbem._exceptions.AuthError: WBEM server returned HTTP status 401 (Unauthorized). This is most likely an issue with userid/password, but for servers that implement resource access control it might also be an issue with the permissions of the userid.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/usr/lib/zabbix/externalscripts/hp_3par_get_state_wbem.py", line 362, in

main()

File "/usr/lib/zabbix/externalscripts/hp_3par_get_state_wbem.py", line 344, in main

result_discovery = discovering_resources(arguments.hp_user, arguments.hp_password, arguments.hp_ip, arguments.hp_port, arguments.storage_name, list_CIM_classes)

File "/usr/lib/zabbix/externalscripts/hp_3par_get_state_wbem.py", line 202, in discovering_resources

except pywbem.exceptions.TimeoutError as oops:

AttributeError: module 'pywbem' has no attribute 'exceptions'"