Skip to content

Commit

Permalink
compatibility with zabbix-smartmontools, #2
Browse files Browse the repository at this point in the history
  • Loading branch information
nobodysu committed Jun 2, 2018
1 parent cd2b743 commit 81f8718
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Win/mini_ipmi_ohmr.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@

# path to zabbix agent configuration file
agentConf = r'C:\zabbix_agentd.conf'
#agentConf = r'C:\zabbix\conf\zabbix_agentd.win.conf'

#senderPath = r'zabbix_sender'
senderPath = r'C:\zabbix-agent\bin\win32\zabbix_sender.exe'

timeout = '80' # how long the script must wait between LLD and sending, increase if data received late (does not affect windows)
# this setting MUST be lower than 'Update interval' in discovery rule

fallbackTjMax = '85' # this value will be set to 'mini.cpu.info[cpu{#CPU},TjMax]' when it's not found on processor
fallbackTjMax = '70' # this value will be set to 'mini.cpu.info[cpu{#CPU},TjMax]' when it's not found on processor
vcoreMax = '1.35' # maximum allowed voltage for system processor, not considering multiple CPUs
vttMax = '1.1' # processor-specific VTT, not considering multiple CPUs

Expand All @@ -34,7 +35,7 @@
import sys
import subprocess
import re
from sender_wrapper import (readConfig, processData)
from sender_wrapper import (readConfig, processData, fail_ifNot_Py3)


def getOutput():
Expand Down Expand Up @@ -283,6 +284,8 @@ def getCpuData():


if __name__ == '__main__':
fail_ifNot_Py3()

host = '"' + sys.argv[2] + '"'
senderData = []
jsonData = []
Expand Down Expand Up @@ -332,4 +335,6 @@ def getCpuData():
if not statusC:
senderData.append(host + ' mini.cpu.info[ConfigStatus] "' + getOutput_Out[0] + '"') # OS_NOCMD, OS_ERROR, UNKNOWN_EXC_ERROR, CONFIGURED

processData(senderData, jsonData, agentConf, senderPyPath, senderPath, timeout, host)
link = r'https://github.com/nobodysu/zabbix-mini-IPMI/issues'
processData(senderData, jsonData, agentConf, senderPyPath, senderPath, timeout, host, link)

0 comments on commit 81f8718

Please sign in to comment.