[Sensors] OMV-Sensors in OMV 4.1.x

  • Sorry this is taking so long to port over to OMV4 but my time on this is very limited and there is a heck of a lot of code that needs to be converted.


    So far I have a working plugin for CPU temps only. I still need to figure out how to add the extra sub panels, the code (below) was working for OMV3 but I just can't figure out why it is not working under OMV4. I don't want to move on to the other sensors until I have gotten the sub tabs working.


    [align=center]banner@1x.jpg
    What I am watching/watched on my Popcorn Hour media player
    omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
    MySQL (Percona[size=8]) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS

  • Oh I didn't realize that you were working on this as well. If you haven't found this on your own by now, have a look at /usr/share/openmediavault/mkrrdgraph/plugins.d. It appears that graphs are now handled by Python scripts stored in this directory. I believe I also have some commits that I can submit pull requests to you for to help out.

  • I have uploaded what i have so far to git hub, like I said its working but only for cpu. Its using the new python method to get the graphs but needs the sub tabs sorted out.

    [align=center]banner@1x.jpg
    What I am watching/watched on my Popcorn Hour media player
    omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
    MySQL (Percona[size=8]) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS

  • Are you sure you've pushed everything? I don't see an mkrrdgraph folder in the repo.

    I don't use a mkrrdgraph folder, just checked your github and can't see it there either? What do you use it for?


    Sorry I just got what I think you mean.
    I generate /usr/share/openmediavault/mkrrdgraph/plugins.d/sensors.py using the script depending what options are set on the plugin page.

    [align=center]banner@1x.jpg
    What I am watching/watched on my Popcorn Hour media player
    omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
    MySQL (Percona[size=8]) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS

  • I don't use a mkrrdgraph folder, just checked your github and can't see it there either? What do you use it for?
    Sorry I just got what I think you mean.
    I generate /usr/share/openmediavault/mkrrdgraph/plugins.d/sensors.py using the script depending what options are set on the plugin page.

    Oh! Okay I understand what you mean now. I will have a look at how to get the tabs working right now. For now, all I've managed to do is fix the uninstall script and replace the plugin icon with what I think is a better one. I realize that those are not really high priority compared to other stuff, but I wanted to get them out of the way. By the way I have a pull request open with all of the changes I am trying to make. My repo does not have a mkrrdgraph file because I didn't get that far, but it looks like thanks to you, I will not have to.


    Change of plans: Instead of trying to get tabs working, I am going to look at fixing a problem with the settings page when you try to apply changes.


  • I will look later, does that error happen on my branch? I have place holder on the sensors script at the top that I keep there to remind me of places files go, it will cause the script to fail if not removed.

    [align=center]banner@1x.jpg
    What I am watching/watched on my Popcorn Hour media player
    omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
    MySQL (Percona[size=8]) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS

  • I will look later, does that error happen on my branch? I have place holder on the sensors script at the top that I keep there to remind me of places files go, it will cause the script to fail if not removed.

    Oh. And here I was combing through the mkconf file trying to find a problem in the code. It seems that removing the file listing does indeed stop that error from occurring when trying to change settings, but a new one occurs. It looks like somewhere in the code, mkgraph is still being used instead of mkrrdgraph.


    Update: Found it! I thought all of the instances of mkgraph were changed in mkconf, but I found that they weren't.


  • I do not get any errors on my end, I can enable cpu, cpu and cores and add motherboard temps on same graph. All working with no errors.


    I just uploaded eveything I have so far, so you or anyone else can check it out and see what they can come up with.

    [align=center]banner@1x.jpg
    What I am watching/watched on my Popcorn Hour media player
    omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
    MySQL (Percona[size=8]) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS

  • https://github.com/OpenMediaVa…rs/openmediavault-sensors
    It is only on github, no deb package as yet due to the issues I have mentioned above.

    Perhaps I should just upgrade my OMV machine already and install the plugin so that data is being collected even if it is not displaying properly yet.


    How do you build your deb files by the way? Do you use the openmediavault.mk file for that? If so, then how?

  • How do you build your deb files

    I use the openmediavault-developer plugin, very easy to build and install packages.

    [align=center]banner@1x.jpg
    What I am watching/watched on my Popcorn Hour media player
    omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
    MySQL (Percona[size=8]) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS

  • https://github.com/OpenMediaVa…rs/openmediavault-sensors
    It is only on github, no deb package as yet due to the issues I have mentioned above.

    can you let me know, how I could try this new version when already having uninstalled the old one? Just install it again as mentioned earlier in this thread?
    Or does the binaries from GitHub need to be copied to the respective places in OMV?


    Thanks!

    • Official Post

    Is it in the OMV-Extras repository? I cannot find it.

    It is in the beta repo. This plugin is very dangerous if you used incorrectly. You can download the plugin and install manually from bintray.

    omv 7.4.14-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.15 | compose 7.2.16 | k8s 7.3.1-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Hi !


    Good work both...


    From what I have seen, it's probably better and more flexible to imagine a way to get the sensors name by the lm-sensors directories generated, and store it somewhere in a conf file than to hard code all the possible chipset.


    Code
    # for i in `ls -d /var/lib/rrdcached/db/localhost/sensors-*`; do basename $i; done
    sensors-coretemp-isa-0000
    sensors-it8718-isa-0290


    Same for the number of core. Maybe have something more dynamic like:


    Code
    root@home-server:/var/lib/collectd/rrd/home-server# ls -d | grep cpu
    cpu-0
    cpu-1
    root@home-server:/var/lib/collectd/rrd/home-server# ls | grep cpu| wc -l
    2


    Just my 2 cts ;)

    Lian Li PC-V354 (with Be Quiet! Silent Wings 3 fans)
    ASRock Rack x470D4U | AMD Ryzen 5 3600 | Crucial 16GB DDR4 2666MHz ECC | Intel x550T2 10Gb NIC

    1 x ADATA 8200 Pro 256MB NVMe for System/Caches/Logs/Downloads
    5 x Western Digital 10To HDD in RAID 6 for Datas
    1 x Western Digital 2To HDD for Backups

    Powered by OMV v5.6.26 & Linux kernel 5.10.x

    Edited once, last by sbocquet ().

  • It is in the beta repo. This plugin is very dangerous if you used incorrectly. You can download the plugin and install manually from bintray.

    Haha yeah I learned that the hard way. I found it on GitHub, built it, and installed it last night, and while arbitrarily clicking on buttons to figure out what they do, I accidentally upgraded to OMV 5. Fortunately I was working in a VM which I'd just taken a snapshot of so it was no big deal.

    Thank you, but the credit definitely goes to @jhmiller. Everything that I've tried to contribute has been fairly useless so far because I do not entirely know what I am doing. I am still willing to play around with this though, so thank you for the advice.

  • From what I have seen, it's probably better and more flexible to imagine a way to get the sensors name by the lm-sensors directories generated, and store it somewhere in a conf file than to hard code all the possible chipset.

    Yes and no. There are a lot of sensors and not all are of any use on some systems, the script is done in a way that it checks for the common ones first and also where multiple sensors on kown systems it has an order to pick the most likely sensor. I was planning on adding something along those line as a fail safe if the script did not find ANY sensors.



    I have now found the issue with the tabs not showing up and it has been fixed but this has led on to another problem :(


    I can now display graphs for everything except system fans, It will show system fans if combined with the cpu fan but will not show it on its own graph(errors when applying.)

    [align=center]banner@1x.jpg
    What I am watching/watched on my Popcorn Hour media player
    omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
    MySQL (Percona[size=8]) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS

  • I have now found the issue with the tabs not showing up and it has been fixed but this has led on to another problem :(


    I can now display graphs for everything except system fans, It will show system fans if combined with the cpu fan but will not show it on its own graph(errors when applying.)

    What's the problem? I know I haven't been much help so far, but perhaps I can try to solve it?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!