[solved] Add additional LOG File to the WEB GUI

  • Did you restart the server to reload the corrected PHP or JavaScript code?

    Yes I did...

    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

  • I'm a bit confused because PHP manual https://www.php.net/manual/de/datetime.format.php

    says:

    uMicroseconds. Note that date() will always generate 000000 since it takes an int parameter, whereas DateTime::format() does support microseconds if DateTime was created with microseconds.Example: 654321
    vMilliseconds. Same note applies as for u.Example: 654


    but the definition is in a JavaScript modul.

    Best approach to troubleshoot would be to publish the source code in a github repository

    omv 6.9.6-2 (Shaitan) on RPi CM4/4GB with 64bit Kernel 6.1.21-v8+

    2x 6TB 3.5'' HDDs (CMR) formatted with ext4 via 2port PCIe SATA card with ASM1061R chipset providing hardware supported RAID1


    omv 6.9.3-1 (Shaitan) on RPi4/4GB with 32bit Kernel 5.10.63 and WittyPi 3 V2 RTC HAT

    2x 3TB 3.5'' HDDs (CMR) formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

  • Hi,

    Thanks for your help. I have exactly the same questions ! ;)

    Sources can be found here
    RE: [solved] Add additional LOG File to the WEB GUI

    There is only 2 files to copy/paste and a test file to test the feature. Maybe your can try ?

    Cheers

    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

  • OK, I'm trying something else :

    "regex" => "^(\S+\s+\S+)[.]\S+\s+(.*)$" (don't take the milliseconds in the first parsed group)



    and

    return strpdate($v,"Y-m-d H:i:s"); (idem)

    Should work after a reboot... but this time, got nothing in the web page!


    How can I test that without rebooting my NAS every time I need to test the engined and/or the webUI ?

    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

  • Hi guys, i tried to add a custom log,

    i have a openmediavault version 6.7.1-2 (Shaitan)

    i create the php script inside /usr/share/openmediavault/engined/inc


    <?php

    require_once("openmediavault/functions.inc");

    \OMV\System\LogFileSpec::registerSpecification("samba", [

    "filename" => "log.audit",

    "filepath" => "/var/log/samba/log.audit",

    "regex" => "/(\S+\s+\d+\s+\S+)\s+(\S+)\s+smbd_audit: (.*)\|(\d+.\d+.\d+.\d+)\|(mkdirat|unlinkat|renameat|fdopendir|file\|create)(\S+)/",

    "columns" => [

    "ts" => [

    "index" => 1,

    "func" => function($v) { return strpdate($v,"D M j H:i:s Y"); }

    ],

    "date" => [

    "index" => 1,

    "func" => function($v) {

    return strftime("%c", strpdate($v,"D M j H:i:s Y"));

    }

    ],

    "service" => 2,

    "user" => 3,

    "address" => 4,

    "action" => 5,

    "message" => 6

    ]]);


    but i can't found the javascript files where i can found them?

  • but i can't found the javascript files where i can found them?

    openmediavault
    openmediavault has 5 repositories available. Follow their code on GitHub.
    github.com

    Plugins - compose, cputemp, omv-extras, sharerootfs.

    Drives - 1tb nvme Data, 2TB nvme Leeching, 24TB (8tbx 3 merg) Media,

    Docker - nginx-proxy-manager, plex, prowlarr, qbittorrentvpn, radarr, sonarr, watchtower.

Jetzt mitmachen!

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