Return to
Portfolio

111.11. Oracle OCI (om_oci)

This module can write log messages to an Oracle database.

Warning
This module is deprecated, please use the om_odbc module instead.

111.11.1. Configuration

The om_oci module accepts the following directives in addition to the common module directives. The DBname, Password, and UserName directives are required.

DBname

Name of the database to write the logs to.

Password

Password for authenticating to the database server.

UserName

Username for authenticating to the database server.


ORACLE_HOME

This optional directive specifies the directory of the Oracle installation.

SQL

An optional SQL statement to override the default.

111.11.2. Examples

Example 605. Storing Logs in an Oracle Database

This configuration reads BSD Syslog messages from socket, parses the messages, and inserts them into the database.

nxlog.conf [Download file]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<Extension _syslog>
    Module      xm_syslog
</Extension>

<Input uds>
    Module      im_uds
    UDS         /dev/log
</Input>

<Output oci>
    Module      om_oci
    dbname      //192.168.1.1:1521/orcl
    username    joe
    password    secret
    SQL         INSERT INTO log ("id", "facility", "severity", "hostname", \
                                 "timestamp", "application", "message") \
                VALUES (log_seq.nextval, $SyslogFacility, $SyslogSeverity, \
                        $Hostname, to_date($rcvd_timestamp, \
                                           'YYYY-MM-DD HH24:MI:SS'), \
                        $SourceName, $Message)
    Exec        parse_syslog();
</Output>

<Route uds_to_oci>
    Path        uds => oci
</Route>