Sunday, March 16, 2014

RPi-Monitor: Version 2.6 is available

Note: A new version of RPi-Monitor is available: Version 2.7.
All the details about the latest version of Rpi-Monitor are in RPi-Monitor overview


The version 2.6 of RPi-Monitor has been released.

If you don't know yet what RPI-Monitor do, have a look to RPi-Monitor Overview.


What's new in this version?
This version is coming with few improvement and bug fixes.

Here is the changelog of version 2.6:
  • Add version.json, menu.json and friends.json generation to fix issue #25
  • Check is file is executable (instead of existing) to define if it should be executed
    Warning: a new perl dependency has been added: File::Which
  • Generate empty.rrd at each request to fix issue #23
  • Generate empty.rrd at each start workaround for issue #23 when using an external web server
    Note: empty.rrd need to be generated each time a static data need to be drawn into a graph. The embedded server does that. With external server, it is not possible. Restarting RPI-Monitor periodically will improve the accuracy but not fix the bug.
  • Improve shellinabox management <IP>/shellinabox forwards to https://<IP>:4200
  • Add RPi-Monitor Interactive Configuration Helper

Installation

Download it from the official repository in Github with the command:
    wget http://goo.gl/WdK354 -O rpimonitor_2.6-1_all.deb

If you have issue with GnuTLS: A TLS warning alert coming from Github you can download it with the following command:
    curl -L http://goo.gl/WdK354 -o rpimonitor_2.6-1_all.deb

Install the dependencies by executing the following command (use command apt-get if aptitude is not available on your target system):
    sudo aptitude install librrds-perl libhttp-daemon-perl libjson-perl libipc-sharelite-perl libfile-which-perl

Installation or upgrade can be done with the command:
    sudo dpkg -i rpimonitor_2.6-1_all.deb

Complete the installation with the command:
    sudo apt-get update && sudo service rpimonitor update

Upgrade

If you are doing an upgrade you should add the new perl dependency before installing RPi-Monitor package:
    sudo aptitude install libfile-which-perl

RPi-Monitor interactive configuration helper

This version of RPi-Monitor introduce a new feature named "Interactive Configuration Helper". This new feature is accessible with the commend:
    rpimonitord -i

The interactive configuration helper will ask you to enter information and will help you to define the correct configuration. I'll will write a post dedicated to this feature, until now, you can just give a try and follow the instructions... Your comments are welcome to improve this new feature.

About shellinabox

Shellinabox allow you to access to the shell of your Raspberry Pi through a web interface. You can activate this feature into the configuration dialog box.
By default, the link is set to '''/shellinabox'''. When RPi-Monitor will reciee this request, it will automatically do a redirect to http://RPiIpAddress:4200/. You can modify this address to point to your shellinabox address. This address is used inside the iframe of shellinabox page.

Customization

RPi-Monitor is fully configurable so if the displayed information doesn't match you need, customize it.
Everything display in status pages or in statistics pages can be modified, tuned and customized to your needs.

To see how to customize it, use the command
    man rpimonitord
and
    man rpimonitord.conf

Man pages are also available in the wiki.

To define the configuration you can use RPi-Monitor Interactive Configuration Helper whit the command:
    rpimonitord -i

You will find some examples of customization in RPi-Monitor articles.


Usage

Once RPi-Monitor is configured as you wished, browse http://RPiIpAddress:8888/ to access to the web interface.

Note: The graphs rendering may have strange behavior on Google-Chrome on Windows while it works fine on Linux. Internet Explorer is even not able to display statistics, it is then advised to use Firefox on Windows or better... switch to Linux! ;-). 

14 comments :

  1. Required a "sudo apt-get update && sudo service rpimonitor update" for end of the upgrade.

    ReplyDelete
    Replies
    1. Yep... as usual, this is for the status page.
      But good point, I'll update the procedure.

      Delete
  2. I have written a script which auto writes a configuration file for new attached usb drives. Any demand? :)

    ReplyDelete
    Replies
    1. Very nice initiative. Can you make it available somewhere?
      For version 2.7 I'll add a directory named "contrib" that will contain custom scripts like this.

      Delete
    2. Sure :) But this script is just a quick and dirty way done for my own. I think you will have to overdo it :)
      Its called by udev when you plugin a new usb device. So you will have to put this file to /udev/rules.d/:
      https://www.dropbox.com/s/jvsv2596xigui1z/10-automount.rules
      It will automount the new attached device with its label into /media/ and then start this file:
      https://www.dropbox.com/s/jmdzehmnw22nb44/rpi-monitor-new-device.sh
      located in /usr/local/bin/rpi-monitor-new-device.sh.
      Which will write a new custo.cfg. So be aware that this will overwrite your current file!

      Delete
    3. And the output will look like this:
      https://www.dropbox.com/s/jmeia0liihkza7k/Screenshot.PNG

      Delete
    4. But the script has one problem:
      It already writes a lockfile, so its only executed once if you plugin a drive with more partitions. But when you unplug a device, it seems that the script is so fast executed, that the lock file has no effect and the script is executed multiple times. That will cause a wrong config file and the deamon will also hang up. Perhaps you have a better idea for that?

      Delete
  3. And it think it shout not be rpimonirord -i but rpimonitord -i ;)

    ReplyDelete
  4. Can any one helpme on this:

    pi@raspbmc:~$ sudo wget http://goo.gl/WdK354 -O rpimonitor_2.6-1_all.deb
    --2014-03-16 21:06:54-- http://goo.gl/WdK354
    Resolving goo.gl (goo.gl)... 173.194.45.9, 173.194.45.4, 173.194.45.2, ...
    Connecting to goo.gl (goo.gl)|173.194.45.9|:80... connected.
    HTTP request sent, awaiting response... 301 Moved Permanently
    Location: https://github.com/XavierBerger/RPi-Monitor-deb/raw/master/packages/rpimonitor_2.6-1_all.deb [following]
    --2014-03-16 21:06:55-- https://github.com/XavierBerger/RPi-Monitor-deb/raw/master/packages/rpimonitor_2.6-1_all.deb
    Resolving github.com (github.com)... 192.30.252.131
    Connecting to github.com (github.com)|192.30.252.131|:443... connected.
    ERROR: The certificate of `github.com' is not trusted.
    ERROR: The certificate of `github.com' hasn't got a known issuer.
    pi@raspbmc:~$

    ReplyDelete
    Replies
    1. An incompatibility between wget (version 1.13.4) and the certificate used by github have been noticed. I did update my post to explain how to download the package using curl.

      Delete
    2. If your download failed and and you suspect the file named rpimonitor_2.6-1_all.deb is corrupted.
      You should download it againand check the type of the file using the command ''file''. For example:
      pi@raspberrypi ~ $ file rpimonitor_2.6-1_all.deb
      rpimonitor_2.6-1_all.deb: Debian binary package (format 2.0)

      Delete
  5. RPi-Monitord dont word for me with xbian.

    "rpimonitord -i" failed

    "Can't locate HTTP/Daemon.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /usr/bin/rpimonitord line 227.
    BEGIN failed--compilation aborted at /usr/bin/rpimonitord line 227."

    ReplyDelete
    Replies
    1. RPi-Monitor (with the xbian configuration propose in github) works perfectly on xbian (even if this OS is not officially supported). You should check the dependencies and also have a look in the brand new FAQ page...

      Delete