[solved] Add additional LOG File to the WEB GUI

  • Hello friends of OMV.


    Is it possible to add some new log files to the web gui?

    I have some cronjobs runing which write there logs in e.g. cron-one.log


    No i want to see theses cron-one.log in my web gui.

    Is this possible?



    thank u :)



    /edit: just found THIS here from 2016 ... is this actual?!?

    7.0.4-2 (Sandworm) // ASRock J5040-ITX with Intel(R) Pentium(R) Silver J5040 CPU @ 2.00GHz // be quiet! ATX 500W (BN46) // 2x4GB Samsung M471A5244BB0-CRC

    Fractal Design Node 304 // 4-Port PCIE to SATA 3.0 ControllerCard // 1x 128GB SSD for OS and 2x 4TB, 1x 5TB and 3x 8TB HDD as one big fuse.mergerfs space (no need for raid parity)

    Einmal editiert, zuletzt von Kamikaze01 ()

  • Please try and report back the findings here

    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

  • Hello and thank u for your participation...


    I tried different ways but i can not get this to work :(


    The guid from 2016 is a bit confusing for me.


    My aim is to get an extra rsync log.

    So i created a test.log with some dummy entries from the existing rsync log (so the syntax should be right...).


    Then i created the 99mylogspecs.inc in /usr/share/openmediavault/engined/inc.

    i just copy/paste the part from the existing rsync.inc and overwrite all rsync entries with "test".

    I think, this should be right now...


    No i need an javascript file MyLogFile.js

    Again i orientated me on an existing file. So MyLogFile.js looks like this

    i tried an unique UUIDv4 from here



    I tried different ways, restart omv engine more than once... but nothing seem to work.

    I can not get these test.log in my WEB GUI :(


    Any help kindly appreciated !!

    7.0.4-2 (Sandworm) // ASRock J5040-ITX with Intel(R) Pentium(R) Silver J5040 CPU @ 2.00GHz // be quiet! ATX 500W (BN46) // 2x4GB Samsung M471A5244BB0-CRC

    Fractal Design Node 304 // 4-Port PCIE to SATA 3.0 ControllerCard // 1x 128GB SSD for OS and 2x 4TB, 1x 5TB and 3x 8TB HDD as one big fuse.mergerfs space (no need for raid parity)

  • your signature lists OMV OMV 5.5.11-1 (which is outdated), please patch to latest 5.6.9-1 and confirm if issue still exists

    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

  • Hello again.


    Thank u for that: i just updated today in the morning, BEFORE testing all this. So i can confirm issue exists with 5.6.9-1 Usul as well.

    Just updatet my signature too - thanks for the hint.


    Maybe someone could try to get this working (additional log via WEB GUI) and can report back what i have to do?


    :-/


    Thank u :)

    7.0.4-2 (Sandworm) // ASRock J5040-ITX with Intel(R) Pentium(R) Silver J5040 CPU @ 2.00GHz // be quiet! ATX 500W (BN46) // 2x4GB Samsung M471A5244BB0-CRC

    Fractal Design Node 304 // 4-Port PCIE to SATA 3.0 ControllerCard // 1x 128GB SSD for OS and 2x 4TB, 1x 5TB and 3x 8TB HDD as one big fuse.mergerfs space (no need for raid parity)

    Einmal editiert, zuletzt von Kamikaze01 ()

  • In MyLogFile.js the difference I see comparing to the example is starting in row 21, it misses all references to "hostname"


    Code
    },{
            text: _("Hostname"),
            hidden: true,
            sortable: true,
            dataIndex: "hostname",
            stateId: "hostname"
        },{

    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

    Einmal editiert, zuletzt von mi-hol ()

  • Hello (again).


    I can not get this to work :(


    I tried so many ways, but i need a serius step-by-step help.

    I orienteted myself on the existing files - there is always "message" instead of "hostname".

    Additional i think this is only the name of the column.


    I did not understand the guid from 2016 as this is confusing.

    Can someone please (PLEASE) try this and get this to work??!?!


    THANK U THAUSAND TIMES !!!


    Is i told before, i want an extra rsync log, so i created a testlog file calles "MyLogFile.log" with some dummy entries in it

    Code
    2021/06/11 13:00:10 [3002] >f+++++++++ BACKUP Test/Test/Test.txt
    2021/06/11 13:01:10 [3002] >f+++++++++ BACKUP Test/Test/Test.xlsx
    2021/06/11 13:01:59 [3002] cd+++++++++ BACKUP Test/BlaBla.doxc
    2021/06/11 13:02:02 [3002] >f+++++++++ BACKUP Test/MoreTest/BlaBlaTest.exe
    2021/06/11 13:02:11 [3002] Number of files: 301,270 (reg: 289,175, dir: 12,095)
    2021/06/11 13:02:11 [3002] Number of created files: 446 (reg: 394, dir: 52)
    2021/06/11 13:02:11 [3002] Number of regular files transferred: 394



    My 99mylogspecs.inc now looks like this:


    and my MyLogFile.js looks like this

    As told before: the UUIDv4 i claim from here

    7.0.4-2 (Sandworm) // ASRock J5040-ITX with Intel(R) Pentium(R) Silver J5040 CPU @ 2.00GHz // be quiet! ATX 500W (BN46) // 2x4GB Samsung M471A5244BB0-CRC

    Fractal Design Node 304 // 4-Port PCIE to SATA 3.0 ControllerCard // 1x 128GB SSD for OS and 2x 4TB, 1x 5TB and 3x 8TB HDD as one big fuse.mergerfs space (no need for raid parity)

    Einmal editiert, zuletzt von Kamikaze01 ()

  • I orienteted myself on the existing files - there is always "message" instead of "hostname".

    In general the code you provided looks good, but I didn't install & run it.

    Another difference I spotted is the data format string, OMV uses

    strpdate($v,"D M j H:i:s Y"); I'd try with that format first


    OMV's ClamAV logging seems a good starting point

    1. Could you please elaborate on what existing file you modified?
    2. in which directory (full path) did you save 99mylogspecs.inc?

    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

  • Hello (again ^^) and thank you for your participation.

    Thank you for the link.
    I already knew the provided Link - but together with the 2016 guide this seems more confusing... but yeah: i already take a look at it.

    So... thank you :)


    1. Could you please elaborate on what existing file you modified?
    • for 99mylogsprecs.inc i orienteted myself on 90logfilespecs.inc in the same directory

    in (my) existing 90logfilespecs.inc (on witch i orienteted myself) there is from line 293 to 313 the codeblock for the functional rsync log from the webgui. So i take this block and just copy/paste it to my 99mylogspecs.inc and changed all "rsync" to "MyLogFile". So i was sure, this shuld work now... as this is working with the normal rsync log, i did not change the formate of the date...


    • for MyLogFile.js i orienteted myself on Rsync.js in the same directory

    because i want to create a new rsync entry in the webgui, i think this would be the best choice...

    in (my) existing Rsync.js i just changed "rsync" in line 29, 31, 36 and 57 to "MyLogFile" and the name in line 37 from "Rsync-Jobs" to "MyLogFile" Than copy/paste the whole codeblock in the new MyLogFile.js and saved it in

    /var/www/openmediavault/js/omv/module/admin/diagnostic/log/plugin/MyLogFile.js




    2. in which directory (full path) did you save 99mylogspecs.inc?

    the directory as in the guid told:

    /usr/share/openmediavault/engined/inc/99mylogspecs.inc




    Than restart my NAS but nothing works - only the old logs are visible. No "MyLogFile"


    :( so this way did not seem to work...

    7.0.4-2 (Sandworm) // ASRock J5040-ITX with Intel(R) Pentium(R) Silver J5040 CPU @ 2.00GHz // be quiet! ATX 500W (BN46) // 2x4GB Samsung M471A5244BB0-CRC

    Fractal Design Node 304 // 4-Port PCIE to SATA 3.0 ControllerCard // 1x 128GB SSD for OS and 2x 4TB, 1x 5TB and 3x 8TB HDD as one big fuse.mergerfs space (no need for raid parity)

    2 Mal editiert, zuletzt von Kamikaze01 ()

  • I miss a comment regarding the different date format.

    When you tried this and it stills fails, I'd suggest to open a new issue on OMV's github with the title

    [GUIDE] Add custom log files to WebUI - not working

    in "to Reproduce" attach the source code files as zip archive (so its easy to reproduce)

    in "Reference to Forum" reference this post

    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

    Einmal editiert, zuletzt von mi-hol ()

  • Good Morning.


    yeah u are right.


    I tried with different date format now, but nothing changed.


    So here is the issue on github


    Thank u

    7.0.4-2 (Sandworm) // ASRock J5040-ITX with Intel(R) Pentium(R) Silver J5040 CPU @ 2.00GHz // be quiet! ATX 500W (BN46) // 2x4GB Samsung M471A5244BB0-CRC

    Fractal Design Node 304 // 4-Port PCIE to SATA 3.0 ControllerCard // 1x 128GB SSD for OS and 2x 4TB, 1x 5TB and 3x 8TB HDD as one big fuse.mergerfs space (no need for raid parity)

  • Thanks, but don't see attachment with source code in issue

    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

  • damn... :rolleyes: my fault....
    already edited the issue


    thx

    7.0.4-2 (Sandworm) // ASRock J5040-ITX with Intel(R) Pentium(R) Silver J5040 CPU @ 2.00GHz // be quiet! ATX 500W (BN46) // 2x4GB Samsung M471A5244BB0-CRC

    Fractal Design Node 304 // 4-Port PCIE to SATA 3.0 ControllerCard // 1x 128GB SSD for OS and 2x 4TB, 1x 5TB and 3x 8TB HDD as one big fuse.mergerfs space (no need for raid parity)

  • Hello.


    As already discussed in the GitHub issue,

    my Testlog is now seen in the WebGUI :)


    Me = Happy again :thumbup:

    7.0.4-2 (Sandworm) // ASRock J5040-ITX with Intel(R) Pentium(R) Silver J5040 CPU @ 2.00GHz // be quiet! ATX 500W (BN46) // 2x4GB Samsung M471A5244BB0-CRC

    Fractal Design Node 304 // 4-Port PCIE to SATA 3.0 ControllerCard // 1x 128GB SSD for OS and 2x 4TB, 1x 5TB and 3x 8TB HDD as one big fuse.mergerfs space (no need for raid parity)

    Einmal editiert, zuletzt von Kamikaze01 ()

  • Kamikaze01

    Hat den Titel des Themas von „Add additional LOG File to the WEB GUI“ zu „[solved] Add additional LOG File to the WEB GUI“ geändert.
  • Hi,

    Can you please point me to the github discussion?
    I'm trying to do the same (add additional log files to the GUI) but it still doesn't work at the moment.

    Maybe I missed something...

    Thx

    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

  • the link is in this threads post #11

    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,

    Thx for the link. Unfortunatly, I can't get this too work :(

    Maybe someone could point my error. Here are the conf. files.


    root@home-server:~# ls -al /usr/share/openmediavault/engined/inc/*

    -rw-r--r-- 1 root root 1155 May 14 15:41 /usr/share/openmediavault/engined/inc/10rootdevicefile.inc

    -rw-r--r-- 1 root root 988 May 14 15:41 /usr/share/openmediavault/engined/inc/30datamodel.inc

    -rw-r--r-- 1 root root 1538 May 14 15:41 /usr/share/openmediavault/engined/inc/60filesystembackend.inc

    -rw-r--r-- 1 root root 1432 May 14 15:41 /usr/share/openmediavault/engined/inc/60networkinterfacebackend.inc

    -rw-r--r-- 1 root root 1434 May 14 15:41 /usr/share/openmediavault/engined/inc/60storagedevicebackend.inc

    -rw-r--r-- 1 root root 1393 May 14 15:41 /usr/share/openmediavault/engined/inc/90clamav.inc

    -rw-r--r-- 1 root root 11631 May 14 15:41 /usr/share/openmediavault/engined/inc/90logfilespec.inc

    -rw-r--r-- 1 root root 1383 Sep 2 16:34 /usr/share/openmediavault/engined/inc/90onedrive.inc


    90onedrive.inc


    root@home-server:~# ls -al /var/www/openmediavault/js/omv/module/admin/diagnostic/log/plugin/

    total 68

    drwxrwxr-x 2 openmediavault-webgui openmediavault-webgui 4096 Sep 2 16:57 .

    drwxrwxr-x 3 openmediavault-webgui openmediavault-webgui 4096 Jul 30 09:22 ..

    -rw-rw-r-- 1 openmediavault-webgui openmediavault-webgui 2482 Jul 4 18:55 Apt.js

    -rw-rw-r-- 1 openmediavault-webgui openmediavault-webgui 2163 Jul 4 18:55 Auth.js

    -rw-rw-r-- 1 openmediavault-webgui openmediavault-webgui 1974 Jul 4 18:55 Boot.js

    -rw-rw-r-- 1 openmediavault-webgui openmediavault-webgui 1998 Jun 13 13:06 ClamAV.js

    -rw-rw-r-- 1 openmediavault-webgui openmediavault-webgui 2167 Jul 4 18:55 Daemon.js

    -rw-rw-r-- 1 openmediavault-webgui openmediavault-webgui 6380 Jul 4 18:55 Ftp.js

    -rw-rw-r-- 1 openmediavault-webgui openmediavault-webgui 2181 Jul 4 18:55 Messages.js

    -rw-rw-r-- 1 openmediavault-webgui openmediavault-webgui 2009 Sep 2 16:47 Onedrive.js

    -rw-rw-r-- 1 openmediavault-webgui openmediavault-webgui 2227 Jul 4 18:55 Plugin.js

    -rw-rw-r-- 1 openmediavault-webgui openmediavault-webgui 2027 Jul 4 18:55 Rsyncd.js

    -rw-rw-r-- 1 openmediavault-webgui openmediavault-webgui 1995 Jul 4 18:55 Rsync.js

    -rw-rw-r-- 1 openmediavault-webgui openmediavault-webgui 2023 Jul 4 18:55 Smart.js

    -rw-rw-r-- 1 openmediavault-webgui openmediavault-webgui 3725 Jul 4 18:55 Smb.js

    -rw-rw-r-- 1 openmediavault-webgui openmediavault-webgui 2167 Jul 4 18:55 Syslog.js



    I think that the parsing of the log file is maybe the error because of the milliseconds, but it should create the entry in the WebUI even if the parse doesn't work, no ?

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

    Here is the log file

    Code
    2021-Sep-07 09:38:16.6625359    Configuring Global Azure AD Endpoints
    2021-Sep-07 09:38:17.3047206    Initializing the Synchronization Engine ...
    2021-Sep-07 09:38:17.3047814    Initializing monitor ...
    2021-Sep-07 09:38:17.3048137    OneDrive monitor interval (seconds): 120
    2021-Sep-07 09:38:18.828254     Trying to delete item Images/Pellicule/IMG_20210819_172831.jpg
    2021-Sep-07 09:38:18.8292999    Trying to delete item Images/Pellicule/IMG_20210820_103229.jpg
    2021-Sep-07 09:38:18.8301002    Trying to delete item Images/Pellicule/IMG_20210819_172918.jpg
    2021-Sep-07 09:38:18.8308931    Trying to delete item Images/Pellicule/IMG_20210828_192632.jpg
    2021-Sep-07 09:38:18.8317183    Trying to delete item Documents/Professionnels/CV Stéphane BOCQUET - CPSI.pdf
    2021-Sep-07 09:38:18.8325246    Trying to delete item Images/Pellicule/Screenshot_20210830-140425_65dd53f706ee14f7c817b7f96db127ea.jpg


    Any Idea or Help is appreciated.

    Thanks

    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,

    Just a little update as I still don't understand what is missing or wrong in my config files.

    If someone can help, thanks.

    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,

    I've just rebooted my server and... the entry is here (see attachment) !

    Still have some problems to parse the date of the log file. I use
    strpdate($v,"Y-m-d H:i:s")

    and the log format is :


    Code
    2021-Nov-29 10:36:27.3431674    Starting a sync with OneDrive
    2021-Nov-29 10:36:27.343256     Syncing changes from OneDrive ...
    2021-Nov-29 10:36:30.0845614    Sync with OneDrive is complete


    Maybe the milliseconds ? How can I solve this ?

    Thx

    Bilder

    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: EDIT : The correct parse format seems to be "Y-m-d H:i:s.u", but unfortunatly, it still doesn't work :'(

  • The correct parse format seems to be "Y-m-d H:i:s.u", but unfortunately, it still doesn't work

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

    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

    Einmal editiert, zuletzt von mi-hol ()

Jetzt mitmachen!

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