Show own log File in WebGUI

    • OMV 3.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Show own log File in WebGUI

      Hi,

      I have played something with rsyslogd, and I put the TVHeadend part in my own logfile. (/var/log/tvheadend.log)
      My the Syslog a bit too crowded
      Then I found the following instructions: forum.openmediavault.org/index…ustom-log-files-to-WebUI/

      But unfortunately, this does not work at all :(

      My files I've created according to the guide I once packed here: omv-log

      Is anyone able to help me.THX

      __________________________________________________________________________

      Hi,

      ich habe bei mir etwas mit rsyslogd gespielt, und mir den TVHeadend-Teil in eigenes Logfile gepackt. (/var/log/tvheadend.log)
      Mir war das Syslog etwas zu überfüllt
      Danach habe ich folgende Anleitung gefunden: forum.openmediavault.org/index…ustom-log-files-to-WebUI/

      Doch leider klappt das nicht so wie ich es mir vorstelle, bzw. gar nicht

      Meine Dateien die ich laut dem Guide angelegt habe hab ich mal hier hin gepackt: omv-log

      Kann mir hier jemand weiter helfen.

      THX
      Cooler Master Elite 110
      ASRock Q1900-ITX
      GeIL Green SO-DIMM 2x2GB, DDR3L-1333
      3x Western Digital WD green 3TB
      1x 60GB BOOT-SSD
      be quiet! System Power 7 300W
    • Ich habe ein echtes Verständnisproblem. Ich habe nun mal die Dateien von dem autoshutdown-addon genommen
      und etwas verändert. Damit geht es ? Wenn ich die gleichen Dateien weiter verändere und aus AutoShutdown
      tvheadend mache geht es nicht ?

      Anbei mal beide Versionen der Dateien :
      _______________________________________________________________________________________________

      I have a real understanding problem.
      I've just taken the files from the autoshutdown addon and changed something.And it works ?
      If I continue to change the same files and make AutoShutdown to tvheadend, is works not ?

      Here are the two versions of the files:

      JavaScript Source Code: AutoShutdown.js

      1. Ext.define("OMV.module.admin.diagnostic.log.plugin.AutoShutdown", {
      2. extend : "OMV.module.admin.diagnostic.log.plugin.Plugin",
      3. alias : "omv.plugin.diagnostic.log.autoshutdown",
      4. id : "autoshutdown",
      5. text : _("TvHeadend"),
      6. stateful : true,
      7. stateId : "92a5f193-e76a-481e-a1c0-12db308c97c0",
      8. columns : [{
      9. text : _("Date & Time"),
      10. sortable : true,
      11. dataIndex : "date",
      12. stateId : "date",
      13. renderer : OMV.util.Format.localeTimeRenderer()
      14. },{
      15. text : _("Type"),
      16. sortable : true,
      17. dataIndex : "type",
      18. stateId : "type",
      19. flex : 1
      20. },{
      21. text : _("Log"),
      22. sortable : true,
      23. dataIndex : "log",
      24. stateId : "log",
      25. flex : 1
      26. }],
      27. rpcParams : {
      28. id : "autoshutdown"
      29. },
      30. rpcFields : [
      31. { name : "date", type : "string" },
      32. { name : "type", type : "string" },
      33. { name : "log", type : "string" }
      34. ]
      35. });
      Display All

      JavaScript Source Code: tvheadend.js

      1. Ext.define("OMV.module.admin.diagnostic.log.plugin.tv", {
      2. extend : "OMV.module.admin.diagnostic.log.plugin.Plugin",
      3. alias : "omv.plugin.diagnostic.log.tv",
      4. id : "tv",
      5. text : _("TvHeadend"),
      6. stateful : true,
      7. stateId : "bcaee373-3d64-481b-b921-5264064634b3",
      8. columns : [{
      9. text : _("Date & Time"),
      10. sortable : true,
      11. dataIndex : "date",
      12. stateId : "date",
      13. renderer : OMV.util.Format.localeTimeRenderer()
      14. },{
      15. text : _("Type"),
      16. sortable : true,
      17. dataIndex : "type",
      18. stateId : "type",
      19. flex : 1
      20. },{
      21. text : _("Log"),
      22. sortable : true,
      23. dataIndex : "log",
      24. stateId : "log",
      25. flex : 1
      26. }],
      27. rpcParams : {
      28. id : "tv"
      29. },
      30. rpcFields : [
      31. { name : "date", type : "string" },
      32. { name : "type", type : "string" },
      33. { name : "log", type : "string" }
      34. ]
      35. });
      Display All


      PHP Source Code: 90autoshutdown.inc

      1. <?php
      2. require_once("openmediavault/functions.inc");
      3. \OMV\System\LogFileSpec::registerSpecification("autoshutdown", [
      4. "filename" => "tvheadend.log",
      5. "filepath" => "/var/log/tvheadend.log",
      6. "regex" => "/^(\S+\s+\d+\s+\S+)\s+(\S+)\s+(.*)$/",
      7. "columns" => [
      8. "date" => [
      9. "index" => 1,
      10. "func" => function($v) { return strpdate($v,"M j G:i:s"); }
      11. ],
      12. "type" => 2,
      13. "log" => 3
      14. ]
      15. ]);
      Display All

      PHP Source Code: 99tv.inc

      1. <?php
      2. require_once("openmediavault/functions.inc");
      3. \OMV\System\LogFileSpec::registerSpecification("tv", [
      4. "filename" => "tvheadend.log",
      5. "filepath" => "/var/log/tvheadend.log",
      6. "regex" => "/^(\S+\s+\d+\s+\S+)\s+(\S+)\s+(.*)$/",
      7. "columns" => [
      8. "date" => [
      9. "index" => 1,
      10. "func" => function($v) { return strpdate($v,"M j G:i:s"); }
      11. ],
      12. "type" => 2,
      13. "log" => 3
      14. ]
      15. ]);
      Display All
      Cooler Master Elite 110
      ASRock Q1900-ITX
      GeIL Green SO-DIMM 2x2GB, DDR3L-1333
      3x Western Digital WD green 3TB
      1x 60GB BOOT-SSD
      be quiet! System Power 7 300W
    • Have a look here:

      github.com/openmediavault/open…min/diagnostic/log/plugin

      github.com/openmediavault/open…ned/inc/90logfilespec.inc

      For the PHP backend part you need to create a new file below the inc/ directory.
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • New

      hi,

      this i understand. but if i use 99tv.inc and tvheadend.js it does not work.
      If I use the same text with 90autoshutdown.inc and AutoShutdown.js it works.

      Here is my problem why ?
      Cooler Master Elite 110
      ASRock Q1900-ITX
      GeIL Green SO-DIMM 2x2GB, DDR3L-1333
      3x Western Digital WD green 3TB
      1x 60GB BOOT-SSD
      be quiet! System Power 7 300W
    • New

      After code changes you need to restart omv-engined

      Shell-Script

      1. # monit restart omv-engined

      While development it is helpful to run the engine in foreground


      Shell-Script

      1. # monit stop omv-engined
      2. # omv-engined -d -f
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit