|  | @ -5,8 +5,9 @@ import subprocess | 
														
													
														
															
																|  |  | import json |  |  | import json | 
														
													
														
															
																|  |  | import sys |  |  | import sys | 
														
													
														
															
																|  |  | from pyzabbix import ZabbixMetric, ZabbixSender |  |  | from pyzabbix import ZabbixMetric, ZabbixSender | 
														
													
														
															
																|  |  |  |  |  | import os | 
														
													
														
															
																|  |  |  |  |  |  | 
														
													
														
															
																|  |  | command = 'rstcli64.exe --information' |  |  |  | 
														
													
														
															
																|  |  |  |  |  | command = str(os.path.join(os.path.dirname(sys.argv[0]), 'rstcli64.exe --information')) | 
														
													
														
															
																|  |  | hostname = 'srv-sbis01' |  |  | hostname = 'srv-sbis01' | 
														
													
														
															
																|  |  | server = '192.168.1.56' |  |  | server = '192.168.1.56' | 
														
													
														
															
																|  |  |  |  |  |  | 
														
													
												
													
														
															
																|  | @ -15,6 +16,7 @@ def exec(exe): | 
														
													
														
															
																|  |  | try: |  |  | try: | 
														
													
														
															
																|  |  | ret = result.communicate()[0].decode('utf-8') |  |  | ret = result.communicate()[0].decode('utf-8') | 
														
													
														
															
																|  |  | except Exception: |  |  | except Exception: | 
														
													
														
															
																|  |  |  |  |  | print(os.getcwd()) | 
														
													
														
															
																|  |  | return False |  |  | return False | 
														
													
														
															
																|  |  | else: |  |  | else: | 
														
													
														
															
																|  |  | return ret |  |  | return ret | 
														
													
												
													
														
															
																|  | @ -22,6 +24,7 @@ def exec(exe): | 
														
													
														
															
																|  |  |  |  |  |  | 
														
													
														
															
																|  |  | def discovery(txt): |  |  | def discovery(txt): | 
														
													
														
															
																|  |  | if not txt: |  |  | if not txt: | 
														
													
														
															
																|  |  |  |  |  | print(command) | 
														
													
														
															
																|  |  | print('ERROR') |  |  | print('ERROR') | 
														
													
														
															
																|  |  | exit(1) |  |  | exit(1) | 
														
													
														
															
																|  |  | array = 0 |  |  | array = 0 | 
														
													
												
													
														
															
																|  | 
 |