Overview
Quest SharePlex is a database replication product for Oracle and other databases. SharePlex records process starts and stops, operator commands, connection events, license warnings and replication errors in a plain text file called the event log. This article explains how to forward the SharePlex event log to Logsign Unified SecOps Platform via syslog and what Logsign extracts from each line.
SharePlex does not send syslog by itself. The event log is a local file, so a log forwarder on the SharePlex server (rsyslog in the example below) reads the file and relays each new line to the Logsign syslog collector. This is a syslog-based, parser-only integration. There is no API poller or credential to configure on the Logsign side.
Prerequisites
- A Logsign Unified SecOps Platform release that includes the Quest SharePlex parser. If Quest is not listed as a vendor in the Add Device screen, contact Logsign Support to confirm your version.
- SharePlex running on a Linux or Unix server. The example below uses rsyslog, which ships with most Linux distributions. For SharePlex on Windows, use a file-to-syslog agent of your choice; the Windows setup was not verified for this article.
- Root (or sudo) access on the SharePlex server to edit the rsyslog configuration.
- Network access from the SharePlex server to the Logsign syslog collector on the syslog port you use (514 by default).
Locate the SharePlex Event Log
SharePlex writes the event log to the log subdirectory of its variable-data directory. The path is $SP_SYS_VARDIR/log/event_log. Run the command below as the SharePlex administrator user to see the directory for your instance:
echo $SP_SYS_VARDIRIf the server runs more than one SharePlex instance (one per port), each instance has its own variable-data directory and its own event_log file. Forward each file separately.
The same directory also holds per-process logs and trace logs. These are meant for Quest Support troubleshooting and are not parsed by Logsign. Forward only event_log.
Configure rsyslog on the SharePlex Server
Create a file such as /etc/rsyslog.d/60-shareplex.conf with the content below. Replace the file path with your $SP_SYS_VARDIR value and <LOGSIGN_IP> with the IP address of your Logsign syslog collector.
module(load="imfile")
input(type="imfile"
File="/u01/splex/var/log/event_log"
Tag="shareplex:"
Severity="info"
Facility="local5"
startmsg.regex="^(Info|Notice|Warning|Error|Fatal) [0-9]{4}-")
local5.* action(type="omfwd" target="<LOGSIGN_IP>" port="514" protocol="tcp"
template="RSYSLOG_SyslogProtocol23Format")
& stopA few notes on this configuration:
startmsg.regextells rsyslog that every SharePlex event starts with a level word and a date. A continuation line that has no level word is attached to the event above it instead of being sent as a separate, unparseable message.- The
local5facility is only an example. Pick any free facility fromlocal0tolocal7iflocal5is already in use on the server. - For a second SharePlex instance, add another
inputblock with its ownFilepath andTag. - Both RFC 5424 (as in the example) and the traditional RFC 3164 syslog header are accepted, so the default rsyslog forwarding template also works. UDP can be used instead of TCP; TCP is recommended because it does not silently drop messages.
Restart rsyslog to apply the change:
systemctl restart rsyslogAdd Device in Logsign USO
Open the Logsign Unified SecOps Platform web interface and click the + Device button under Settings > Data Collection. In the Source Type Selection page, choose Syslog as the collection method, select Quest as the vendor and SharePlex as the product.
| Field | Description |
|---|---|
| Host | IP address of the SharePlex server (or of the log forwarder that relays its event log). |
| Encoding | utf_8 (default). |
| Offset | Time offset in minutes. SharePlex event log timestamps carry no time zone, so set this if the SharePlex server's local time differs from the collector's. |
| Data Policy | Filter which incoming logs are kept. Default Policy collects everything. |
| Check Health | Enable to monitor whether the source is actively sending logs. |
| Device Name / Tag | A descriptive name and optional tag for the source, used in search and reporting. |
Click Save to add the source. Events should appear under Search once rsyslog starts relaying new event log lines.
Log Format
Each SharePlex event log line has the layout below. The session number and the trailing module name appear only on some lines.
<Level> <YYYY-MM-DD> <HH:MM:SS.microseconds> <pid> <thread> [s:<session>] <message> [module <name>]Sample lines (taken from public Quest knowledge base articles):
Notice 2008-10-31 23:28:50.199158 5337538 1 User command: oracle activate config config_Abc.file (from s12cdc.cdc.abc.com)
Info 2011-01-14 19:11:20.075846 27948 1 Poster launched, pid = 27148 (posting from SID1, queue queue_name, to SID2)
Error 2018-03-27 16:51:44.601373 29814 1114429760 Capture: [SP-OCT01511] Unable to find archivelog with sequence#: 77041 (thread: 1). See 'http://advice.shareplex.com/SP-OCT01151' for additional advice and support. (capturing from o.ORA15GR2) [module oct]The level word must be one of Info, Notice, Warning, Error or Fatal, and the time must include fractional seconds. Lines that do not follow this layout are not parsed as SharePlex events.
Supported Events
Logsign classifies each line by its message text. The first matching rule wins. Lines that match none of the specific rules are still parsed and kept as general operation events.
| Event | Example message | Event Vendor ID | EventMap (Context / Type / SubType) |
|---|---|---|---|
| User command | User command: ... | 1 | System / Command / Info |
| Command server launched | Command server launched, pid = N | 2 | Network / Connection / Info |
| Process launched | Poster launched, pid = N | 3 | System / Process / Create |
| Process exited normally | ... exited with code=0, pid = N | 4 | System / Process / Terminate |
| Process exited with error | ... exited with code=1, pid = N (any non-zero code) | 5 | System / Process / Error |
| Process stopped | Poster stopped: ... | 6 | System / Process / Error |
| Process killed | Poster killed due to SIGQUIT ... | 7 | System / Process / Error |
| Shutdown by request | Poster: Shutting down by request | 8 | System / Process / Terminate |
| Peer connected | Import connected to export on host | 9 | Network / Connection / Info |
| SharePlex started | SharePlex was started on cpu ... using port N version V | 10 | System / Service / Start |
| License expiry warning | ... license key will expire on ... | 11 | System / License / Expire |
| Oracle error | Any component message containing ORA-NNNNN | 12 | Object / Database / Error |
| Component error | Other component messages with level Error or Fatal | 13 | System / Operation / Error |
| Other | Everything else | 999 | System / Operation / Info |
The Event System ID is the prefix ID 4528 followed by the Event Vendor ID (for example 45281 for a user command).
Severity
Severity comes from the SharePlex level word: Info becomes information, Notice becomes notice, Warning becomes warning, Error becomes error and Fatal becomes critical. One exception applies: a process that exits with a non-zero code is always reported with error severity, even though SharePlex logs it at Info level.
Extracted Fields
| Logsign field | Content |
|---|---|
| Time.Generated | Event time from the SharePlex line |
| Event.Info | Message text (or the reason text for stopped processes and component messages) |
| Event.Detail | Replication context in parentheses, for example posting from SID1, queue q1, to SID2 |
| Event.Module | SharePlex module name, for example opo or oct |
| Event.ExitCode | Exit code of a process that exited |
| Event.ErrorCode | SharePlex error number or advice code, for example 11027 or SP-OCT01001 |
| Error.Code | Oracle error code, for example ORA-12096 |
| Process.Name | SharePlex component, for example Poster, Capture, Reader, Export, Import |
| Process.PID / Process.ID | PID that wrote the line / PID of the launched, exited or killed child process |
| Thread.ID, Session.ID | Thread number and session number from the line |
| Source.Command | Command text of a user command |
| Source.HostName | Host that ran sp_ctrl for a user command, or the sending host for import and command server connections |
| Destination.HostName | Target host for export processes and peer connections |
| Database.Name | Source database SID for capture, read, post and activation events |
| Application.Version, Server.Port | SharePlex version and port from the startup message |
Every event also carries Vendor Quest, Product SharePlex, Category Data Replication, Type Database Server and prefix ID 4528.
Notes and Limits
- Only the SharePlex event log format is parsed. Per-process logs, trace logs and other files from the same directory are not matched by this parser.
- SharePlex can truncate its own event log (for example with the
truncate logcommand insp_ctrl). rsyslog continues to follow the file after truncation. Whether lines written at the moment of truncation can be lost was not verified. - Very long event lines can be cut by the forwarder's maximum message size (rsyslog default 8 KB). A cut line may lose its trailing context and module name.
Verification
- Confirm that the source receives data under Settings > Data Collection (the event count increases).
- Search for the device name and check that events show Vendor Quest, Product SharePlex, and fields such as Process Name, Event Info and Severity.