Open Wolvverine opened 3 years ago
Use the updated version on https://github.com/aklyuk/zabbix-ibm-storwize/pull/6
when I run storwize_get_state.py in python 3 it gives error "bytes-like object is required not 'str'" what do I need to do in the code?
pyton2 problem:
/usr/lib/python2.7/site-packages/paramiko/transport.py:33: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release. from cryptography.hazmat.backends import default_backend Traceback (most recent call last): File "./storwize_get_state.py", line 358, in
main()
File "./storwize_get_state.py", line 349, in main
result_discovery = discovering_resources(arguments.storwize_user, arguments.storwize_password, arguments.storwize_ip, arguments.storwize_port, arguments.storage_name, list_resources)
File "./storwize_get_state.py", line 234, in discovering_resources
return send_data_to_zabbix(xer, storage_name)
File "./storwize_get_state.py", line 161, in send_data_to_zabbix
send_code = subprocess.call([sender_command, "-vv", "-c", config_path, "-s", storage_name, "-T", "-i", temp_file], stdout = subprocess.PIPE, stderr = subprocess.PIPE)
File "/usr/lib64/python2.7/subprocess.py", line 172, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib64/python2.7/subprocess.py", line 394, in init
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Python3:
File "./storwize_get_state.py", line 231 sys.exit("1100") ^ TabError: inconsistent use of tabs and spaces in indentation