Mikrotik Plugin v.2.5.3 fixed mikrotik_bgp problem [SOLVED]

Hi,

As we implemented the MikroTik Plugin from Exchange made by @ttr we ran in some problem about the section BGP of the plugin from the version 7.18.x.

I have made a debug and i have see that the API answer ‘!empty’ when the section is empty and no output.

I have changed the agent mikrotik function “myapi” like this:
def myapi(command):
for step in command:
apiros.writeSentence([step])
result=
while True:
new = apiros.readSentence()
if ‘!empty’ in new:
continue
if len(new) > 1:
result.append(list2dict(new))
else:
if opt_debug == True:
print(‘\n# DEBUG_OUTPUT myapi(%s)’ % command)
pprint.pprint(result)
print(‘\n# DEBUG_OUTPUT myapi(%s)’ % command)
return result

can you deploy this changed in a new package?

many thanks :slight_smile:

Hi,

Thanks for the info and the change, but the plugin is discontinued and will be removed from exchange soon.

Kind regards,
ttr

Hi,

thanks for the news.

If you want you can make the plugin opensource and i can contribute to mantain it becausa it’s the only plugin for mikrotik that test all the features.

regards

The plugin is open source as of means by GPL, but till now I did not find anybody to take maintenance. Maybe you could be so kind?

hi,

if you want, because we use it in our infrastructure, i can i give you and hand to mantain it :slight_smile:

Hi @DevilOfHell
I have the same problem. Can you tell me exactly which file you have customized?

Do you know if this is exactly the same with plugin version 2.5.5?
In the file “mikrotik_bgp.py” I can’t find any function “myapi”

Many thanks

Hi,

the version is 2.5.5.

You have to add before the line 241 in the file “agent_mikrotk” that is in directory local/share/check_mk/agents/special this:

    if '!empty' in new:
        continue

And the plugin will work again.

For your purpose i add the correct file into this reply and you have to replace it ( i have to added the .txt extension but you have to remove it before upload ).

agent_mikrotik.txt (20.1 KB)

Best regards

1 Like

Hi @Kernal87,

i have upload the new version 2.6.5 to the exchange and i’m waiting for approval.

If don’t wait and want to download it this is the file.

mikrotik-2.6.5.mkp (20.9 KB)

Best regards

3 Likes

Thanks for the contribution! I use it as well in my Homelab.

Hi,

i have published the plugin on exchange.

You can see the latest version on:

Mikrotik - Checkmk Exchange

Best regards

If there is someone who actively maintains this plugin it would be great if the plugin can monitor Wireless interfaces parameters (like signal quality etc.)