Installing YAMon (3.3.0) on the Omnia (3.7.1)

YAMon is a network monitoring tool that can tell you how much of your internet connection you’re using along with nice monthly charts and detailed usage information, such as what devices are downloading the most data. Majordomo (included in the Omnia) is nice but gives you text data, I also find it to be a bit slow.

These are just some basic instructions, you’ll have to be comfortable with the command line to get this running, and modifying config files. But it does work. Note you’ll be editing some system files, so updating your Omnia to a new OS version might knock out these changes and you’ll have to redo them. Note this is tested on Omnia v3.7.1 with YAMon 3.3.0, on my personal router, different versions or configurations might need some changes.

  • Download the YAMon installer script, I saved mine into /opt.

  • Unzip the install package and go through installation. I selected most of the defaults (specifying Turris as the OS) and installed into /opt/YAMon3.

  • Edit /opt/YAMon3/config.file and make the following changes:
    _dnsmasq_conf='/var/etc/dnsmasq.conf'
    _dnsmasq_leases='/tmp/dhcp.leases'
    _includeBridge=1
    _bridgeMAC="XX:XX:XX:XX:XX:XX" (whatever your MAC is for br-lan)
    _bridgeIP="###.###.###.###" (your br-lan IP address)

  • Copy YAMon’s web directory: cp -rpv /tmp/www /www/yamon

  • Add the following line to /etc/lighttpd/lighttpd.conf (at the end is fine):
    server.follow-symlink = "enable"

  • Create the following init script /etc/init.d/yamon using vi or your preference:

    #!/bin/sh /etc/rc.common
    START=50
    STOP=50

    start() {
    echo Starting YAMon...
    /opt/YAMon3/startup.sh
    }
    stop() {
    echo Stopping YAMon...
    /opt/YAMon3/shutdown.sh
    }

  • Set permissions on the script: chmod 0755 /etc/init.d/yamon

  • Reboot your router

You may also need to go into the LuCI interface > System > Startup and enable the yamon startup script there for it to be active. You should only need to do this once. You can disable YAMon here as well without removing it.

You should now be able to go to http://<yourrouterIP>/yamon with a browser on your network and get to the stats (after some browser setup questions).

If you wish to remove YAMon, simply remove /www/yamon, /opt/YAMon3, and /etc/init.d/yamon and reboot.

This isn’t supported by Turris, but it is being supported by YAMon now. :slight_smile: I’ll try and keep these docs up-to-date.

10 Likes

Works like a charm. Thanks!

How to adapt file /usr/share/foris/lighttpd-dynamic-conf to new foris 94.1?

Try this and let me know, I don’t have yet installed update, so you tell me if it is working :slight_smile:
echo '$HTTP["url"] =~ "^" + var.foris.scriptname + "/(" + var.foris.paths + |yamon")$" {'
instead of
echo '$HTTP["url"] =~ "^" + var.foris.scriptname + "/(" + var.foris.paths + ")$" {'

i change bolded and all running ok
thx

3 Likes

I found I din’t have to make any changes and it still worked.

Not sure why.

James

Scott - I’ll support Turris in YAMon… quite happily as a matter of fact.

I have to confess however, that I have no experience what so ever with Turris. But I have started getting comments from other Turris users who have stumbled across my little script.

Let me know what will help to ease the setup process in Turris. I’ve recently added a new option in the setup script so that you can select Turris as your firmware variant. For the time being, you’ll get the same basic settings as OpenWrt. If you want or need something more specific and I’ll add it for you.

Al

6 Likes

Al, thank you for your response (I was one of those folk who emailed you about the Turris a while back). Not sure if you can adapt your installer based on the comments, if you want a copy of the unaltered lighttpd-dynamic-conf file I can provide it.

first i wanna thank you to make this possible!

everything seems to work so far, except of live usage monitoring…

Error #4 reading the LiveUsage data file:./js/live_data3.jsNot Found

i did activated it in the setup and checked it twice even in "config.file"
yamon seems not create “live_data3.js” anywhere.
hourly an daily .js files are created normal.

any ideas?

i did a clean install and it just seems to work very pretty now!
also without the lighttpd changes that @prezes_kk mentioned.

thanks again for this

For some reason I can’t edit the first post any longer, but YAMon 3.3.2 and Omnia 3.7.3 work fine using these instructions. Guess I’ll turn this into a wiki entry soon.

1 Like

Hi, I’ve got the same problem with live data as @n1ete. Is it any other option to fix it?

I’ve just updated the setup script (to version 3.3.3) so that a number of the manual steps above are taken of automatically now. Sadly, I don’t yet have a Turris on which to test things (but I’m working on that :slight_smile:)

The updated files can be found at http://usage-monitoring.com/download.php or http://usage-monitoring.com/manualInstall.php

2 Likes

I just tried to install it on Omnia 3.8.2 and I can see one of the 2 things happening:

  1. either my Omnia is little bit screwed up after the last 2, rather unfortunate, releases
  2. setup.sh is not compatible with Omnia anymore

setup.sh crashes after it tries to gather info about system. I can provide you with a detailed logs if you want, but to simplify things:

root@turris:/srv/yamon# nvram
-bash: nvram: command not found

Pretty much self explanatory :smile:

Am I missing something?
I can probably setup the config.file manually and come up with working installation, but nevertheless, setup.sh script depends on nvram get ... which doesn’t seem to be available (at least on my Omnia) anymore.

Can somebody pls run nvram command and let me know if the change was made since 3.7.3 (reported to work fine), or I should start to worry?

@scottjl @n1ete @qxstyles: how did you make it work? :slight_smile:

Turris OS version 3.8.2
# cat /proc/version
Linux version 4.4.89-cb5e816fa6b1a6b5342df69755869d71-2 (beast@build) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r47055) ) #1 SMP Mon Oct 2 08:05:55 CEST 2017
# nvram
-ash: nvram: not found

thanx man, so YAMon for us only if we configure it manually :slight_smile:

Marek - thanks for commenting. nvram is core to DD-WRT and allows setup.sh to retrieve/set various options. I suspect that I should be using uci calls rather than nvram… however, I do not have a Turris device on which to test (yet… I’m hoping that I can get one in the next month or so).

Looking into this as fast as I can.

Sorry for the grief.

Al

1 Like

no problem, I was just surprised that it has ever worked… must have been a major change in Turris FW during the last 3months.

Anyway if I find some time next week, I’ll try to do something about it…
Btw it will not be as easy as it sounds. I already tried to find uci alternatives to those nvram get calls and didn’t really get far :wink:

Marek - I posted YAMon v3.3.4 to usage-monitoring.com last night (see http://usage-monitoring.com/manualInstall.php). The biggest change is that I’ve wrapped all calls to nvram so setup.sh should work much better on the Turris FW now.

You might still require some tweaks… but I hope to have a test system in the near future so things should get smoother soon.

In the meantime, fire your questions my way and I’ll do the best I can.

Al

Just finished installing yamon on my Turris 1.1 (pre Omnia model). Works fine. Thanks a lot.