Web Alert

Web Alert Administration Guide


Table of Contents

1. Introduction
1.1. Overview
1.2. Scope
2. Web Alert Server
2.1. Server Directory Structure
2.2. Starting and Stopping the Server
2.2.1. Starting the Server
2.2.2. Stopping the Server
2.3. Configuring Server Logging
2.3.1. Levels
2.3.2. Appenders
2.3.2.1. Thresholds
2.3.3. Categories
2.3.3.1. Limiting Categories
2.4. Alert Paging Service Configuration
2.4.1. 01-lsft-NxAlertPaging-service.xml
2.4.2. Disable Alert Paging
2.4.3. Enable Alert Paging
2.4.4. lsft-nxalert-paging-properties-service.xml
2.5. Adding VSM Users
2.6. Browser Customization
2.7. Multi-IP Address Interfaces
2.8. Database Configurations
2.8.1. Main Server Database
2.8.2. VSM Database Configurations
3. Web Alert Agent
3.1. Configuring Agent Logging
3.2. Agent Environment Variables
3.3. Starting Multiple Agents on One Host
4. JBoss Ports Used by LSFT Servers
4.1. Ports Used by LSFT Servers
4.1.1. Overriding the Default Ports with the Service Binding Manager

Chapter 1. Introduction

This section introduces the Web Alert Administrator’s Guide and provides the reader with the document overview and scope.

1.1. Overview

This document provides information on administrative tasks for the two components of Web Alert - the server and the agent. It also includes how to configure JBoss ports when two or more Longview Software servers are installed on the same host.

1.2. Scope

This document’s focus is mainly on configuration items, and it does not cover things like troubleshooting problems.

Chapter 2. Web Alert Server

The Web Alert Server is the backbone of Web Alert. The server provides a communication link for browser clients to communicate with VSM systems via the Web Alert agent.

Following is a set of topics that covers some of the common administrative tasks involving the Web Alert server.

2.1. Server Directory Structure

Below is a picture of the server directory structure:

In the picture above, Server Install Dir represents the base installation directory for the server. Administrators need only concern themselves with the subdirectories under the server/lsft directory (i.e. conf, deploy, lib, and log ) and the bin directory.

Here is a brief description of each directory:

Through the rest of the document, these are the only five directories that will be referenced.

2.2. Starting and Stopping the Server

This section provides details on starting and stopping the server.

2.2.1. Starting the Server

The server comes bundled with a start script to launch the server. The start script is located in the server bin directory. On Windows, the script is named startServer.bat , and on Unix, the start script is named startServer.sh. To start the server, simply execute the script. On Unix systems, in addition to starting the server, the start script makes a copy of the current log file (see Section 2.3, “Configuring Server Logging” ) and starts the server process in the background.

Note: The server should be started before the agent is started.

2.2.2. Stopping the Server

The server also comes bundled with a shutdown script that is used to gracefully stop the server. The shutdown script is located in the server bin directory. On Windows, the script is named stopServer.bat , and on Unix, the script is named stopServer.sh . To shutdown a running instance of the server, simply execute the script. Issuing a kill of the server's process or terminating the server with CTRL+C will also initiate a graceful shutdown. Issuing a KILL -9 is not advised since a graceful shutdown will allow the server to properly clean up resources such as database connections.

2.3. Configuring Server Logging

The server logging configuration file is named log4j.xml and is located in the server conf directory. This section describes how to configure the various aspects of the server logging mechanism.

2.3.1. Levels

Log messages are associated with a severity called a Level. In Gateway Central, the logging Levels are TRACE, DEBUG, INFO, WARN, ERROR, and FATAL, in order of increasing severity.

2.3.2. Appenders

The logging mechanism uses what are called Appenders to do the logging work. Appenders control how logging is output, and there are a number of different types of Appenders. Longview Software uses a File Appender and a Console Appender.

The File Appender is responsible for producing the log file in the server’s log directory. The current day’s log file is named server.log , and each day the log file is moved to a file named server.log with the data appended (i.e. server.log.2004-06-07). The configuration for the File Appender can be found in the log4j.xml file in the appender tag with the name attribute value of FILE. Please note that the log file does not rollover until log output is received after midnight.

The Console Appender is responsible for generating logging output to the console window in which the server was started. This logging output method is only valid as long as a user keeps the console window open. The configuration for the Console Appender can be found in the log4j.xml file in the appender tag with the name attribute value of CONSOLE.

2.3.2.1. Thresholds

