Monitoring and diagnosis for Watcher

The Gospel console provides various widgets for monitoring the activities in the watcher. For a quick view of the activities in the watcher, you can access the widgets on the dashboard. However, for detailed information, you can access the Logs section in the WatcherSubscriber Administrative Panel.

WatcherSubscriber dashboard

The dashboard provides a great way to quickly view and analyse the watcher activities in the system. The widgets are created using detailed information directly from the Watcher process, thus enabling you to easily identify issues so you can ensure the fastest resolution.

When you log on to the WatcherSubscriber Administrative Panel, the following widgets are displayed:

OptionDescription
Events
  • Blocks
Displays the number of blocks the Watcher has seen cut
  • Transactions
One or more transactions may be recorded for each block that is created. This widget displays the total number of transactions that have occurred in blocks the watcher was monitoring
Watchers
  • Matches
When a watcher is created, certain conditions are defined that have to be met for the watcher to be triggered. This widget displays the total number of successful matches
  • Checked
All records under the record definition are monitored, this metric is how many relevant records have been checked for matches since the watcher started running
Errors
  • Failed Actions
When a record is created or updated, the watcher may fail to take the required actions. The total number of failed actions is displayed here
  • Failure rate (15')
The rate of failure per 15 minutes
Actions
  • Mail sent
Total number of emails sent when watcher conditions were met
  • API calls
Total number of API calls made when watcher conditions were met

Loaded Plugins

The Loaded Plugins page contains a row for each loaded plugin. In the following image, you can see that the API call and Email action plugins were loaded when starting the WatcherSubscriber.


Analyse log messages

Logs are automatically generated, time-stamped messages, and provide an audit trail for events that have occurred in the watcher. Various types of logs are provided by the system to collect logging messages. Each log type records information for each event type. For example, "174  |  19/12/2018  |  15:23:17  |  INFO: Adding subscriber: WatcherCustomer" implies that Event 174, a watcher WatcherCustomer was added on the reported date and time.

Log messages from the server are written to the chain code and the most recent logs are available in the WatcherSubscriber Administrative Panel. 

Logging Types 

The log type determines the type of messageThe logging types that can be specified are:

Log Message TypeDescription
DISABLEDDisables logging and stops logging messages.

TRACE

Logs trace messages that is useful when performing problem analysis.

Logs a message with level "TRACE" on this logger.

INFO

INFO messages correspond to normal application behaviour and milestones.

Logs a message with level "INFO" on this logger. 

WARN

Logs warnings, errors, and critical errors. For example, warning messages indicate that there might have a problem and someone should investigate the messages.

Logs a message with level "WARN" on this logger. 

ERROR

Logs errors and critical errors. For example, in case a serious issue or failure of something important an ERROR is logged.

Logs a message with level "ERROR" on this logger. 

DEBUG

Logs diagnostic messages and also logs informational messages, warnings, errors, and critical errors.

Logs a message with level "DEBUG" on this logger. 

Using JConsole

JConsole (Java™ Monitoring and Management Console) is a graphical tool that allows the user to monitor and manage the behaviour of Java applications. The WatcherSubscriber is configured to automatically discover active sessions and generate application-specific metrics. 

You can start the JConsole by typing jconsole on the command line. In the JConsole: New Connection window select the WatcherSubscriber process and click Connect. The JConsole starts where you can view the generated metrics.