posteifmsg

Use the posteifmsg utility to post events to the ObjectServer via the Probe for Tivoli® EIF. After you install the Event Integration Facility, the posteifmsg binary file can be copied to other hosts.

Ensure that you copy the correct version of the binary file for your operating system and bitness.

The posteifmsg utility is a replacement for the Tivoli Enterprise Console postemsg and postzmsg utilities. The posteifmsg utility performs the same event-sending function for Tivoli Netcool/OMNIbus as the postemsg and postzmsg utilities perform for Tivoli Enterprise Console.

Syntax

The syntax of the posteifmsg utility is as follows.

posteifmsg -S server [-p port]| -f configurationfile [-m "message"] [-t timeout] [-l lockfile] [-r severity] [attribute=value...] class source

Where:

  • server is the host name or the IP address of the target server. The -S command-line option assumes that the target server is a Tivoli Enterprise Console system that is hosted on a UNIX operating system, and that the port mapper service is in use. See Configuring the Probe for Tivoli EIF if you are sending events to the Probe for Tivoli EIF and Tivoli Enterprise Console is on the same host as the probe.
  • configurationfile is the configuration file.
  • message is the text of the message, which is enclosed in double quotation marks (" "). The maximum number of characters or bytes that can be passed with the -m command-line option is 4148 characters or bytes. If you specify anything longer, a segmentation fault and core file is generated.
  • timeout is the maximum time, in seconds, for which an event is locked (prevented from sending) when the lock file (specified by the -l option) is locked. This option allows multiple instances of posteifmsg to issue commands concurrently, provided that each instance of posteifmsg uses the same lock file. The timeout option (-t) can only be used with the lock file option (-l). The default timeout is 1000 seconds.

    When the lock timeout elapses, the event is dropped and error code 1 is returned. To prevent dropped events, configure the timeout to handle the event throughput in your environment.

  • lockfile is the name of the lock file used to enable concurrency. If the lock file that you specify does not already exist, it is automatically created. The lock file contains no content and does not require any. The file is not deleted, so you must manually remove it when it is no longer required.
  • severity is a valid severity that is defined for the event class.
  • attribute=value assigns a value to any valid attribute. The value must be defined for the event class. Separate multiple attribute=value expressions with a space.
  • class specifies the class of the event. The class that you specify must be a class that is configured in the server. If the class name contains blank spaces, enclose the class name in double quotation marks (" ").
  • source specifies the source of the event. If the source name contains blank spaces, enclose the source name in double quotation marks (" ").
Important: Ensure that the class source pair is the final arguments in the command-line string. Otherwise, the command fails. For testing, the base of all class source pairs is EVENT EVENT.

Configuration notes

The posteifmsg needs a configuration file to run. The configuration file uses keywords. The minimum configuration for the utility is to set only the ServerLocation and ServerPort keywords. These keywords specify the host and port number on which the Probe for Tivoli EIF is running, as shown in the following example.

ServerLocation=10.10.10.10 
ServerPort=9998

Ensure that the ServerPort keyword is set to the same port number as the as PortNumber keyword in the Probe for Tivoli EIF properties file, tivoli_eif.props.

Further possible configurations are as follows:

  • Ensure that the value of the ServerPort keyword matches the value of the PortNumber property of the Probe for Tivoli EIF.
  • Ensure that the BufferEvents keyword is set to YES, which is the default.
  • Leave the ConnectionMode keyword commented out. The posteifmsg utility always uses the connection_less method to connect and disconnect. This behavior applies even if you set the ConnectionMode keyword to CO.
  • Optional: Set the BufEvtPath keyword. The default is $OMNIHOME/var/posteifmsg.cache.

See also Example 1.

The posteifmsg utility is not thread-safe or cache-secure. It is best suited to sending low numbers of events, at low frequencies. To send high volumes of events to the ObjectServer over short periods of time, you can use the nco_postmsg utility, which is in the Probe Support feature of Tivoli Netcool/OMNIbus. Unlike the Event Integration Facility, the Probe Support feature of Tivoli Netcool/OMNIbus needs an instance of the Deployment Engine to run.

Configuring the Probe for Tivoli EIF

Events from the posteifmsg must be sent to the Probe for Tivoli EIF, which sends the events to the ObjectServer. To use the posteifmsg utility to send events to the Probe for Tivoli EIF, note the following information.

  • To run the posteifmsg utility with -S command-line option, ensure that the PortMapper property in the probe is set to TRUE.
  • If the probe is installed on the same host as Tivoli Enterprise Console, only one of these products can use the portmapper. For example, if Tivoli Enterprise Console is installed on the host and is configured to use a port mapper, you cannot run the probe on the same host and set the PortMapper property to TRUE. The reverse also applies.

The following sample shows the configuration that is required in the probe properties file, tivoli_eif.props, for the port mapper to work.

Server				: 'COL_P_1'
ServerBackup			: 'COL_B_1'
PortNumber			: 9998
PortMapper			: "true"
PortMapperNumber		: 100033057
NetworkTimeout			: 30
PollServer			: 60
AutoSAF				: 1

Configurations for firewalls

You can use the firewall bridge server that is in the main Tivoli Netcool/OMNIbus product for sending events via the posteifmsg utility. For example, you can configure posteifmsg utilities that are outside a firewall to connect to a Probe for Tivoli EIF that is outside the firewall. Then, this instance of the Probe for Tivoli EIF connects to a client access firewall bridge instead of the ObjectServer. The client access bridge outside the firewall connects to a server access firewall bridge that is inside the firewall. The firewall bridge restricts port usage to a single port between the client access firewall bridge and the server access firewall bridge. The server access firewall bridge connects to the ObjectServer.

Example 1

The following example shows the posteifmsg utility used with a configuration file that is called posteifmsg.conf.

posteifmsg -f posteifmsg.conf source=MYTEST severity=HARMLESS hostname=testhost physical_node=testhost.us.ibm.com sub_source=Heartbeat poll_time=3600 host_type=WINDOWS msg="TEST HEARTBEST MESSAGE" origin=10.10.10.10 TEST TEMS

Example 2

The following example shows the posteifmsg used with the portmapper.

posteifmsg -S 10.10.10.10 source=MYTEST severity=CRITICAL hostname=testhost physical_node=testhost.us.ibm.com sub_source=posteifmsg poll_time=3600 host_type=UNIX msg="This is a critical test event" origin=10.10.10.10 TEST TEMS