# Chapter 2. Getting Started

This chapter describes the required administrative steps to set up a Log Central system. The procedure assumes that you have already installed Log Central on the managed nodes and the central host, as described in the BEA Manager Installation Guide.

The following topics are included:

- Setting Up Log Central

- Optional Setup Tasks

- Configuring Log Central

- Configuring Multiple Instances of Log Central

## Setting Up Log Central

To set up Log Central, perform the following steps:

1. Ensure that the Log Central relational database is installed and accessible to the Log Central Central Collector.

For a list of supported databases, refer to the BEA Manager Release Notes. For database installation details, consult the database vendor's documentation. The installed database must have a Java Database Connectivity (JDBC) driver available. For details on how to install this, consult your database JDBC documentation.

2. Create a Log Central database user (for example, `lc_user`).

   This user should have privileges to create and delete tables and modify their contents. Allocate a minimum of 10 Mb of disk space for the database user. Log Central uses this database user to access the database and create and update tables that store Log Central messages.

3. Install the Java Runtime Environment (JRE) on the Central Host machine.

   The JRE should be available from your operating system vendor. Modify your environment so that the path includes the directory that has the JRE program.

4. On the central host, configure the Log Central system using the `lc_config` program, as described in "Configuring Log Central."

   Note: You need to create service entries for the UDP services-if they do not exist-`lc_talk` (default port 7012) and `lc_conf` (default port 7011). These services need to be available on the central host, and managed nodes, as well. For more information, consult your network administrator.
   Service entry examples:
   `lc_conf 7011/udp
   lc_talk 7012/udp`

5. Create the Log Central database schema.

   To do this, run the `lc_create_schema` program. For more information, refer to Chapter 3, "Configuring the Database for Use with Log Central."

6. Create mappings for logs that you want to monitor.

   Each Log Monitor process on a managed node monitors a log and maps incoming log messages to Log Central format. Mappings are provided out-of-the-box for BEA TUXEDO logs, the Oracle alert log, and the NT event log. You need to create mappings for other logs that you wish to monitor.

   How to do this is described in Chapter 4, "Integrating Logs into Log Central."

7. Create and load message definitions.

   In addition to the log message attributes that are contained in the messages sent by Log Central data collection agents, further attributes for each message are contained in the message definition, which is stored in the Log Central database. The definition includes such attributes as severity and recommendation (the action recommended in response to a message). You can modify or add definitions one at a time using the Message Definition Editor-a tool in the Log Central Console. However, when initially setting up Log Central, you may want to load a number of message definitions at once. It is easier to do this as a batch process using command-line utilities provided for this purpose.

   How to do this is described in Chapter 5, "Creating and Loading Message Definitions."

   Note: You may wish to create subsystem entries. How to do this is described in Chapter 3, "Configuring the Database for Use with Log Central."

8. Integrate Log Central with your network or system manager.

   The Log Central system itself is manageable from a management system that supports Simple Network Management Protocol (SNMP). Log Central can also be configured to send SNMP trap notifications to a system manager in response to specified log messages.

   How to do this is described in Chapter 7, "Integrating Log Central with an SNMP Manager."

9. Start Log Central components on the central host.

   How to do this is described in Chapter 8, "Starting and Stopping Log Central."

10. Start Log Central components, including the necessary Log Monitor processes, on the managed nodes.

    How to do this is described in Chapter 8, "Starting and Stopping Log Central."

11. To use Log Central to monitor log resources, invoke the Log Central Console on the Central Host using the `lc_launch` command.

    How to do this is described in Chapter 9, "Using the Log Central Console."

## Optional Setup Tasks

Optional setup tasks include:

- Setting environment variables

You might want to set environment variables if you want to run Log Central without accepting all its defaults, such as with multiple instances of Log Central or for debugging purposes. You can do so before starting Log Central. If you want to set environment variables later, you must first stop Log Central, as described in Chapter 8, "Starting and Stopping Log Central."

Environment variables are described in detail in Appendix B, "Environment Variables."

- Specifying agent filters

  If you want to specify filters for different managed nodes, modify the configuration file appropriately. This is described in Chapter 6, "Host and Filter Configuration."

## Configuring Log Central

After you have ensured that all of the software components previously specified have been properly installed, and you have installed Log Central on the central host, you can proceed with configuring Log Central. To do so, you run the `lc_config` program. However, before running this program, you should be prepared to provide the information listed under "Required Information for Host Configuration Utility."

### Required Information for Host Configuration Utility

Running the `lc_config` program brings up the form shown in Figure 2-1. You might want to fill out a worksheet first and have it handy.

The numbered list that follows the figure correspond to the numbers in Figure 2-1.

