5 Tuxedo Event Monitoring

Figure 5-1 Tuxedo Event Monitoring Structure


Tuxedo Event Monitoring Structure

Every Tuxedo event trap on the domain target is received by the SNMP Receivlet in Enterprise Manager for Oracle Tuxedo. The Enterprise Manager for Oracle Tuxedo generates an Enterprise Manager metric alert with a severity of "Critical" or "WRAN" for the received Tuxedo event traps. "Critical" means the Tuxedo event trap severity is Error (1), while "WRAN" means the Tuxedo event trap severity is Warn (2). The severity Info (3) is not supported. Every alert generated by Tuxedo event trap creates an EM incident automatically if the SNMP listening port is configured correctly.

The event message is in the following format:

"EventName: <tuxEventsName>. Tuxedo Event LMID: <tuxEventsLmid>. Tuxedo Event Detection Time: <tuxEventsTime>. Tuxedo Event Class: <tuxEventsClass>. Tuxedo Agent Name:<beaLogicalAgentName>. Description: <tuxEventsDescription>"

For more information, see Oracle Tuxedo Documentation for Event Traps.

To enable Tuxedo events collection in EM, do the following steps:

  1. Configure TMSYSEVT in UBBCONFIG(5) file.
  2. Configure the TRAP_HOST and TMAGENT in beamgr.conf. For more information, refer to Oracle SNMP Agent Configuration File: beamgr.conf..

    Note:

    The Trap host is the EM agent host and the port is the Enterprise Manager Agent SNMP listening port which will be configured at Enterprise Manager Agent in step 5.

    Following is an configuration example.

    TRAP_HOST 10.182.54.215 1061 public

    SNMP_ENABLE_AUTH_TRAP 1

    TMAGENT tuxedo_agent_1 /home/oracle/tuxedo12c /home/oracle/test/jmx/fakemp/master/tuxconfig

  3. Set the environment variable of BEA_SM_SNMP_MIBFILE and BEA_SM_BEAMGR_CONF
  4. Start Oracle SNMP Agent. For more information, refer to Starting Oracle SNMP Agent.

    Following is an example:

    tux_snmpd -l tuxedo_agent_1 -p 5400 -s

    Note:

    If your Enterprise Manager agent located at the same machine as your Tuxedo domain, make sure the port number followed by -p" option is not equal to the trap port configured in beamgr.conf.
  5. Add SNMP listening port in the Tuxedo domain target configuration page.

    Note:

    If one EM agent monitors multiple Tuxedo domains, each Tuxedo domain target SNMP listening port must be unique within one EM agent.

The following figure shows an incident created by EM and caused by Tuxedo event trap.

Figure 5-2 Incident Example


Incident Example

Note:

Tuxedo Event Monitoring can monitor user events when the post data is a 32-bit fielded buffer containing the fields listed in the following table. The Tuxedo user events generated by TSAM Plus alert definitions can be trapped by the Tuxedo SNMP agent and subsequently monitored by Enterprise Manager for Oracle Tuxedo. Also, the TMUSREVT and TMSYSEVT must be configured for user event collection.

Table 5-1 FML Fields

FML Field Name Name in Event Trap Description
TA_EVENT_NAME tuxEventsName Required. String[1…31]
TA_EVENT_SEVERITY tuxEventsSeverity Required. In the format of “ERROR”, "WARN", "INFO "
TA_EVENT_LMID tuxEventsLmid Optional. String[1…30]
TA_EVENT_TIME tuxEventsTime Optional. Time, in seconds, since 00:00:00 UTC, January 1, 1970
TA_EVENT_DESCRIPTION tuxEventsDescription Optional. String[1…1118]
TA_CLASS tuxEventsClass Optional. String[1…30]

The following code snippet is an example of user event that is trapped by Enterprise Manager for Oracle Tuxedo.

#include <stdio.h>

#include <string.h>

#include <stdlib.h>

#include <errno.h>

#include <time.h>

#ifdef WIN32

#include <sys/types.h>

#endif

#include "atmi.h"

#include "userlog.h"

#include "Uunix.h"

#include <evt_mib.h>

#define NFLOATS 50 /* Number of string fields */

#define LEN(NFLOATS * sizeof(float))
static long long_v;
#define LFADDR(x)(long_v = (x), (char * ) & long_v)
int
main(int argc, char * argv[]) {
   long len;
   int error;
   time_t currtime;
   FBFR32 * buf;
   char decTime[14];

   if (tpinit((TPINIT * ) NULL) == -1) {
      (void) fprintf(stderr, "Failed to join application -- %s\n",
         tpstrerror(tperrno));
      (void) userlog("Clientpost failed to join application -- %s\n",
         tpstrerror(tperrno));
      (void) exit(1);
   }

   if ((buf = (FBFR32 * ) tpalloc("FML32", NULL, Fneeded32(NFLOATS, LEN))) == NULL) {
      (void) fprintf(stderr, "Failure to allocate FML32 buffer -- %s\n",
         tpstrerror(tperrno));
      (void) userlog("Clientpost failure to allocate FML32 buffer -- %s\n",
         tpstrerror(tperrno));
      (void) tpterm();
      (void) exit(1);
   }

   if (Fadd32(buf, TA_EVENT_NAME, "Test Event", 0) == -1) {
      (void) fprintf(stderr, "Failed to add TA_EVENT_NAME field -- %s\n", Fstrerror32(Ferror32));
      (void) tpfree((char * ) buf);
      (void) tpterm();
      (void) exit(1);
   }

   if (Fadd32(buf, TA_EVENT_SEVERITY, "ERROR", 0) == -1) {
      (void) fprintf(stderr, "Failed to add TA_EVENT_SEVERITY field -- %s\n", Fstrerror32(Ferror32));
      (void) tpfree((char * ) buf);
      (void) tpterm();
      (void) exit(1);
   }
   currtime = time(NULL);

   if (Fadd32(buf, TA_EVENT_TIME, LFADDR(currtime), 0) == -1) {
      (void) fprintf(stderr, "Failed to add TA_EVENT_TIME field -- %s\n", Fstrerror32(Ferror32));
      (void) tpfree((char * ) buf);
      (void) tpterm();
      (void) exit(1);
   }
   if (tppost("Test Event", (char * ) buf, 0, TPSIGRSTRT) == -1) {
      (void) fprintf(stderr, "Failure to post request -- %s\n",
         tpstrerror(tperrno));
      (void) userlog("Clientpost failed to post request -- %s\n",
         tpstrerror(tperrno));
      /* Free any allocated buffers, leave the application, and exit */
      (void) tpfree((char * ) buf);
      (void) tpterm();
      (void) exit(1);
   }

   (void) tpfree((char * ) buf);
   (void) tpterm();

   exit(0);
}