Skip to main content

Hi,

I have a problem with the plugin SNMP of Mikrotik for monitoring them :

When I add the template ‘Net-Mikrotik-Interfaces-SNMP-custom’ to the host for monitoring the interfaces of my Mikrotik router, this problem occurs ; when a client is connected to this interface no problem, everything works and the status is displayed as ‘OK’, but when the client is not connected (typically when I turn off my computer) the status displays ‘CRITICAL’ because by default it says “When the interface is up, but the status is down show CRITICAL : %{admstatus} eq "up" and %{opstatus} !~ /up|dormant/ “

 

And I don’t know why, but I cannot modify the template, For example, I try to add some value on “OIDFILTER” or “INTERFACENAME” but when I click on “save” button it’s not working. It doesn’t save the changes.

 

I appreciate your help guys :)

Kind regards.

Hi,

 

what are you trying to achieve ? do you want the status to display ‘OK’  even if the interface is down (the case when you shutdown your computer) ?

Maxime


Hi,

 

what are you trying to achieve ? do you want the status to display ‘OK’  even if the interface is down (the case when you shutdown your computer) ?

Maxime

Hi,

Yeah, that’s what I want !


My answer might not be relatable as I’m not using built-in templates for mikrotik devices, but in case you can’t edit the template, you can still create your own Service template and command using Centreon plugins

 

For example, when I query my mikrotik on ether7 (which is admin:up but op:down because there is nothing connected) with the following command :

/usr/lib64/nagios/plugins/centreon_plugins.pl --plugin=network::mikrotik::snmp::plugin --mode=interfaces --hostname=my-mikrotik --snmp-username=snmp-user --authprotocol=SHA --privprotocol=AES --authpassphrase='strongpassword' --privpassphrase='strongpassword' --snmp-version=3 --interface=8

 

I get the same result like you :

CRITICAL: Interface 'ether7' Status : down (admin: up)

 

Now when I add some filtering on the critical status with :

/usr/lib64/nagios/plugins/centreon_plugins.pl --plugin=network::mikrotik::snmp::plugin --mode=interfaces --hostname=my-mikrotik --snmp-username=snmp-user --authprotocol=SHA --privprotocol=AES --authpassphrase='strongpassword' --privpassphrase='strongpassword' --snmp-version=3 --interface=8 --critical-status=0

 

I get :

OK: Interface 'ether7' Status : down (admin: up)

 

Be aware that setting the critical status to 0 like I did will result in your interface always displaying “OK” in your monitoring even if the interface is down or disconnected which might not be wanted.

 

Maxime


Reply