Discussion:
[Check_mk (english)] Help: modify output of checks ospf_neighbor but output of check plugin don't change
Nguyen Toan
2018-09-20 14:35:08 UTC
Permalink
Hi all!
I downloaded "OSPF Neighbor State Check
<https://mathias-kettner.com/check_mk-exchange-file.php?&file=ospf_neighbor-1.2.mkp>
" on Check_MK exchange and monitored ospf_neigbor services. I want to
change some output of plugin, I changed some in code:
if nbrstate in params['critical_states']:
yield 2, 'State: %s' % nbrstatus
elif nbrstate in params['warning_states']:
yield 1, 'State: %s' % nbrstatus
elif nbrstate in params['ok_states']:
output += ', State: %s' % nbrstatus
else:
*yield 3, 'Item not found in SNMP data'* -> *to yield 2,
'Item is not in neighbor table' *
But when link down between 2 router, I receive status UNKNOW with output of
check plugin: *UNKN - Item not found in SNMP data*, it is not *CRI - Item
is not in neighbor table.*
I was afraid of caching, then I deleted the site and added the modified
plugin, created a new host and inventory the service again. But everything
didn't change. Output of check plugin still: *UNKN - Item not found in SNMP
data*, not *CRI - Item is not in neighbor table*

I'm newbie, please help me! Thanks all (I attacked file modified code)
Loading...