Appenders can be associated with Thresholds, which are responsible for limiting the Levels of log messages that will be logged to that appender. Thresholds are global for the Appender with which they are associated. Different Appenders may have different Thresholds. Threshold work by specifying the lowest Level of log message to log to the Appender. For example, setting the Threshold to WARN on an Appender will cause that Appender to only log WARN, ERROR, and FATAL messages.

Thresholds are configured in an Appender using the Threshold XML tag like the following:

<param name=”Threshold” value=”INFO”/>

To change the Threshold, simply change the value attribute to a valid logging Level as appropriate for your needs.

2.3.3. Categories

If Appenders can be considered the where of logging, then Categories can be considered the who of logging. In code, log calls are made with Logger objects that are associated with Categories. To more readily convey the idea that a Category is the who of logging, Categories are usually specified as class names. For example, if I have a class named com.lsft.nx.Gateway, all logging calls made in that class will be made with a Logger associated with a Category called com.lsft.nx.Gateway. Gateway Central is configured to only show the last part of the Category name in the logs, like the following example (where NxGatewayFactory is the Category):

2007-06-07 11:44:03,703 INFO  [NxGatewayFactory] Caching Gateway Objects...This may take several minutes

2.3.3.1. Limiting Categories

In addition to setting a Threshold on an entire Appender, you can also limit the logging coming from a particular Category. Limiting the Category sets the minimum Level of log message that will be logged for that given Category. Different Categories may have different Level limits. This feature allows for finer tuning of the log output than Thresholds allow for.

Limiting Categories is accomplished in the log4j.xml file by adding sections like the following:

<category name=”com.lsft”>
    <priority value=”WARN” />
</category>

To change the Category Level limit, simply change the priority to a valid logging Level as appropriate for your needs.

2.4. Alert Paging Service Configuration

There are two configuration files for the Alert Paging service, both located in the server's deploy/nxalert directory. Following is a listing of both files and a description of their contents.

2.4.1. 01-lsft-NxAlertPaging-service.xml

This file is the deployment descriptor for the Alert Paging service. The file's contents should not be edited unless advised by Longview Software.

2.4.2. Disable Alert Paging

The Alert Paging service can be disabled by changing the extension of the above file from .xml to .bak. If the server is running when this is done, currently active paging definitions will be allowed to finish, but no new Alerts will be processed.

2.4.3. Enable Alert Paging

If you installed Web Alert without entering mail server information, Alert Paging is not available. If you wish to enable Alert Paging, edit the lsft-nxalert-paging-properties-service.xml file below. After editing this file, it is necessary to stop and restart the server.

2.4.4. lsft-nxalert-paging-properties-service.xml

This file contains the set of properties referenced by the Alert Paging service. These properties are editable. Following is a list of each property and a brief description.

  • mail.host: Specifies the address of the mail server through which the Alert Paging service will send emails.

  • mail.user: Specifies the user name to use when connecting to the mail server.

  • mail.transport.protocol: Specifies the default message access protocol.

  • mail.debug: The javamail debug mode. Set to true for verbose mail logging.

  • lsft.nxalert.paging.email.from: Specifies the from address that will show up in sent emails. If this is left blank, it will default to noreply@webalert.net.

  • lsft.nxalert.paging.email.subject: Specifies the subject that will show up in sent emails. If this is left blank, it will default to "Web Alert Notification".

  • lsft.nxalert.paging.email.clear.text: Specifies the text to prepend to the subject line of the emails sent to users when an Alert is cleared. The default value is **CLEARED**.

The file is shown here.

  <mbean code="org.jboss.varia.property.SystemPropertiesService" 
  		 name="LongviewServer.Properties:type=Service,name=NxAlertPagingProperties">

    <attribute name="Properties">
		mail.host=mail.lsft.net
		mail.user=
		mail.transport.protocol=smtp
		mail.debug=false
		lsft.nxalert.paging.email.from=WebAlert@longviewsoftware.com
		lsft.nxalert.paging.email.subject=Web Alert Notification
		lsft.nxalert.paging.email.clear.text=**CLEARED**
    </attribute>

  </mbean>

2.5. Adding VSM Users

When adding new VSM users, the VSM caserver process must be restarted in order for Web Alert to 'know about' the new users.

2.6. Browser Customization

If you wish to customize the browser with your own graphics and/or text, it is necessary to configure the lsft-properties-service.xml file located in the server deploy directory. You can configure this file to display custom HTML content in the header and/or the footer of the browser. This file is displayed below.

