performance graphs not working on Odroid HC1

  • I am building a small NAS on the new Odroid HC1. I burned the OMV_3_0_88_Odroidxu4_4.9.52.img,xz image to a microSD, and it works pretty well. The performance graphs, including the added ones for cpu frequency and temperature, all work properly.


    When I tried the newer OMV_3_0_88_Odroidxu4_4.9.57.img,xz, I was unable to get the performance graphs to work, so I shifted my efforts back to the.52 image.
    When I burned the .52 image to another microSD, the result was the same as with the .57 image: everything worked except for the performance graphs. I got the “sad graph” icon for each of the different graphs under “Performance statistics”. I have repeated the process several times, on multiple (known good) microSD cards, with identical results. (I stayed with the .52 image for troubleshooting because I had a working microSD based on that same image for comparison.)


    Each of the .rrd files was being created and updated properly (confirmed by manually inspecting the output of rrdtool dump.)
    The directory which should contain the .png images for the various graphs (/var/lib/openmediavault/rrd) was empty.


    omv-firstaid’s “Check RRD database” failed with this error message:


    Action failed — There is no service by that name
    ERROR: Command ‘[‘monit’, ‘stop’, ‘rrdcached’]’ returned non-zero exit status 1


    I have no python experience, but I believe the error originates in /usr/share/openmediavault/firstaid/modules.d/50fix_rrd_database.py, here:



    Code
    def execute(self):
    		print("Checking all RRD files. Please wait ...")
    		path = openmediavault.getenv("OMV_RRDCACHED_BASEDIR",
    			"/var/lib/rrdcached/db/")
    		rrd_files = glob.glob(os.path.join(path, "localhost",
    			"*", "*.rrd"))
    		invalid = 0
    >>>>>	openmediavault.subprocess.check_call([ "monit", "stop", "rrdcached" ])


    I have been hammmering on this for many hours over several days, and I have found that by hacking /usr/sbin/omv-mkgraph (which I am not supposed to modify), I can get the graphs working by commenting out this line near the beginning:


    Code
    # Exit here if the rrdtool service is disabled.
    [ "1" != "0" ] && exit 0

    It seemed to me that one is always not equal to zero, so the test passes and the exit is executed. As a result, no graphs get created. Commenting-out this statement allowed execution to continue, the graphs for each of the plugins got generated and put in /var/lib/openmediavault/rrd, and the performance graphs became available via the web GUI.


    Of course, this hack does not fix the problem highlighted by omv-firstaid, so something is still wrong. Furthermore, when the HC1 is booted from my first microSD, the graphs work without the hack, and omv-firstaid reports no errors.


    I'm stumped. Any suggestions for additional troubleshooting approaches would be most appreciated.

    • Offizieller Beitrag

    You need to enable the performance stats collection (System | Monitoring) in the WebUI to get the RRD graphs working. If that is done, then the rrdcached daemon is enabled and you won't get the error message in omv-firstaid anymore.


    The code that you are mentioned is generated automatically by various scripts. The

    Code
    [ "1" != "0" ] && exit 0

    for example here: https://github.com/openmediava…ault/mkconf/collectd#L149


    If you look into that code you'll understand why the graphs are not working.

  • Thank you, votdev. I believe I did enable monitoring on my first microSD and then promptly forgot about that setting in subsequent builds. After all the time spent on this because I forgot the setting, I am confident I will not forget it ever again.


    I had discovered /usr/share/openmediavault/mkconf/collectd and was aware that the script was responsible for generating omv-mkgraph, but it never occurred to me that changing a setting in the GUI would actually modify the code. This strikes me as a less-than-ideal way to implement this switch. With variables defined for a zillion other configuration settings, I don't understand why a variable was not defined for this one, too.


    Thanks again for getting me unstuck.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!