No announcement yet.

New Section Added - Log Monitoring with Reporting and/or Triggering of Events/Scripts

This is a sticky topic.
  • Filter
  • Time
  • Show
Clear All
new posts

  • SteveMSJ
    I've updated the beta version of SDJ-Health to The Log Monitoring and Triggering section of the plug-in has been updated to add searching based on the From Field in Log Entries.

    This makes it more compatible with HS4 as, for version 4 plug-ins, the plug-in name is shown in the From Field of log messages and the Type Field is used for various purposes. With HS3 plug-ins the From Field is always 'Legacy Plugin' and the Type Field tends to be the name of the plug-in, sometimes with some other information.

    Click image for larger version

Name:	image.png
Views:	67
Size:	100.9 KB
ID:	1577809

    Similarly the General Devices section of the plug-in has been updated to look for the plug-in (interface) name in the From Field of log entries for HS4 plug-ins.


    Leave a comment:

  • SteveMSJ
    I have added a note to the guide document in the 'Log Monitor' section about how the matched text is highlighted in log reports.
    • If you use simple search words and phrases, with the RegEx box unticked, then the plug-in handles the text highlighting and you don't have to consider it.
    • If you tick the RegEx box then you need to think about capture groups in your RegEx.
    Basically the plug-in uses the first capture group in your RegEx, to replace the matched text with the match from the capture group, enclosed in html to set it to a red font. If you don't have any capture groups in your RegEx the match will be replaced with $1. For highlighting to work properly you need to create at least one capture group which can simply be achieved by enclosing the RegEx in brackets.
    Example use
    (Plugin Z-Wave.*has disconnected)
    Plugin Z-Wave.*has disconnected
    You can of course control in more detail what is returned highlighted, by creating a capture group within your RegEx.


    Leave a comment:

  • SteveMSJ
    This feature has now been released from Beta in published version which will be in the Updater shortly.


    Leave a comment:

  • New Section Added - Log Monitoring with Reporting and/or Triggering of Events/Scripts

    The beta version of SDJ-Health adds a new section to the plug-in for Monitoring the Live and Historical HS log. The pi was already monitoring the log so it seemed sensible to extend this capability further. This has enabled me to reduce the number of plug-ins I have running on my system.

    Whilst the primary function of the plug-in is still monitoring and alerting of Battery Devices, there are now 3 sections to the plug-in.
    • Battery Device Monitoring and Reporting
    • General Device Monitoring and Reporting
    • Log Monitoring, Reporting and Event/Script Triggering
    The new Log Monitoring section has two principle functions:
    • Scanning and Filtering the HS log to produce reports
    • Monitoring the live HS log and triggering Events and/or scripts based on matches in real time.
    Any number of LogMatch sets can be configured which can be applied to report searches and live triggering. Each LogMatch can use simple search words or phrases as well as more complicated Regular Expressions (RegEx). Automatic scanning and reporting can be configured to run each day or can be triggered at any time manually or from events.

    Each LogMatch can trigger any event and/or script on your system to react to errors, or other notifications, that HS reports in the log as they occur.

    The plug-in can be set to pre-process the log at startup to catch any triggers occurring before the plug-in has initialized.

    Click image for larger version

Name:	1.png
Views:	400
Size:	28.6 KB
ID:	1454301

    Click image for larger version

Name:	2.png
Views:	276
Size:	19.4 KB
ID:	1454302
    Click image for larger version

Name:	3.png
Views:	266
Size:	40.7 KB
ID:	1454303
    Click image for larger version

Name:	report.JPG
Views:	281
Size:	64.4 KB
ID:	1454304
    The guide has been updated which explains in more detail how to use these features.