Hi!
I have created a simple web application for monitoring routers running Mikrotik RouterOS.
It’s been running on our network with eighty routers for about a year and it proved sometimes quite helpful so I decided to share it with you and release it under GPL.
Installation:
All information regarding installation is in the file docs/INSTALL.
Part of the README file
Introduction
============
ROSInfo is a simple tool for monitoring signal levels, traffic and network
latency of x86 machines, RouterBoards and other devices running Mikrotik
RouterOS. It was designed to be used with Mikrotik RouterOS v 2.9 and is being
developed and tested on a large network with many Mikrotik routers.
Environment
===========
Hardware
--------
Currently supported and tested are all versions of Mikrotik RouterOS 2.9.
Software requirements
---------------------
- Linux
- Apache
- PHP5 with support for snmp
- RRDTool 1.2
- php-rrdtool (not mandatory)
- SNMP utilities
- Cron or another scheduling daemon
Instalation
===========
- Unpack the tarball to a directory accessible by Apache.
- Make sure, that the ./rrd directory and it's subdirectories are writable by
Apache. Use chown and chmod to achieve this.
- Open file ./include/config.inc and change the contents to fit your needs.
- Setup cron to start the fetchexec.php file every 5 minutes.
Cron setup
----------
You can use the following statement placed in /etc/crontab. Make sure you
correct the path to the file fetchexec.php and php binary.
*/5 * * * * www-data /usr/bin/php /path/to/rosinfo/fetchexec.php > /dev/null 2>&1
Recomendations
==============
Do not start the fetchexec.php file manualy unless you are logged in as a user
under which Apache is running. You can use something like su www-data and then
start the fetchexec.php.
If you want to see some debug information from the fetchexec process, uncomment
the line $debug=1; in file config.inc. The output will be saved in a few
logfiles.
What exactly is not working? Signal graphs are empty? The signal levels are taken via snmp from the registration table, so if you have some entries in your registration table, the data should be read.
Can you please execute
snmpwalk -v1 -c public IP_ADDRESS_OF_THE_ROUTER SNMPv2-SMI::enterprises.14988.1.1.1.2.1.3
It would require to use a different template engine or not to use one at all. Because I didn’t want to use smarty, I used just a simple template engine called PET which unfortunately works only under php5.
Is it a really big deal to get php5 up and running? I think that today php4 is kind of dead.
Regarding the snmp community. I was trying to make the project as simple as possible, so there is not involved mysql or any other DB. Problem with snmp community is, that I guess you don’t want to configure it globaly, but set it for each router separately.
Another similiar feature in my todolist is setting the http port, because some users may change it for security purposes. Not all people know how to work with arrays in php, so I will try to rewrite the config section into a simple text form.
I have this error in Apache logs:
[error] PHP Notice: Undefined index: desc in /var/www/htdocs/rosinfo/include/functions.php on line 54
[error] PHP Notice: Undefined variable: old_category in /var/www/htdocs/rosinfo/header.php on line 44