Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1


Remember Me

Directory Tree


Current Version
Last Release Date
Compatible With
  • Nagios 3.x
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
This plugin checks memory status and returns usage in percent.
Setting up mikrotik:
Setting up a snmp v3 on mikrotik (works properly only with RouterOS v4.4 or greater):

snmp set enabled=yes location=Main_Building;
snmp community add name=monitoring security=private authentication-protocol=SHA authentication-password=SecretPasswd encryption-protocol=DES encryption-password=AnotherSecretPasswd read-access=yes address=

Passwords must be min 8 chars long.

Installing check_mikrotik_mem plugin:
Download the plugin and save it to nagios plugins directory.

Set file permissions:
chown nagios:nagios check_mikrotik_mem
chmod 740 check_mikrotik_mem

Add following lines into your commands.cfg file
# 'check_mikrotik_mem' command definition
define command{
command_name check_mikrotik_mem
command_line $USER2$/check_mikrotik_mem -H $HOSTADDRESS$ $ARG1$

Add following lines into your resource.cfg file
# Store some usernames and passwords (hidden from the CGIs)

Define new service for your devices.
define service{
use generic-service ; Inherit values from a template
hostgroup_name aps ; Apply to all our APs
service_description Memory usage.
check_command check_mikrotik_mem!-P 3 -L authPriv -U $USER3$ -a SHA -A $USER4$ -x DES -X $USER5$
Reviews (3)
Hi there, I'm getting a weird error and I still don't know what is causing it.
I installed the plugin and it returns results but only in the terminal like this:
[root@localhost libexec]# ./check_mikrotik_mem -H
SNMP OK - Using 38% of the total 1894MB memory. | data=38

But in Nagios it's giving me this error:
(No output on stdout) stderr: /usr/local/nagios/libexec/check_mikrotik_mem: line 179: snmpget: command not found

But I have net-snmp- installed and the check_snmp plugin is working without any problems.

I just don't know why is giving me an error in Nagios but not in the terminal...strange

Hope you can help me, thanks in advance :)

Best regards
I also needed to update the OIDs in the script, thanks for cyberef for doing the leg work on this.
bycyberef, October 18, 2012
1 of 1 people found this review helpful
Works great but I had to change the OID values. I guess they changed it in the latest version.

memtotal=$(snmpget $community$authproto$authpassword$privpasswd$protocol$secname$seclevel$privproto -Oqv $Host .

memused=$(snmpget $community$authproto$authpassword$privpasswd$protocol$secname$seclevel$privproto -Oqv $Host .