Hi all

So, just to update you guys here on the list how I fixed it.

Got it debugged on the console:
OMD[ES]:~$ cmk --debug --checks bgp_peer mydevice
Traceback (most recent call last):
  File "/omd/sites/ES/share/check_mk/modules/check_mk.py", line 4910, in 
<module>
    exit_status = do_check(hostname, ipaddress, check_types)
  File "/omd/sites/ES/share/check_mk/modules/check_mk_base.py", line 1237, in 
do_check
    do_all_checks_on_host(hostname, ipaddress, only_check_types)
  File "/omd/sites/ES/share/check_mk/modules/check_mk_base.py", line 1524, in 
do_all_checks_on_host
    res = execute_check(checkname, item, params, description, aggrname, address)
  File "/omd/sites/ES/share/check_mk/modules/check_mk_base.py", line 1460, in 
execute_check
    result = sanitize_check_result(check_function(item, params, info), 
check_uses_snmp(checkname))
  File "/omd/sites/ES/local/share/check_mk/checks/bgp_peer", line 154, in 
check_bgp_peer
    peeresttimehr = sec2hr(peeresttime)
  File "/omd/sites/ES/local/share/check_mk/checks/bgp_peer", line 65, in sec2hr
    m, s = divmod(seconds, 60)
TypeError: unsupported operand type(s) for divmod(): 'unicode' and 'int'

Changed line 154 from:
            peeresttimehr = sec2hr(peeresttimeint)
to:
            peeresttimehr = sec2hr(int(peeresttime))

Works no as it should.
Hope it helps someone.

Matias

Freundliche GrĂ¼sse

Matias Meier


Von: checkmk-en [mailto:checkmk-en-boun...@lists.mathias-kettner.de] Im Auftrag 
von Matias Meier
Gesendet: Montag, 12. Februar 2018 15:35
An: 'lukas.muel...@continental-corporation.com'; 
'checkmk-en@lists.mathias-kettner.de'
Betreff: Re: [Check_mk (english)] Use plugin "check BGP Peer State Check"

Hi Lukas
Hi community

There is a new version of this plugin: 
https://mathias-kettner.de/check_mk_exchange_file.php?HTML=yes&file=bgp_peer-1.4.mkp
Installation worked for me, after reinventory of the the device through SNMP I 
see the connected BGP peers, but unfortunately the check crashes with a bomb 
icon, no crash dump is available.

I checked the used SNMP OIDs and they are all correct. What would be the next 
step to debug this?
My CMK version is 1.4.0p24

Thanks in advance

Matias


Von: checkmk-en [mailto:checkmk-en-boun...@lists.mathias-kettner.de] Im Auftrag 
von 
lukas.muel...@continental-corporation.com<mailto:lukas.muel...@continental-corporation.com>
Gesendet: Freitag, 19. Januar 2018 08:52
An: 
checkmk-en@lists.mathias-kettner.de<mailto:checkmk-en@lists.mathias-kettner.de>
Betreff: [Check_mk (english)] Use plugin "check BGP Peer State Check"

Hello Community,

i have installed this plugin on my check mk server.
https://mathias-kettner.de/check_mk_exchange_file.php?HTML=yes&file=bgp_peer-1.1.mkp

Now the question: I have a Cisco ASA monitored in Check Mk that has active BGP 
session on it.
How do i implement these BGP Peer State check?
There is no documentation for this check.

Thanks
Lukas
_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

Reply via email to