Browse Source

Initial commit

master
Mikhail Grebenkin 6 years ago
commit
48e401e050
4 changed files with 981 additions and 0 deletions
  1. +169
    -0
      megacli_parser/megacli_parse.py
  2. +623
    -0
      megacli_parser/mix_megacli_parser.xml
  3. +62
    -0
      sensors_parser/sensors_parse.py
  4. +127
    -0
      sensors_parser/zbx_export_mixTemplate_sensors.xml

+ 169
- 0
megacli_parser/megacli_parse.py View File

@ -0,0 +1,169 @@
#! /usr/bin/env python
import subprocess
import sys
import os
import time
ld_file = "/tmp/megacli-logical.out"
pd_file = "/tmp/megacli-physical.out"
ld_cmd = "cat /opt/py/megacli-logical.out"
pd_cmd = "cat /opt/py/megacli-physical.out"
pd_dict = dict(slot='Slot Number', port_stat='Port status', size='Raw Size', data='Inquiry Data',
temp='Drive Temperature ', smart_err='Drive has flagged a S.M.A.R.T alert',
manufacter='Inquiry Data', model='Inquiry Data', serial='Inquiry Data')
ld_dict = dict(num='Virtual Drive:', raid_lvl='RAID Level ', size='Size', state='State', pd_count='Number Of Drives')
def f_ld_discover(cli_out):
drives = []
linesplit = ''
for line in cli_out:
if 'Virtual Drive:' in line:
linesplit = line.split(' ')
drives.append(str(linesplit[2]))
return drives
def f_pd_discover(cli_out):
drives = []
linesplit = ''
for line in cli_out:
if 'Slot Number:' in line:
linesplit = line.split(' ')
drives.append(str(linesplit[2]))
return drives
def f_json_print(inp, name):
first = True
print("{")
print("\t\"data\":[")
for key in inp:
if not first:
sys.stdout.write(",")
else:
first = False
sys.stdout.write("\n\t\t{\"{#" + name + "}\":\"" + key + "\"}")
print("\n\t]")
print("}")
def f_read_file(path):
cli_out = []
try:
f = open(path, 'r')
except Exception:
print(Exception)
return []
else:
for line in f.readlines():
cli_out.append(line.strip())
f.close()
return cli_out
def f_read_cli(cmd, outfile):
outdata, stderr = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True).communicate()
try:
f = open(outfile, 'w')
except Exception:
return 1
else:
f.write(outdata)
f.close()
return 0
def f_get_pd_val(slot, val, source):
data = f_read_file(source)
k = 0
out = ""
for line in data:
if pd_dict['slot'] in line:
# print(line.strip().split(':')[1].strip())
if line.strip().split(':')[1].strip() == slot:
k = 1
if k == 0:
continue
if k == 1:
if pd_dict[val] in line:
out = line.strip().split(':')[1].strip().split()
if out != "":
break
if len(out) == 1 and out[0].isdigit():
return out[0]
elif val == 'smart_err':
if out[0] == 'No':
return '0'
else:
return '1'
elif val == "manufacter":
return out[0].strip()
elif val == "model":
return out[1].strip()
elif val == "serial":
return out[2].strip()
elif val == 'size':
return out[0]
elif val == 'port_stat':
if out[0] == 'Active':
return '1'
else:
return '0'
elif val == 'temp':
return out[0][:-1]
def f_get_ld_val(num, val, source):
data = f_read_file(source)
k = 0
out = ""
for line in data:
if ld_dict['num'] in line:
if line.split(':')[1].strip().split()[0].strip() == num:
k = 1
if k == 0:
continue
if k == 1:
if ld_dict[val] in line:
out = line.split(':')[1].strip()
if out != "":
break
if val == 'raid_lvl':
return out
elif val == 'size':
return out.split()[0]
elif val == 'state':
if out.strip() == 'Optimal':
return '0'
else:
return '1'
elif val == 'pd_count':
return out.strip()
return out
if __name__ == '__main__':
if len(sys.argv) == 1 or len(sys.argv) == 3 or len(sys.argv) > 4:
print("Wrong args. Cache will be updated if necessary")
stat_pd = os.stat(pd_file)
stat_ld = os.stat(ld_file)
if (float(time.time()) - float(stat_pd.st_ctime)) > 50:
f_read_cli(pd_cmd, pd_file)
if (float(time.time()) - float(stat_ld.st_ctime)) > 50:
f_read_cli(ld_cmd, ld_file)
if len(sys.argv) == 2:
if sys.argv[1] == "ld":
f_json_print(f_ld_discover(f_read_file(ld_file)), "LD")
if sys.argv[1] == "pd":
f_json_print(f_pd_discover(f_read_file(pd_file)), "PD")
elif len(sys.argv) == 4:
if sys.argv[1] == 'pd':
if sys.argv[3] in pd_dict.keys():
print(f_get_pd_val(sys.argv[2], sys.argv[3], pd_file))
if sys.argv[1] == 'ld':
if sys.argv[3] in ld_dict.keys():
print(f_get_ld_val(sys.argv[2], sys.argv[3], ld_file))

