Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Oracle DB Listener

 

The Oracle Database Listener application stores logs on the database server.

To integrate JSA with Oracle DB Listener, select one of the following methods for event collection:

Oracle Database Listener Log Source Parameters

If JSA does not automatically detect the log source, add a Oracle Database Listener log source on the JSA Console by using the Oracle Database Listener protocol.

When using the Oracle Database Listener protocol, there are specific parameters that you must use.

The following table describes the parameters that require specific values to collect events from Oracle Database Listener:

Table 1: Oracle Database Listener log source parameters for the Oracle Database Listener DSM

Parameter

Value

Log Source type

Oracle Database Listener

Protocol Configuration

Oracle Database Listener

Log Source Identifier

Type the IP address or host name for Oracle Database Listener log source.

Collecting Oracle Database Events by Using Perl

The Oracle Database Listener application stores logs on the database server. To forward these logs from the Oracle server to JSA, you must configure a Perl script on the Oracle server. The Perl script monitors the listener log file, combines any multi-line log entries in to a single log entry, and sends the logs, by using syslog (UDP), to JSA.

Before the logs are sent to JSA, they are processed and reformatted so that they are not forwarded line-by-line, as this is the format in the log file. All of the relevant information is retained.

Note

Perl scripts that are written for Oracle DB listener work on Linux/UNIX servers only. Windows Perl script is not supported. You must make sure Perl 5.8 is installed on the device that hosts the Oracle server.

To install and configure the Perl script:

  1. Go to the following website to download the files that you need:

    https://support.juniper.net/support/downloads/

  2. From the Downloads list, click Select product tab.
  3. Select JSA from the Product Group list.
  4. Select JSA from the Select from JSA list.
  5. Select the Installed Version of JSA.
  6. Select Linux from the Platform list and click Continue.
  7. 8. Select Browse for fixes and click Continue.
  8. Select Script.
  9. Click <JSA_version>-oracle_dblistener_fwdr-<version_number>.pl.tar.gz to download the Oracle DB Listener Script.
  10. Copy the Oracle DB Listener Script to the server that hosts the Oracle server.
  11. Log in to the Oracle server by using an account that has read/write permissions for the listener.log file and the /var/run directory.
  12. Extract the Oracle DB Listener Script file by typing the following command:

    tar -xvzf oracle_dblistener_fwdr-<version_number>.pl.tar.gz

  13. Type the following command and include any additional command parameters to start the Oracle DB Listener script:

    oracle_dblistener_fwdr.pl -h <IP address> -t "tail -F listener.log"

    Where <IP address> is the IP address of your JSA console orEvent Collector.

    Table 2: Command Parameters

    Parameters

    Description

    -D

    The -D parameter defines that the script is to run in the foreground.

    Default is to run as a daemon and log all internal messages to the local syslog service.

    -t

    The -t parameter defines that the command-line is used to tail the log file (monitors any new output from the listener). The log file might be different across versions of the Oracle database; some examples are provided below:

    Oracle 9i: <install_directory>/product/9.2/network/log /listener.log

    Oracle 10g: <install_directory>/product/10.2.0/db_1/network/log /listener.log

    Oracle 11g: <install_directory>/diag/tnslsnr/qaoracle11/listener /trace/listener.log

    -f

    The -f parameter defines the syslog facility.priority to be included at the beginning of the log.

    If nothing is specified, user.info is used.

    -g

    The -g parameter defines the language pack file. For example,

    ./oracle_dblistener_fwdr.pl -h <IP_address>

    -g /root/OracleDBListener/languagepacks/localization.french

    -t "tail -f /root/smbtest/listener_vali.log"

    This parameter is optional.

    -H

    The -H parameter defines the host name or IP address for the syslog header. It is suggested that is the IP address of the Oracle server on which the script is running.

    -h

    The -h parameter defines the receiving syslog host (the Event Collector host name or IP address used to receive the logs).

    -p

    The -p parameter defines the receiving UDP syslog port.

    If a port is not specified, 514 is used.

    -r

    The -r parameter defines the directory name where you wish to create the .pid file. The default is /var/run. This parameter is ignored if -D is specified.

    -l

    The -I parameter defines the directory name where you wish to create the lock file. The default is /var/lock. This parameter is ignored if -D is specified.

    For example, to monitor the listener log on an Oracle 9i server with an IP address of 192.168.12.44 and forward events to JSA with the IP address of 192.168.1.100, type the following code:

    oracle_dblistener_fwdr.pl -t tail -f <install_directory>/product/9.2/network/log/listener.log -f user.info -H 192.168.12.44 -h 192.168.1.100 -p 514

    A sample log from this setup would appear as follows:

    <14>Apr 14 13:23:37 192.168.12.44 AgentDevice=OracleDBListener Command=SERVICE_UPDATE DeviceTime=18-AUG-2006 16:51:43 Status=0 SID=qora9

    Note

    The kill command can be used to stop the script if you need to reconfigure a script parameter or stop the script from sending events to JSA. For example,

    kill -QUIT `cat /var/run/oracle_dblistener_fwdr.pl.pid`

    The example command uses the backquote character (`), which is located to the left of the number one on most keyboard layouts.

You can now configure the Oracle Database Listener within JSA.

Configuring the Oracle Database Listener Within JSA

You can configure the Oracle Database Listener within JSA.

  1. From the Log Source Type list, select Oracle Database Listener.
  2. From the Protocol Configuration list, select syslog.
  3. In the Log Source Identifier field, type the IP address of the Oracle Database you specified using the -H option in Collecting Oracle Database Events by Using Perl .

    The configuration of the Oracle Database Listener protocol is complete. For more information on Oracle Database Listener, see your vendor documentation.