Saturday, March 22, 2014

RPi-Monitor Interactive Configuration Helper

Version 2.6 introduced a new feature named RPi-Monitor Interactive Configuration Helper. This article is detailling how to use it to monitor a ntfs volume.

First execute the following command:

rpimonitord -i

Press Enter

Enter : df -t ntfs

RPi-Monitor will tell you how it will process the source.
In our example, it will execute the command df.
If it is correct, press Enter, if not, enter no ( or No or n or ) to go back to previous screen.

RPi-Monitor show you the ouput of the command as defined as source. If the output is the one expected press Enter, if not, RPi-Monitor will ask you to define the source again.

By default the regulare expression is (.*). This will return all the data given by the source.
In the following screen you will see how we will find the regular expression extracting the available space of our ntfs drive step by step.

Step one, hit Enter to see what is given by the source by default.

The output is not the one expected hit Enter to define a new Regular expression.
The data is located after sda1. Lets enter the following regular expression: sda1(.*) to get what is after sda1.

The output is not the one expected yet hit Enter to define a new Regular expression.
The data is located after sda1 after some spaces \s+, some numbers \d+, some spaces \s+, some numbers \d+, some spaces \s+ and is composed of numbers (\d+).
Enter then the following regulare expression: sda1\s+\d+\s+\d+\s+(\d+)

The result is now the one expected , enter Yes ( or yes or Y or y )

We want the value in MB while is it given in kB. We then need to devide it by 1024.
The formula is then: $1/1024

This is the expected value, enter yes

The value extracted is variable so dynamic so enter No.

RPi-Monitor gives you the template of configuration. You now have to copy it into an existing configuration file or  add anew file into /etc/rpimonitord.conf.d/ and update the text inside <>.
dynamic.20.source=df -t ntfs

Once the configuration will be apply, restart RPi-Monitor with the command:

/etc/init.d/rpimonitor restart

I hope this post is detailled enough to help you to configure RPi-Monitor to define the correct sources and regular expression.


  1. rpimonitor: command not found
    The rpimonitord is working... :)

    1. Fixed...
      I use to use completion with TAB... This is maybe the source of my mistake ;-)

  2. Thx a lot - now i've all my data for USB HDD

    I also include: WebIF Status and Statistic ;-)

  3. Hi!
    Thanks a lot for this very nice tool. However I have a problem: when I try the command "rpimonitord -i" I received this answer: "Web server not started because of error: Address already in use rpimonitord stopped because respawning too fast.". Could you please help me?

    1. Hello, you have to stop rpimonitord (/etc/init.d/rpimonitord stop) before executing the command. I'll add an issue un gighub and fix it for the next release.

    2. Are you sure to use the latest version of RPi-Monitor?.
      This issue is not occuring in version 2.6 and should happen in previous version since "-i" parameter is unknown.

  4. This helper is excellent. Much appreciated as I already heard some 'horror'-stories about regexp :)
    I was able to pull the voltage-readings from the pi in this manner ..
    Thanks :)

  5. Can we increase the frequency with which the RPI monitor collects the data. I required better resolutions of the reading provided by the RPI monitor.

    1. Answer is now in the FAQ. The modification is not easy, I'll think to make it a little bit easier in future version (and avoid code modification...).

    2. The next release of RPi-Monitor will allow the customisation of RRD and will then answer to your needs.
      Beta version is already available for test. You can install it and try it right now. Feedbacks are welcome.