<server>

  <mbean code="org.jboss.varia.property.SystemPropertiesService" name="LongviewServer.Properties:type=Service,name=CommonProperties">

    <attribute name="Properties">
      lsft.storage.location.client.options=clientoptions
      lsft.ds.lookup=java:/LsftOracleDS
      lsft.date.format=MM/dd/yyyy hh:mma
      wicket.mbean.server.class=org.jboss.mx.server.MBeanServerImpl
      
      org.omg.CORBA.ORBClass=org.jacorb.orb.ORB
      org.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton
      
      <!-- 
      		To override web application headers and footers, add properties in this format:
      		lsft.web.header.<context>.<application>=<HTML file location or URL>
      			AND
      		lsft.web.footer.<context>.<application>=<HTML file location or URL>
      		
      		For example, given the URL http://localhost:8080/mycontext/myapp the header/footer property would be:
      		lsft.web.header.mycontext.myapp="http://www.longviewsoftware.com/custom/myappHeader.html"
      			AND
      		lsft.web.footer.mycontext.myapp="http://www.longviewsoftware.com/custom/myappHeader.html"
      -->
    </attribute>

  </mbean>

</server>

To add custom content to the browser display, follow these steps:

  1. For custom header content, create an HTML file containing the custom content for the header.

  2. For custom footer content, create an HTML file containing the custom content for the footer.

  3. In the deploy/lsft-properties-service.xml file, add the line

				lsft.web.header.<context>.<application>=<HTML file location or URL>

for header content, where in Web Alert, the default servlet mapping value for <context> is netexpert and the value for <application> is alert.

  1. To the right of the equal sign (=) enter the location of the HTML file containing the custom content or the http://URL for its location.

  2. If desired, add a line for the footer and configure as explained above for the header.

2.7. Multi-IP Address Interfaces

In order to allow remote clients to connect correctly in a multi-homed (multiple interface – IP Address) environment, the following steps need to be taken:

  1. Stop the server.

  2. In the $GCHOME/bin/startServer.sh file add the following lines:

    -Djava.rmi.server.hostname=<hostname> \</para>
    -Djava.rmi.server.useLocalHostname=true \

    where <hostname> should be changed to the gcServer hostname. The lines need to be added in the following section of the file:

    # Execute the JVM
    “$JAVA” $JAVA_OPTS \		
    -Djava.endorsed.dirs=”$JBOSS_ENDORSED_DIRS” \
    -Djava.rmi.server.hostname=vader-lhb01 \ 
    -Djava.rmi.server.useLocalHostname=true \
    -classpath “$JBOSS_CLASSPATH” \	

  3. Edit the file $GCHOME/server/lsft/deploy/jms/uil2-service.xml and add the following line:

    <attribute name=”ConnectAddress”><hostname> </attribute>

    This line needs to be added in the following section of the file:

    <!--The bind address-->
    <attribute name=”BindAddress”>${jboss.bind.address}</attribute>
    <attribute name=”ConnectAddress”>vader-lhb01</attribute>

  4. Restart the server.

2.8. Database Configurations

The server contains several database connection pool configurations that establish what is called a DataSource. These files have names that end in -ds.xml. All files have basically the same following layout:

<datasources>
  <local-tx-datasource>
    <jndi-name>JNDI_NAME</jndi-name>
    <jndi-lookup>ejb</jndi-lookup>
    <connection-url>jdbc:oracle:thin:@HOST:PORT:SID</connection-url>
    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
    <user-name>USERNAME</user-name>
    <password>PASSWORD</password>
    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>

    <!--  Connection Pooling Configuration  -->
    <min-pool-size>1</min-pool-size>
    <max-pool-size>5</max-pool-size>
    <blocking-timeout-millis>5000</blocking-timeout-millis>
    <idle-timeout-minutes>15</idle-timeout-minutes>
  </local-tx-datasource>
</datasources>

Following is an explanation of each of the configurable items:

  • JNDI_NAME - The name that the server uses to bind the configuration into JNDI. This is the name by which code can lookup the DataSource by name using JNDI.

  • HOST – The hostname or IP address of the database host machine

  • PORT – The port on which the database listener is listening

  • SID – The SID of the database

  • USERNAME – The username for the database instance

  • PASSWORD – The password for the database instance

2.8.1. Main Server Database

