Comet P8541 Temperatur Sensor check_mk Skript

def inventory_temp1(info):
  inventory = []
  for descr in info:
    inventory.append ( ( None, None ) )
  return inventory

def check_temp1(item, params, info):
  temp1 = int(float(info[0][0]))
  perfdata = [ ( „temp“, info[0][0], 24, 25 ) ]
  if temp1 <= 25:
    return (0, „OK Temperature is below 25 – Actual %d“ % temp1, perfdata)
  else:
    return (2, „CRITICAL Temperature is above 25 – Actual %d“ % temp1, perfdata)

check_info[„temp1“] = {
  ‚check_function‘ : check_temp1,
  ‚inventory_function‘ : inventory_temp1,
  ’service_description‘ : ‚Temperatur 1‘,
  ‚has_perfdata‘ : True,
  „snmp_info“ : ( „.1.3.6.1.4.1.22626.1.5.2.1.2“, [„0“]),
}