Cleanup config.nodes_of
[check_mk.git] / checks / cisco_ucs_temp_env
blobbe394c7022596a0591e188582f4380a7f3c6e8f5
1 #!/usr/bin/python
2 # -*- encoding: utf-8; py-indent-offset: 4 -*-
4 # comNET GmbH, Fabian Binder - 2018-05-30
6 # .1.3.6.1.4.1.9.9.719.1.9.44.1.4 cucsComputeRackUnitMbTempStatsAmbientTemp
7 # .1.3.6.1.4.1.9.9.719.1.9.44.1.8 cucsComputeRackUnitMbTempStatsFrontTemp
8 # .1.3.6.1.4.1.9.9.719.1.9.44.1.13 cucsComputeRackUnitMbTempStatsIoh1Temp
9 # .1.3.6.1.4.1.9.9.719.1.9.44.1.21 cucsComputeRackUnitMbTempStatsRearTemp
11 factory_settings["cisco_ucs_temp_env_default_levels"] = {"levels": (30, 35)}
14 def parse_cisco_ucs_temp_env(info):
15 new_info = {
16 "Ambient": info[0][0],
17 "Front": info[0][1],
18 "IO-Hub": info[0][2],
19 "Rear": info[0][3]
21 return new_info
24 def inventory_cisco_ucs_temp_env(info):
25 for name, _temp in info.iteritems():
26 yield name, {}
29 def check_cisco_ucs_temp_env(item, params, info):
30 for name, temp in info.iteritems():
31 if item == name:
32 yield check_temperature(int(temp), params, "cisco_ucs_temp_env_%s" % name)
35 check_info["cisco_ucs_temp_env"] = {
36 "parse_function": parse_cisco_ucs_temp_env,
37 "inventory_function": inventory_cisco_ucs_temp_env,
38 "check_function": check_cisco_ucs_temp_env,
39 "default_levels_variable": "cisco_ucs_temp_env_default_levels",
40 "service_description": "Temperature %s",
41 "has_perfdata": True,
42 "snmp_scan_function": scan_cisco_ucs,
43 "snmp_info": (
44 ".1.3.6.1.4.1.9.9.719.1.9.44.1",
46 "4", # cucsComputeRackUnitMbTempStatsAmbientTemp
47 "8", # cucsComputeRackUnitMbTempStatsFrontTemp
48 "13", # cucsComputeRackUnitMbTempStatsIoh1Temp
49 "21", # cucsComputeRackUnitMbTempStatsRearTemp
50 ]),
51 "includes": ["cisco_ucs.include", "temperature.include"],
52 "group": "temperature",