The server requires an Oracle database instance for proper operation. Connections to this database are obtained from a connection pool configured in the manner described above. The server's connection pool is configured in the file deploy/lsft-oracle-ds.xml. This file is popluated with information entered during server install. If the server's database information needs to be changed, simply stop the server, edit this file, and then restart the server.

2.8.2. VSM Database Configurations

Database connections to VSM systems that are connected to the server are pooled as described previously. The configuration files for these connection pools are named by the OSI_SYSTEM name of the system for which the pool is designated. For example, if you had a system named vsm60 registered with the server, the server's deploy directory would contain a configuration file named vsm60-ds.xml.

Chapter 3. Web Alert Agent

The Web Alert agent provides the communication link between NETeXPERT (ipmh) and the rest of the Web Alert components. This section provides details on some common administrative tasks involving the Web Alert agent.

3.1. Configuring Agent Logging

The agent uses the same logging mechanism as the server. Please refer to Section 2.3, “Configuring Server Logging” for information on configuring logging since all information in that section applies to the agent as well, except for the following two differences.

  1. The logging configuration file is named log4j.xml and can be found in the agent's lib directory.

  2. The agent log file is named based on the server address, server port, and agent identifier used to start the agent and can be found in the agent's log directory. For specifics on these values, please see Section 3.3, “Starting Multiple Agents on One Host”. For example, if the server address is lsftweb, the port is 1099, and the identifier is foo, the log file's name will be nxAgent_lsftweb_1099_foo.log.

3.2. Agent Environment Variables

The agent reads the environment from which it was launched in order to determine its configuration. The configuration information read from the environment is sent with each agent status message, and it is used by the server to automatically register systems when their agent is started. The server will also update its internal configuration of a system if the agent sends updated information in the status message (i.e. the environment is changed). This requires that the following environment variables be present in your agent user’s environment:

  • OSI_DB_SERVER – the server of the VSM database instance

  • OSI_DB_PORT – the port of the VSM database instance

  • ORACLE_SID – the Oracle SID of the VSM database instance

  • OSI_DB_USER – the username of the VSM database instance

  • OSI_DB_PASSWORD – the password of the VSM database instance

3.3. Starting Multiple Agents on One Host

When installing the agent, the installer asks for a server address, server port, and agent identifier. This information is stored as default values into the startAgent script located in the agent's bin directory. This script and the stopAgent script can be used to start and stop an agent that needs to connect to the server specified during installation. These scripts call the actual agent script named nxAgent by passing the installed values to it. The nxAgent script takes the following required switches, each of which require a value.

  • -h: server host address

  • -p: server listener port

  • -i: process identifier, which is used to uniquely identify the agent with ipmh

Multiple agents can be started for the same VSM system by manually executing the nxAgent script with a unique process identifier value. This value must be unique regardless of the server the agent is pointing to, otherwise the new instance of the agent will replace an agent with the same identifier in ipmh and the existing agent will no longer receive messages from ipmh.

To stop an agent that has been started directly with the nxAgent script, the user must issue the same command that was used to start the agent with the addition of passing the word stop at the end of the command. For example, if the agent was started with the command

nxAgent -h lsftweb -p 1099 -i foo

then the agent should be stopped with the command

nxAgent -h lsftweb -p 1099 -i foo stop

Chapter 4. JBoss Ports Used by LSFT Servers

This chapter delineates the JBoss ports that all LSFT servers use. It also describes how the set of ports can be easily changed if you want to run more than one instance of a server on the same machine or if you have port conflicts from other applications.

4.1. Ports Used by LSFT Servers

This section documents a complete list of the ports used by all Longview Software server products as well as the files in which those ports are configured.

  • 1099 (deploy/naming-service.xml) - The default bootstrap JNP service listening port. This port is the one that the agents and clients are configured to talk to. If this port is changed, client and agent configurations need to be updated as well.

  • 1098 (deploy/naming-service.xml) - The default port for the RMI naming service.

  • 4444 (deploy/invokers-service.xml) - The default RMI object port.

  • 8080 (deploy/jbossweb-tomcat55.sar/server.xml) - The default HTTP port.

  • 8093 (deploy/jms/uil2-service.xml) - The default JMS server port.

4.1.1.  Overriding the Default Ports with the Service Binding Manager

The previous section details the location where each used port is configured. In order to change these ports, however, one does not need to edit each of the files mentioned above. Starting with all new server-based products and versions of VCDS greater than 1.0.7 and Gateway Central greater than 2.1.0, the server uses the ServiceBindingManager to manage port selection. This section describes how this is done and how the ServiceBindingManager can be used to quickly and easily override the default set of ports.

