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! 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

    • Offizieller Beitrag

    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 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


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


    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!

  • 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! 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

    3 Mal editiert, zuletzt von sbocquet ()

    • Offizieller Beitrag

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

    monit restart omv-engined

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


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


    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!

  • 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! 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

    • Offizieller Beitrag

    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 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


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


    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!

  • 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! 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

    Einmal editiert, zuletzt von sbocquet () aus folgendem Grund: Code update: $systemCtl->isActive()

    • Offizieller Beitrag

    Glad it worked.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


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


    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!

  • sbocquet

    Hat das Label OMV 5.x hinzugefügt.
  • sbocquet

    Hat das Label gelöst hinzugefügt.
    • Offizieller Beitrag

    Thanks for tips

    If you switch to the kvm plugin, you won't have to worry about all of those virtualbox pains :)New openmediavault-kvm plugin

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


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


    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!

Jetzt mitmachen!

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