From ebdc3bf95a9e84b6dae8a5e4900a62c87600164e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=93=D1=80=D0=B5?= =?UTF-8?q?=D0=B1=D0=B5=D0=BD=D0=BA=D0=B8=D0=BD=5F1?= Date: Fri, 27 Apr 2018 13:49:21 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D1=81=D1=82=D1=80=D0=BE=D0=BA=D1=83=20=D0=B7=D0=B0?= =?UTF-8?q?=D0=BF=D1=83=D1=81=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRST_mon.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/IRST_mon.py b/IRST_mon.py index 3b12987..2803302 100755 --- a/IRST_mon.py +++ b/IRST_mon.py @@ -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