Browse Source

Поправил строку запуска

master
Михаил Гребенкин_1 7 years ago
parent
commit
ebdc3bf95a
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      IRST_mon.py

+ 4
- 1
IRST_mon.py View File

@ -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


Loading…
Cancel
Save

Powered by TurnKey Linux.