|  |  | @ -5,8 +5,9 @@ import subprocess | 
			
		
	
		
			
				
					|  |  |  | import json | 
			
		
	
		
			
				
					|  |  |  | import sys | 
			
		
	
		
			
				
					|  |  |  | 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' | 
			
		
	
		
			
				
					|  |  |  | server = '192.168.1.56' | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
	
		
			
				
					|  |  | @ -15,6 +16,7 @@ def exec(exe): | 
			
		
	
		
			
				
					|  |  |  | try: | 
			
		
	
		
			
				
					|  |  |  | ret = result.communicate()[0].decode('utf-8') | 
			
		
	
		
			
				
					|  |  |  | except Exception: | 
			
		
	
		
			
				
					|  |  |  | print(os.getcwd()) | 
			
		
	
		
			
				
					|  |  |  | return False | 
			
		
	
		
			
				
					|  |  |  | else: | 
			
		
	
		
			
				
					|  |  |  | return ret | 
			
		
	
	
		
			
				
					|  |  | @ -22,6 +24,7 @@ def exec(exe): | 
			
		
	
		
			
				
					|  |  |  |  | 
			
		
	
		
			
				
					|  |  |  | def discovery(txt): | 
			
		
	
		
			
				
					|  |  |  | if not txt: | 
			
		
	
		
			
				
					|  |  |  | print(command) | 
			
		
	
		
			
				
					|  |  |  | print('ERROR') | 
			
		
	
		
			
				
					|  |  |  | exit(1) | 
			
		
	
		
			
				
					|  |  |  | array = 0 | 
			
		
	
	
		
			
				
					|  |  | 
 |