com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

Sample 0112 - Server Log Processing

Introduction

This sample demonstrates how to process server logs (Tested for Carbon servers). Here we have used file input adapter and logger output adapter.

The query used in this sample is as follows: Here we are checking for warnings logs and emitting events based on that and print as a log info (and console).

from serverLogStream[logType=='INFO' or logType=='info']
select *
insert into infoTypeLogStream;
from serverLogStream[logType=='WARN' or logType=='warn']
select *
insert into warnTypeLogStream;

Prerequisites

  1. See Prerequisites in CEP Samples Setup page.

Building the sample

Start the WSO2 CEP server with the sample configuration numbered 0112. For instructions, see Starting sample CEP configurations. This sample configuration does the following:

  • Creates <CEP_HOME>/repository/conf/data-bridge/stream-definitions.xml file, which is used to create the stream definitions for the sample.

Executing the sample

  1. First, after server restart go to the corresponding event builder and point the log file to correct location. Please note here server will only reads the tail logs, not full logs.

  2. Then, if CEP detects any warn logs then it will emit events as shown below. (using logger event adapter) 

com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.