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
<?php
/**
* This file is part of OpenMediaVault.
*
* @license http://www.gnu.org/licenses/gpl.html GPL Version 3
* @author Volker Theile <volker.theile@openmediavault.org>
* @copyright Copyright (c) 2009-2021 Volker Theile
*
* OpenMediaVault is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* OpenMediaVault is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with OpenMediaVault. If not, see <http://www.gnu.org/licenses/>.
*/
require_once("openmediavault/functions.inc");
\OMV\System\LogFileSpec::registerSpecification("onedrive", [
"filename" => "onedrive",
"filepath" => "/var/log/onedrive/sbocquet.onedrive.log",
"regex" => "/^(\S+\s+\S+)\s+(.*)$/",
"columns" => [
"ts" => [
"index" => 1,
"func" => function($v) { return strpdate($v,"Y-m-d H:i:s"); }
],
"date" => [
"index" => 1,
"func" => function($v) {
return strftime("%c", strpdate($v,"Y-m-d H:i:s"));
}
],
"message" => 2
]]);
Alles anzeigen
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
/**
* This file is part of OpenMediaVault.
*
* @license http://www.gnu.org/licenses/gpl.html GPL Version 3
* @author Volker Theile <volker.theile@openmediavault.org>
* @copyright Copyright (c) 2009-2021 Volker Theile
*
* OpenMediaVault is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* OpenMediaVault is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with OpenMediaVault. If not, see <http://www.gnu.org/licenses/>.
*/
// require("js/omv/grid/column/WhiteSpace.js")
// require("js/omv/module/admin/diagnostic/log/plugin/Plugin.js")
/**
* @class OMV.module.admin.diagnostic.log.plugin.Onedrive
* @derived OMV.module.admin.diagnostic.log.plugin.Plugin
* Class that implements the 'Onedrive' logfile diagnostics plugin.
*/
Ext.define("OMV.module.admin.diagnostic.log.plugin.Onedrive", {
extend: "OMV.module.admin.diagnostic.log.plugin.Plugin",
alias: "omv.plugin.diagnostic.log.onedrive",
requires: [
"OMV.grid.column.WhiteSpace"
],
id: "onedrive",
text: _("Onedrive"),
stateful: true,
stateId: "cfdba1ee-46d8-43fc-971c-5c846805c4a9",
columns: [{
text: _("Date & Time"),
sortable: true,
dataIndex: "rownum",
stateId: "date",
renderer: function(value, metaData, record) {
return record.get("date");
}
},{
xtype: "whitespacecolumn",
text: _("Message"),
sortable: true,
dataIndex: "message",
stateId: "message",
flex: 1
}],
rpcParams: {
id: "onedrive"
},
rpcFields: [
{ name: "rownum", type: "int" },
{ name: "ts", type: "int" },
{ name: "date", type: "string" },
{ name: "message", type: "string" }
]
});
Alles anzeigen
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 ?
return strpdate($v,"Y-m-d H:i:s");"
Here is the log file
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