Cleanup config.nodes_of
[check_mk.git] / checks / cisco_ucs_temp_cpu
blob839e288b0b579b9311b0f652f27c837d55c2bcb1
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.41.2.1.2 cpu Unit Name
7 # .1.3.6.1.4.1.9.9.719.1.41.2.1.10 cucsProcessorEnvStatsTemperature
9 factory_settings["cisco_ucs_temp_cpu_default_levels"] = {
10 "levels": (75, 85),
14 def inventory_cisco_ucs_temp_cpu(info):
15 for name, _value in info:
16 name = name.split("/")[3]
17 yield name, {}
20 def check_cisco_ucs_temp_cpu(item, params, info):
21 for name, value in info:
22 name = name.split("/")[3]
23 if name == item:
24 temp = int(value)
25 return check_temperature(temp, params, "cisco_temp_%s" % item)
28 check_info['cisco_ucs_temp_cpu'] = {
29 "inventory_function": inventory_cisco_ucs_temp_cpu,
30 "check_function": check_cisco_ucs_temp_cpu,
31 "service_description": "Temperature CPU %s",
32 "has_perfdata": True,
33 "snmp_scan_function": scan_cisco_ucs,
34 "snmp_info": (
35 ".1.3.6.1.4.1.9.9.719.1.41.2.1",
37 "2", # cpu Unit Name
38 "10", # cucsProcessorEnvStatsTemperature
39 ]),
40 "group": "temperature",
41 "includes": ["cisco_ucs.include", "temperature.include"],
42 "default_levels_variable": "cisco_ucs_temp_cpu_default_levels",