Overriding the default ports used by a server is necessary if you want to run more than one server on a single machine. To facilitate this, groups of port configurations have been added to a port bindings file located at <LSFT_SERVER_HOME>/server/lsft-port-bindings.xml .

This file creates named groups of port configuration that the ServiceBindingManager can use to override the default ports configured in their respective configuration files. This can be done without making any changes to the files containing the default port configurations. Below is a sample showing the default port binding.

<server name="ports-default">

   <service-config name="jboss:service=Naming"
                   delegateClass="org.jboss.services.binding.AttributeMappingDelegate">
      <delegate-config portName="Port" hostName="BindAddress">
         <attribute name="RmiPort">1098</attribute>
      </delegate-config>
      <binding port="1099" host="${jboss.bind.address}"/>
   </service-config>

   <service-config name="jboss:service=invoker,type=jrmp"
                   delegateClass="org.jboss.services.binding.AttributeMappingDelegate">
      <delegate-config portName="RMIObjectPort"/>
      <binding port="4444"/>
   </service-config>

   <service-config name="jboss.mq:service=InvocationLayer,type=UIL2"
                   delegateClass="org.jboss.services.binding.AttributeMappingDelegate">
      <delegate-config portName="ServerBindPort"/>
      <binding port="8093"/>
   </service-config>


   <service-config name="jboss.web:service=WebServer"
                   delegateClass="org.jboss.services.binding.XSLTFileDelegate">
      <delegate-config>
         <xslt-config configName="ConfigFile"><![CDATA[
<xsl:stylesheet
      xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>

  <xsl:output method="xml" />
  <xsl:param name="port"/>

  <xsl:variable name="portAJP" select="$port - 71"/>
  <xsl:variable name="portHttps" select="$port + 363"/>

  <xsl:template match="/">
    <xsl:apply-templates/>
  </xsl:template>

   <xsl:template match = "Connector">
      <Connector>
         <xsl:for-each select="@*">
         <xsl:choose>
            <xsl:when test="(name() = 'port' and . = '8080')">
               <xsl:attribute name="port"><xsl:value-of select="$port" /></xsl:attribute>
            </xsl:when>
            <xsl:when test="(name() = 'port' and . = '8009')">
               <xsl:attribute name="port"><xsl:value-of select="$portAJP" /></xsl:attribute>
            </xsl:when>
            <xsl:when test="(name() = 'redirectPort')">
               <xsl:attribute name="redirectPort"><xsl:value-of select="$portHttps" /></xsl:attribute>
            </xsl:when>
            <xsl:when test="(name() = 'port' and . = '8443')">
               <xsl:attribute name="port"><xsl:value-of select="$portHttps" /></xsl:attribute>
            </xsl:when>
            <xsl:otherwise>
               <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>
            </xsl:otherwise>
         </xsl:choose>
         </xsl:for-each>
         <xsl:apply-templates/>
      </Connector>
   </xsl:template>

  <xsl:template match="*|@*">
    <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
  </xsl:template>
</xsl:stylesheet>
] ]>
         </xslt-config>
      </delegate-config>
      <binding port="8080"/>
   </service-config>

</server>

The sample configuration above demonstrates the configuration of only the ports that Longview Software uses in its servers. The configuration is named by the name attribute of the beginning server element that is referenced in the ServiceBindingManager MBean configuration described below.

The ServiceBindingManager MBean is the component that dictates which port binding configuration the server is to use. This MBean is configured as a section in the jboss-service.xml file, which is located in the server's conf directory. The port binding configuration to use is specified by the ServiceBindingManager's ServerName attribute as seen below.

<mbean code="org.jboss.services.binding.ServiceBindingManager"
   name="jboss.system:service=ServiceBindingManager">
   <attribute name="ServerName">ports-default</attribute>
   <attribute name="StoreURL">file:../server/lsft-port-bindings.xml</attribute>
   <attribute name="StoreFactoryClassName">
     org.jboss.services.binding.XMLServicesStoreFactory
   </attribute>
</mbean>

The value specified in the ServerName attribute maps that named port binding as the set of ports that will override the default ports. Longview Software servers ship with four port configurations: ports-default, ports-01, ports-02 , and ports-03 . Simply set the ServerName attribute as described above to use one of these configurations.

The values for these port settings are:

  • ports-default - 1099

  • ports-01 - 1199

  • ports-02 - 1299

  • ports-03 - 1399