Hello, I decided to writer an SNMP extention to OMD 0.56 and - while things have been going well, I am stuck at the Perf-o-meter. It is as if the registartion is not linking to the check. I have tried:
cisco_mem
check_mk-cisco_mem (since this is what shows up when I view the check
screen)
I have fully restarted the system, rediscovered the device. The check
functions - the row show s up in multisite as does the graphs in pnp4 -
there are no errors in the multisite page, it is just that the perf-o-meter
does not show up.
Am I missing something obvious here ?
----
In /omd/sites/test01/local/share/check_mk/checks/cisco_mem
# here are the default check levels for warn = 60% used, Critical = 80% used
mem_pool_default_values = (60, 80)
def inventory_cisco_mem (info):
# Debug : Lets you see how the data we get looks lie
# Start filling inventory
inventory = []
for display_name, alternate, validity, used, free, largest in info:
if validity == "1":
inventory.append( (display_name, "", "mem_pool_default_values") )
return inventory
def check_cisco_mem (item, params, info):
# Unpack Parameters
warn, crit = params
# Loop through all SNMP values
for display_name, alternate, validity, used, free, largest in info:
if validity == "1" and display_name == item:
pct_used = float(used) * 100.0 / ( float(used) + float(free))
message = "Used Memory %d of %d (%3.2f %%)" % (int(used), int(used) +
int(free), pct_used)
perfdata = [ ("pct used", pct_used, warn, crit, 0, 100 ), ("Used
(KB)", int(used), "", "", 0, int(used) + int(free)) ]
if pct_used > crit:
return (2, "CRITICAL - " + message, perfdata)
elif pct_used > warn:
return (1, "WARNING - " + message, perfdata)
else:
return (0, "OK - " + message, perfdata)
return (3, "UNKNOWN - Could not read values")
check_info["cisco_mem"] = \
(check_cisco_mem, "Cisco Mem Pool : %s ", 1, inventory_cisco_mem)
snmp_info["cisco_mem"] = ( ".1.3.6.1.4.1.9.9.48.1.1.1", ["2", "3", "4",
"5", "6", "7"])
----
In /omd/sites/test01/local/share/check_mk/web/plugins/perfometer/cisco_mem.py
def perfometer_cisco_mem (row, check_command, perfdata):
return repr(check_command), ''
perfometers["check_mk-cisco_mem"] = perfometer_cisco_mem
[image: Inline image 1]
OMD[test01]:~/local/share/check_mk/web/plugins/perfometer$ check_mk
--version
This is check_mk version 1.2.0p2
<<image.png>>
_______________________________________________ omd-users mailing list [email protected] http://lists.mathias-kettner.de/mailman/listinfo/omd-users
