I have managed to make this
def inventory_my_netgear_cpu(info):
pprint.pprint(info)
return []
def check_my_netgear_cpu(item, params, info):
return 3, 'not yet implemented'
check_info['my_netgear_cpu'] = {
'inventory_function': inventory_my_netgear_cpu,
'check_function': check_my_netgear_cpu,
'service_description': 'DESCR',
'snmp_info': ('.1.3.6.1.4.1.4526.11.1.1.4.9', ["0"]),
'snmp_scan_function': lambda oid: True,
}
And that returns:
OMD[mysite]:~$ cmk --debug -vv --checks my_netgear_cpu switch1
[cpu_tracking] Start with phase 'busy'
Check_MK version 1.6.0p8
Try aquire lock on /omd/sites/mysite/tmp/check_mk/counters/switch1
Got lock on /omd/sites/mysite/tmp/check_mk/counters/switch1
Releasing lock on /omd/sites/mysite/tmp/check_mk/counters/switch1
Released lock on /omd/sites/mysite/tmp/check_mk/counters/switch1
Loading autochecks from /omd/sites/mysite/var/check_mk/autochecks/switch1.mk
+ FETCHING DATA
[cpu_tracking] Push phase 'snmp' (Stack: ['busy'])
[snmp] No persisted sections loaded
[snmp] Not using cache (Don't try it)
[snmp] Execute data source
[snmp] my_netgear_cpu: Fetching data
Executing WALK of ".1.3.6.1.4.1.4526.11.1.1.4.9" on switch1
.1.3.6.1.4.1.4526.11.1.1.4.9.0 => [ 5 Secs ( 24.2257%) 60 Secs ( 26.82%) 300 Secs ( 28.5991%)] 'OCTETSTR'
[snmp] Write data to cache file /omd/sites/mysite/tmp/check_mk/data_source_cache/snmp/switch1
Try aquire lock on /omd/sites/mysite/tmp/check_mk/data_source_cache/snmp/switch1
Got lock on /omd/sites/mysite/tmp/check_mk/data_source_cache/snmp/switch1
Releasing lock on /omd/sites/mysite/tmp/check_mk/data_source_cache/snmp/switch1
Released lock on /omd/sites/mysite/tmp/check_mk/data_source_cache/snmp/switch1
[cpu_tracking] Pop phase 'snmp' (Stack: ['busy', 'snmp'])
[cpu_tracking] Push phase 'agent' (Stack: ['busy'])
[piggyback] No persisted sections loaded
[piggyback] Execute data source
No piggyback files for 'switch1'. Skip processing.
No piggyback files for 'IP OF SWITCH'. Skip processing.
[cpu_tracking] Pop phase 'agent' (Stack: ['busy', 'agent'])
[cpu_tracking] End
OK - [snmp] Success, execution time 0.0 sec | execution_time=0.026 user_time=0.020 system_time=0.010 children_user_time=0.000 children_system_time=0.000 cmk_time_snmp=0.011 cmk_time_agent=-0.010
How would i go about getting the 5 Sec data as an metric?