> Figure 2-1 Host Configuration Utility

You need to ascertain the following:

1. The central host machine name

This name should match the value returned by the `hostname` command as run on the central host.

2. The string to prefix to the names of the intermediate log files

3. The port number on which the Log Central message processor listens (the default is 7001)

4. The database name (either Oracle or MSSQL)

5. The type of database connection

   For more information, refer to your database documentation.

6. The URL to access the database

   For more information, refer to your database documentation.

7. The database driver class name

   For more information, refer to your database documentation.

8. The complete file name to the JDBC driver (for example, d:\orant\jdbc\lib\classes111.zip)

   The configuration program copies the file specified here to `install_dir/``bin/JDBCDrvrForLC.zip`

9. The Log Central database user name

   This is the user you created in the second step under "Setting Up Log Central." The configuration program then uses this user to create and populate the tables of Log Central.

10. The user password

### Running the Host Configuration Utility

After you have determined the information in the preceding section, you run the host configuration utility, as shown in the following steps.

1. Run the `lc_config` program on the central host.

The syntax for `lc_config` follows:

    lc_config [-inifile initialization_file]
    [-conffile configuration_file] [-fn fontname] [-fs fontsize]

The default for `initialization_file` is `install_dir``/etc/msg_processor.ini`

The default for `configuration_file` is `install_dir``/etc/messaging.conf` (where `install_dir` is the directory in which you installed Log Central).

2. Fill out the fields of the script to correspond to those you determined earlier.

You can do more extensive configuration of Log Central than that which you have just accomplished using `lc_config`. This is described in Chapter 6, "Host and Filter Configuration."

## Configuring Multiple Instances of Log Central

An instance of a Log Central system consists of software integrated across a central host and several managed nodes. All messages from Log Central are collected and centralized on the central host. If one set of messages generated by a set of applications is independent of another set of messages generated by another set of applications, yet they share at least one physical machine, and you need to administer both sets independently, then you must configure multiple instances of Log Central. For example, if you have more than one BEA TUXEDO domain, and you need to administer them differently, then you would create a separate instance of Log Central for each BEA TUXEDO domain.

To configure multiple instances of Log Central, for each additional instance perform all the following steps on the central host:

1. Define two services in the services database similar to `lc_conf` and `lc_talk`, using the following format:

    conf_service     port_number1/udp
    msg_service      port_number2/udp

Make sure the domains use unused ports.

For example, they might have entries that look like the following:

    lc_conf_dom2     9011/udp
    lc_talk_dom2     9012/udp

2. Make a copy of the Log Central configuration file (`install_dir``/etc/messaging.conf`), as, for example, `install_dir``/etc/messaging.conf.dom2`.

3. Make a copy of the Log Central initialization file (`install_dir``/etc/message_processor.ini`), as, for example, `install_dir``/etc/message_processor.ini.dom2`.

4. Edit the copied `messaging.conf` file of step 2.

   Change the `TALK_SERVICE` parameter to the newly defined service. For example, the parameter might look like the following:

       TALK_SERVICE = "lc_talk_dom2"

5. In the same file, set the `IPCKEY` entry to a value different from the value of any other instance. For example:

       IPCKEY = 0xee220000

   IPCKEY can take any numeric value. Use 0x to indicate a hexadecimal value.

6. In the same file, set the `INIFILE` entry to the copied `message_processor.ini` file in step 3. For example:

       INIFILE = install_dir/etc/message_processor.ini.dom2

7. Run the `lc_config` command to configure the newly copied file. For example:

       lc_config -conffile install_dir/etc/messaging.conf.dom2
       -inifile install_dir/etc/message_processor.ini.dom2

8. Set the environment variable `BEA_LC_IPCKEY` to the value set in step 5, as, for example, `0xee220000`.

9. Set the environment variable `BEA_LC_CONF_SERVICE` to one of the new service values, for example, if you are configuring a second instance, `lc_conf_dom2`.

   For more information about the two preceding variables, refer to Appendix B, "Environment Variables."

10. When you start the Central Collector, pass the copied `messaging.conf` file as a parameter. For example:

        start_messaging -f install_dir/etc/messaging.conf.dom2

On each managed node, perform steps 8 and 9 from the preceding list, using the same values.

Note: Make sure the environment variables `BEA_LC_IPCKEY` and `BEA_LC_CONF_SERVICE` are set to correct values before running the `start_messaging` command on the managed nodes as well as the central host. Also, use the `-i` `inifile` parameter for all the database commands, such as `lc_user_list`. For more information on database commands, refer to Chapter 3, "Configuring the Database for Use with Log Central."