Add custom service watch in OMV dashboard Services part

  • Hi,


    I want to add some custom services (Plex, QBittorrent-nox, etc) watching in the dashboard part of OMV5.

    I have installed those services by CLI as theres no more plugin for them, but it would be helpful to me to see if they are running in OMV dashboard.


    I have already custom some OMV dashboard graph with disks and CPU temp and so on, so I'm not new to OMV tweaking.


    Can someone give me some clue on what file I have to search/modify to include those services in the dashboard, and the best way to do it?


    P.S: I already have checked /var/www/openmediavault/js/omv/module/admin/dashboard/part/ServiceStatus.js but that's not here ;) Maybe more in the back engine ?

    Thx a lot for helping.

    Lian Li PC-V354 with Be Quiet! fans | ASRock Rack x470D4U | AMD Ryzen 5 3600 | 1xCrucial 16GB DDR4 2666MHz ECC
    1xADATA 8200 Pro 256MB NVMe for System/Caches/Logs/Downloads | 4xWD 10To HDD in RAID 6 for Datas
    Powered by OMV v5.5.11 / Linux kernel 5.7.0

  • I haven't tried it without a full plugin but you would probably need to create a class for each service that implements IServiceStatus and has the getStatus function. Here is an example - https://github.com/openmediava…ed/module/forkeddaapd.inc

    omv 5.5.13 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.4.2
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Thank for the tip.

    I have writen the new class.


    Is there an easy way to "reload" the conf in order to test it ?

    Lian Li PC-V354 with Be Quiet! fans | ASRock Rack x470D4U | AMD Ryzen 5 3600 | 1xCrucial 16GB DDR4 2666MHz ECC
    1xADATA 8200 Pro 256MB NVMe for System/Caches/Logs/Downloads | 4xWD 10To HDD in RAID 6 for Datas
    Powered by OMV v5.5.11 / Linux kernel 5.7.0

    Edited 3 times, last by sbocquet ().

  • My only concern is

    Code

    Code
    $object = $db->get("conf.service.plexmediaserver");

    because I think that this info is taken from config.xml. I can add the required line but it will be overwriten at the next conf update (or no?)...

    Any idea or should I always return the value 1 ?

    Lian Li PC-V354 with Be Quiet! fans | ASRock Rack x470D4U | AMD Ryzen 5 3600 | 1xCrucial 16GB DDR4 2666MHz ECC
    1xADATA 8200 Pro 256MB NVMe for System/Caches/Logs/Downloads | 4xWD 10To HDD in RAID 6 for Datas
    Powered by OMV v5.5.11 / Linux kernel 5.7.0

  • because I think that this info is taken from config.xml. I can add the required line but it will be overwriten at the next conf update (or no?)...

    Any idea or should I always return the value 1 ?

    I don't think anything from the db needs to be loaded. So, I would remove line 29 + 30 from your class.

    omv 5.5.13 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.4.2
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • I don't think anything from the db needs to be loaded. So, I would remove line 29 + 30 from your class.

    I ended with that:

    Code
    "enabled" => $systemCtl->isActive(),

    And here is the result.


    Once agan, thanks a lot for your help.

    Lian Li PC-V354 with Be Quiet! fans | ASRock Rack x470D4U | AMD Ryzen 5 3600 | 1xCrucial 16GB DDR4 2666MHz ECC
    1xADATA 8200 Pro 256MB NVMe for System/Caches/Logs/Downloads | 4xWD 10To HDD in RAID 6 for Datas
    Powered by OMV v5.5.11 / Linux kernel 5.7.0

    Edited once, last by sbocquet: Code update: $systemCtl->isActive() ().

  • sbocquet

    Added the Label OMV 5.x
  • sbocquet

    Added the Label resolved

Participate now!

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