mposter and msend examples
Example of mposter
You can enter the information for the event using the BAROC-style input as shown in the following table:
BAROC-style input | mposter output |
---|---|
HOST_DOWN; origin='HOST_DOWN'; msg='host blue is down'; END | Message #1 - Evtid = 6 |
HOST_DOWN; origin='HOST_DOWN'; msg='host orange is down'; END | Message #2 - Evtid = 7 |
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 or excel
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.
Enabling persistent buffering using mposter
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 |