mposter and msend examples
Note
Unless otherwise noted, all examples and information in this section can apply to either msend
or mposter
.
Example of mposter
mposter -n aspen -v
You can enter the information for the event using the BAROC-style input as shown in the following table:
BAROC-style input | mposter output |
---|---|
|
|
|
|
In the following example, mposter
adds an instance of the DATA
class AppByHost
to the host aspen
. The example uses dynamic data technology in the following ways:
- Specifying that the instance to add is an instance of
AppByHost
- Defining the host as
aspen
Specifying that it defines applications as
word
orexcel
You can use the
mposter
command to change any one of the definitions without changing any of the others.Using msend to modify an event
EVENT; event_handle=219; mc_ueid='mc.bpmsrvvm066.be98d24.0'; msg='Modify test event'; ENDmsend -n bpmsrvvm066 -u 219 -m "Modifying event msg slot by event handle"msend -n bpmsrvvm066 -u @mc.bpmsrvvm066.be98d24.0 -m "Modifying event msg slot by unique identifier"
Using mposter to modify data
SELECTOR; data_handle=480; mc_udid='mc.bpmsrvvm066.bea1e09.1'; based_on=EVENT; name=MY_CRITICAL_EVENTS; description='Selector for My CRITICAL Events'; ecfs=['EVENT($EV) where [$EV.severity equals CRITICAL ]']; ENDmposter -n bpmsrvvm066 -d -u 480 -b description="Critical Selector" mposter -n bpmsrvvm066 -d -u @mc.bpmsrvvm066.bea1e09.1 -b description="Critical EVENT Selector"
Enabling persistent buffering
To enable persistent buffering, first create a writeable directory (BufDir), and then use the following syntax. Note that if the directory is not created first, mposter
/msend
will attempt to create the directory.
Note
If the msend
or mposter
server fails to start after several attempts, and its verbose log indicates no particular cause, then the most likely reason is that it failed during initialization. During initialization, the msend or mposter
server validates any existing persist.dat file in the buffer directory. If that file does not have the expected integrity markers, the msend or mposter
server aborts immediately. In that case, you need to delete or rename that persist.dat file and try to start the msend
or mposter
server without a persist.dat file. The server will create a new persist.dat file and then run correctly.
Enabling persistent buffering using mposter
mposter [current options] -j <BufDir>
The mposterbuf.lck and persist.dat
files are placed in BufDir after you run the mposter
(or msend
) command. Multiple instances of either mposter
, msend
) or both can use the same BufDir directory if the destination cell is the same.
To successfully start the mposter
or msend
CLI commands in a persistent buffering mode, you must ensure that you have write access to BufDir. Using persistent buffering causes mposter
/msend
to launch an mposter/msend server.
Enabling server heartbeats
To enable heartbeats for the msend or mposter server, you must specify a value for the MpServerHeartBeat
CLI configuration variable. (See Configuration parameters specific to msend and mposter.) When configured to heartbeat, the msend or mposter server registers with the target cell to receive heartbeats and creates a heartbeat monitor with the same name as the buffer directory for the server. When heartbeats are enabled and the target cell is active, the msend or mposter server sends heartbeats to the target cell after the number of seconds specified by MpServerHeartBeat
. When configured to heartbeat, the msend or mposter server runs indefinitely until it is stopped with the -k
switch.
Configuration parameters specific to msend and mposter
The following parameters can be defined in mclient.conf, msend.conf or mposter.conf.
Configuration parameter | Description |
---|---|
MpServerHeartBeat | Interval (in seconds) after which the msend or mposter server sends a heartbeat to the target cell. This parameter is disabled by default. |
MpServerIdleTimeout | Amount of time (in seconds) the msend or mposter server continues to run after it has received the last event. If no more incoming events are received after the interval specified by MpServerIdleTimeout, then the server stops. |
SenderServerPort | Configurable port on which the msend or mposter server listens Note If the specified port is already in use by another process, the msend or mposter server will not launch. An applicable error message flagging the conflict is logged in the verbose trace of the msend or mposter server. |
Comments
Log in or register to comment.