* Generic

check_mikrotik_mem

Description:

This plugin checks memory status and returns usage in percent.

Current Version

1.1

Last Release Date

2011-05-24

Compatible With

  • Nagios 3.x

License

GPL


Project Files
Project Photos
Project Notes
Setting up mikrotik: Setting up a snmp v3 on mikrotik (works properly only with RouterOS v4.4 or greater): snmp set enabled=yes contact=wifi@example.com 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=192.168.1.1 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) $USER3$=monitoring $USER4$=SecretPasswd $USER5$=AnotherSecretPasswd 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) Add a Review
snmpget error in Nagios but not in terminal
by Gr0ove, June 30, 2014
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 192.168.0.254
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-5.7.2.1 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
Helpful? Yes  No 
Works Great with cyberef's Tweaks
by coxwal, February 28, 2013
I also needed to update the OIDs in the script, thanks for cyberef for doing the leg work on this.
Helpful? Yes  No 
New OID values
by cyberef, October 31, 2012
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 .1.3.6.1.2.1.25.2.3.1.5.65536)

memused=$(snmpget $community$authproto$authpassword$privpasswd$protocol$secname$seclevel$privproto -Oqv $Host .1.3.6.1.2.1.25.2.3.1.6.65536)
1 of 1 found this review helpful.
Helpful? Yes 1 No 0
Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
5 (4)
Favorites
0
Views
110,566