+ 623
- 0
megacli_parser/mix_megacli_parser.xml View File

@ -0,0 +1,623 @@
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>2.0</version>
<date>2015-11-18T08:30:50Z</date>
<groups>
<group>
<name>mix_template</name>
</group>
</groups>
<templates>
<template>
<template>mix_megacli_parser</template>
<name>mix_megacli_parser</name>
<groups>
<group>
<name>mix_template</name>
</group>
</groups>
<applications>
<application>
<name>logical_disks</name>
</application>
<application>
<name>physical_disks</name>
</application>
</applications>
<items/>
<discovery_rules>
<discovery_rule>
<name>logical_disc_discovery</name>
<type>0</type>
<snmp_community/>
<snmp_oid/>
<key>megacli_parser[ld]</key>
<delay>3600</delay>
<status>0</status>
<allowed_hosts/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<delay_flex/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<filter>{#LD}:</filter>
<lifetime>30</lifetime>
<description/>
<item_prototypes>
<item_prototype>
<name>logical_disc {#LD} physical disc count</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>megacli_parser[ld,{#LD},pd_count]</key>
<delay>3600</delay>
<history>90</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units/>
<delta>0</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>logical_disks</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
</item_prototype>
<item_prototype>
<name>logical_disc {#LD} raid level</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>megacli_parser[ld,{#LD},raid_lvl]</key>
<delay>3600</delay>
<history>90</history>
<trends>365</trends>
<status>0</status>
<value_type>4</value_type>
<allowed_hosts/>
<units/>
<delta>0</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>logical_disks</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
</item_prototype>
<item_prototype>
<name>logical_disc {#LD} size</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>megacli_parser[ld,{#LD},size]</key>
<delay>3600</delay>
<history>90</history>
<trends>365</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units>GB</units>
<delta>0</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>logical_disks</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
</item_prototype>
<item_prototype>
<name>logical_disc {#LD} state</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>megacli_parser[ld,{#LD},state]</key>
<delay>60</delay>
<history>90</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units/>
<delta>0</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>logical_disks</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
</item_prototype>
</item_prototypes>
<trigger_prototypes>
<trigger_prototype>
<expression>{mix_megacli_parser:megacli_parser[ld,{#LD},state].last()}#0</expression>
<name>raid state {#LD} not optimal</name>
<url/>
<status>0</status>
<priority>5</priority>
<description/>
<type>0</type>
</trigger_prototype>
</trigger_prototypes>
<graph_prototypes/>
<host_prototypes/>
</discovery_rule>
<discovery_rule>
<name>physical_disc_discovery</name>
<type>0</type>
<snmp_community/>
<snmp_oid/>
<key>megacli_parser[pd]</key>
<delay>3600</delay>
<status>0</status>
<allowed_hosts/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<delay_flex/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<filter>{#PD}:</filter>
<lifetime>30</lifetime>
<description/>
<item_prototypes>
<item_prototype>
<name>physical disk {#PD} manufacter</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>megacli_parser[pd,{#PD},manufacter]</key>
<delay>3600</delay>
<history>90</history>
<trends>365</trends>
<status>0</status>
<value_type>4</value_type>
<allowed_hosts/>
<units/>
<delta>0</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>physical_disks</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
</item_prototype>
<item_prototype>
<name>physical disk {#PD} model</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>megacli_parser[pd,{#PD}},model]</key>
<delay>3600</delay>
<history>90</history>
<trends>365</trends>
<status>0</status>
<value_type>4</value_type>
<allowed_hosts/>
<units/>
<delta>0</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>physical_disks</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
</item_prototype>
<item_prototype>
<name>physical disk {#PD} port status</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>megacli_parser[pd,{#PD},port_stat]</key>
<delay>60</delay>
<history>90</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units/>
<delta>0</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>physical_disks</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
</item_prototype>
<item_prototype>
<name>physical disk {#PD} serial</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>megacli_parser[pd,{#PD},serial]</key>
<delay>3600</delay>
<history>90</history>
<trends>365</trends>
<status>0</status>
<value_type>4</value_type>
<allowed_hosts/>
<units/>
<delta>0</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>physical_disks</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
</item_prototype>
<item_prototype>
<name>physical disk{#PD} size</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>megacli_parser[pd,{#PD},size]</key>
<delay>3600</delay>
<history>90</history>
<trends>365</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units>GB</units>
<delta>0</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>physical_disks</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
</item_prototype>
<item_prototype>
<name>physical disk {#PD} smart error</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>megacli_parser[pd,{#PD},smart_err]</key>
<delay>60</delay>
<history>90</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units/>
<delta>0</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>physical_disks</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
</item_prototype>
<item_prototype>
<name>physical disk {#PD} temp</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>megacli_parser[pd,{#PD},temp]</key>
<delay>60</delay>
<history>90</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units>C</units>
<delta>0</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>physical_disks</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
</item_prototype>
</item_prototypes>
<trigger_prototypes>
<trigger_prototype>
<expression>{mix_megacli_parser:megacli_parser[pd,{#PD},port_stat].last()}#1</expression>
<name>physical disk {#PD} port status not Active</name>
<url/>
<status>0</status>
<priority>5</priority>
<description/>
<type>0</type>
</trigger_prototype>
<trigger_prototype>
<expression>{mix_megacli_parser:megacli_parser[pd,{#PD},smart_err].last()}#0</expression>
<name>physical disk {#PD} smart error</name>
<url/>
<status>0</status>
<priority>5</priority>
<description/>
<type>0</type>
</trigger_prototype>
<trigger_prototype>
<expression>{mix_megacli_parser:megacli_parser[pd,{#PD},temp].last()}&gt; 60</expression>
<name>physical disk {#PD} temp &gt; 60С</name>
<url/>
<status>0</status>
<priority>4</priority>
<description/>
<type>0</type>
</trigger_prototype>
<trigger_prototype>
<expression>{mix_megacli_parser:megacli_parser[pd,{#PD},temp].last()}&gt; 70</expression>
<name>physical disk {#PD} temp &gt; 70С</name>
<url/>
<status>0</status>
<priority>5</priority>
<description/>
<type>0</type>
</trigger_prototype>
</trigger_prototypes>
<graph_prototypes/>
<host_prototypes/>
</discovery_rule>
</discovery_rules>
<macros/>
<templates/>
<screens/>
</template>
</templates>
</zabbix_export>

+ 62
- 0
sensors_parser/sensors_parse.py View File

@ -0,0 +1,62 @@
#! /usr/bin/env python
import subprocess
import sys
def f_parse(sens_out):
CPUN = 0
firstCPU = True
coreN = 0
dimm = "0"
ret = {}
line_sp = ""
for line in sens_out:
if "DIMM" in line:
line_sp = line.split()
dimm = "DIMM" + line_sp[1] + "-" + line_sp[3][0]
ret[dimm] = line_sp[4][1:-3]
elif "coretemp" in line:
if firstCPU:
firstCPU = False
else:
CPUN = CPUN + 1
elif "Core" in line:
line_sp = line.split()
coreN = "core" + str(CPUN) + "-" + line_sp[1][0]
ret[coreN] = line_sp[2][1:-3]
return(ret)
def f_sensors():
res = subprocess.Popen(['sudo sensors'], stdout=subprocess.PIPE, shell=True)
sensors_out = res.stdout.readlines()
return(sensors_out)
def f_main():
sensors_out = f_sensors()
sensors_parsed = f_parse(sensors_out)
return(sensors_parsed)
def f_json_print(inp):
first = True
print("{")
print("\t\"data\":[")
for key in inp:
if not first:
sys.stdout.write(",")
else:
first = False
sys.stdout.write("\n\t\t{\"{#SENSOR}\":\"" + key + "\"}")
print("\n\t]")
print("}")
if __name__ == '__main__':
out = {}
out = f_main()
if len(sys.argv) == 2 and sys.argv[1]:
print((out.get(sys.argv[1], "error")))
else:
f_json_print(out)

+ 127
- 0
sensors_parser/zbx_export_mixTemplate_sensors.xml View File

@ -0,0 +1,127 @@
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>2.0</version>
<date>2015-03-13T07:29:32Z</date>
<groups>
<group>
<name>Linux servers</name>
</group>
</groups>
<templates>
<template>
<template>mixTemplate_linux_sensors</template>
<name>mixTemplate_linux_sensors</name>
<groups>
<group>
<name>Linux servers</name>
</group>
</groups>
<applications>
<application>
<name>Temperature</name>
</application>
</applications>
<items/>
<discovery_rules>
<discovery_rule>
<name>sensors_detect</name>
<type>0</type>
<snmp_community/>
<snmp_oid/>
<key>sensors_parse</key>
<delay>600</delay>
<status>0</status>
<allowed_hosts/>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<delay_flex/>
<params/>
<ipmi_sensor/>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<filter>:</filter>
<lifetime>90</lifetime>
<description/>
<item_prototypes>
<item_prototype>
<name>{#SENSOR} temp</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>sensors_parse[{#SENSOR}]</key>
<delay>60</delay>
<history>90</history>
<trends>365</trends>
<status>0</status>
<value_type>0</value_type>
<allowed_hosts/>
<units>C</units>
<delta>0</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>Temperature</name>
</application>
</applications>
<valuemap/>
</item_prototype>
</item_prototypes>
<trigger_prototypes>
<trigger_prototype>
<expression>{mixTemplate_linux_sensors:sensors_parse[{#SENSOR}].last()}&gt;70</expression>
<name>{#SENSOR} temp &gt; 70 C</name>
<url/>
<status>0</status>
<priority>3</priority>
<description/>
<type>0</type>
</trigger_prototype>
<trigger_prototype>
<expression>{mixTemplate_linux_sensors:sensors_parse[{#SENSOR}].last()}&gt;80</expression>
<name>{#SENSOR} temp &gt; 80 C</name>
<url/>
<status>0</status>
<priority>5</priority>
<description/>
<type>0</type>
</trigger_prototype>
</trigger_prototypes>
<graph_prototypes/>
<host_prototypes/>
</discovery_rule>
</discovery_rules>
<macros/>
<templates/>
<screens/>
</template>
</templates>
</zabbix_export>

Loading…
Cancel
Save

Powered by TurnKey Linux.