Use case: Building a custom third-party integration with BMC TrueSight Impact Manager
Configure an integration with TrueSight Impact Manager by using BMC Helix Developer Tools to get the TrueSight Impact Manager cell events into BMC Helix Operations Management for monitoring.
This use case explains how to build an integration with TrueSight Impact Manager by using the Custom Integration template in BMC Helix Developer Tools.
Configuring an integration with TrueSight Impact Manager involves the following high-level tasks:
Task 1: Set up the environment
Setting up the environment involves the following tasks:
To download a Docker connector
In BMC Helix Developer Tools, download the Docker connector required for the integration. Enter a name for the connector, for example, CellGateway while downloading. For the Docker requirements and download instructions, see Step 1 to Step 3 on Downloading and installing Docker connectors.
If you have entered the connector name as CellGateway, the connector shell script will be downloaded as install-connector-CellGateway.sh.
To allow communication between the container and the Docker host
To allow communication between the container and Docker host, add the container port and the corresponding port on the Docker host by using the -p
option.
- Open the install-connector-CellGateway.sh file that you downloaded with a text editor.
Search for the following command in the file:
docker create --name $NEW_CONNECTOR_NAME --restart=unless-stopped --env-file $ENV_VARIABLE_FILE_PATH -h $CONNECTOR_NAME -v $DATA_FOLDER_PATH/:/fluentd/etc/data/ -v $CUSTOM_FOLDER_PATH/:/fluentd/etc/custom/ -v $LOG_FOLDER_PATH/:/fluentd/log/ -it $NEW_DOCKER_IMAGE_ID > /dev/null
Add the port numbers by using the
-p
option:docker create --name $NEW_CONNECTOR_NAME --restart=unless-stopped --env-file $ENV_VARIABLE_FILE_PATH -h $CONNECTOR_NAME -v $DATA_FOLDER_PATH/:/fluentd/etc/data/ -v $CUSTOM_FOLDER_PATH/:/fluentd/etc/custom/ -v $LOG_FOLDER_PATH/:/fluentd/log/ -p 1850:1850 -it $NEW_DOCKER_IMAGE_ID > /dev/null
In this example, both the container port and the corresponding port on the Docker host are 1850.
To configure the connector to use an HTTP Proxy
Create a config.json file with the following contents in the ~/.docker directory of the user who will be running the Docker container:
{ "proxies": { "default": { "httpProxy": "http://<proxy_hostname_or_IPAddress>:<proxy_port>", "httpsProxy": "http://proxy_hostname_or_IPAddress>:proxy_port>" } } }
- Update the values for the
proxy_hostName_or_IPAddress
andproxy_port
parameters in the file.
You can add more parameters to this file. For details, see the Docker documentation..
To install the connector and verify its status
- Install the connector that you have downloaded in a previous step. For instructions, see Step 4 on Downloading and installing dockerized connectors.
To verify the connector status, run the following command:
tail -f /opt/bmc/connectors/CellGateway/logs/fluent.log
The following output indicates that the connector is running and logging the heartbeat periodically.
Task 2: Create and deploy the integration
Creating and deploying the integration involves the following tasks:
Create a sandbox integration environment by using the Custom Integration template.
- To create a deployable package and deploy the integration.
To create a sandbox integration environment by using the Custom Integration template
In BMC Helix Developer Tools, click the Available integrations tab.
On the Custom Integration tile, click Configure.
- Enter a unique name for the integration, for example, CellGateway.
From the Connector list, select the connector that you have installed, for example, CellGateway.
Click Configure.
The added integration is available on the Configured Integrations tab. The integration environment contains few out-of-the-box directories and example pipeline configuration files.
To create the pipeline configuration files
Create the cellgateway_event_pipeline.conf and cellgateway_mapping.json files.
Before you begin
Before you create the pipeline configuration files, identify the sandbox integration ID and get familiar with the default sandbox directory structure. For information, see Exploring the default sandbox directory structure and configuration files.
Do the following steps to create the pipeline configuration files
Create a CONF file named cellgateway_event_pipeline.conf with the following contents. In the file,
tag
stores the integration name that can be referred by other elements such asfilter
andmatch
to filter and match the incoming events.cellgateway_event_pipeline.conf<source> @type tcp tag CellGateway_GENERICEVENTS port 1850 bind 0.0.0.0 <parse> @type none </parse> </source> <filter CellGateway_GENERICEVENTS> @type record_transformer enable_ruby <record> message ${record["message"].gsub('\'', '')} </record> </filter> <filter CellGateway_GENERICEVENTS> @type parser key_name message <parse> @type csv delimiter "|EIF_EIF|" parser_type fast keys cell_garbage,cell_class,cell_action,cell_ueid,cell_severity,cell_status,cell_repeat_count,cell_priority,cell_object,cell_host,cell_location,cell_host_address,cell_object_class,cell_parameter,cell_parameter_value,cell_parameter_unit,cell_msg </parse> </filter> <filter CellGateway_GENERICEVENTS> @type record_transformer remove_keys cell_garbage </filter> <filter CellGateway_GENERICEVENTS> @type bmc_ade_transformer result_in_array true mapping_file /fluentd/etc/data/config/cellgateway_mapping.json mapping_json_key EventMappingDetails ignore_blank_values false </filter> <filter CellGateway_GENERICEVENTS> @type stdout </filter> <match CellGateway_GENERICEVENTS> @type bmc_ade_http endpoint_url ${{CONNECTOR_ENV.ADE_BASE_URL}}/events-service/api/v1.0/events ssl_no_verify true # default: false use_ssl true http_method post # default: post serializer json # default: form rate_limit_msec 0 # default: 0 = no rate limiting raise_on_error true # default: true recoverable_status_codes 503 # default: 503 config_json_file_path /fluentd/etc/data/config/ade_config.json format json audit_payload {"labels":{"metricName":"Events","hostname":"${{CONNECTOR_ENV.HOST_NAME}}","entityId":"${{CONNECTOR_ENV.AGENT_ID}}","entityType":"Connector","entityName":"${{CONNECTOR_ENV.AGENT_NAME}}","IntegrationID":"<integrationID>","IntegrationName":"CellGateway_GENERICEVENTS","unit":"Nos.","source":"CELL"},"samples":[{"value":0,"timestamp":0}]} </match>
- In the file, specify the value of the IntegrationID parameter for the integration that you have created.
- Copy the cellgateway_event_pipeline.conf file to the /opt/bmc/connectors/CellGateway/data/integrationID/pipeline directory.
Add the following line to the /opt/bmc/connectors/CellGateway/data/integrationID/generic_pipeline.conf file:
@include ./pipeline/cellgateway_event_pipeline.conf
Create a JSON file named cellgateway_mapping.json and add the mapping details as shown in the following example:
{ "EventMappingDetails": [ { "inputkey": "MonitorEvent", "outputkey": "class", "type": "constant" }, { "inputkey": "cell_action", "outputkey": "source_port", "type": "assignment" }, { "inputkey": "cell_ueid", "outputkey": "object_id", "type": "assignment" }, { "inputkey": "cell_severity", "outputkey": "severity", "type": "assignment" }, { "inputkey": "cell_status", "outputkey": "status", "type": "assignment" }, { "inputkey": "cell_repeat_count", "outputkey": "_repeat_count", "type": "assignment" }, { "inputkey": "cell_priority", "outputkey": "priority", "type": "assignment" }, { "inputkey": "cell_object", "outputkey": "object", "type": "assignment" }, { "inputkey": "cell_host", "outputkey": "source_hostname", "type": "assignment" }, { "inputkey": "cell_location", "outputkey": "location", "type": "assignment" }, { "inputkey": "cell_host_address", "outputkey": "source_address", "type": "assignment" }, { "inputkey": "cell_object_class", "outputkey": "object_class", "type": "assignment" }, { "inputkey": "cell_class", "outputkey": "source_identifier", "type": "assignment" }, { "inputkey": "cell_parameter", "outputkey": "metric_name", "type": "assignment" }, { "inputkey": "cell_parameter_value", "outputkey": "metric_value", "type": "assignment" }, { "inputkey": "cell_parameter_unit", "outputkey": "metric_unit", "type": "assignment" }, { "inputkey": "cell_msg", "outputkey": "msg", "type": "assignment" }] }
- Copy the cellgateway_mapping.json file to the /opt/bmc/connectors/CellGateway/data/config directory.
Restart the integration by running the following commands:
cd /opt/bmc/connectors/CellGateway sh ./restart.sh
The /opt/bmc/connectors/CellGateway directory now contains the following directories and configuration files:
To create a deployable package and deploy the integration
- Navigate to the /opt/bmc/connectors/CellGateway/data/<integrationID> directory.
Run the following command to create a deployable package:
tar -cvf /opt/bmc/connectors/CellGateway/custom/download/cellgateway.tar.gz config pipeline generic_pipeline.conf
The cellgateway.tar.gz file is created in the /opt/bmc/connectors/CellGateway/custom/download directory.
Run the following command to verify the status of the connector:
tail -f /opt/bmc/connectors/CellGateway/logs/fluent.log
The following output indicates that connector is running and logging the heartbeat periodically:
- In BMC Helix Developer Tools, on the Available integrations tab, click the action menu of the CellGateway integration, and select Copy ID to copy the integration ID of the sandbox integration, and make a note of this integration ID.
- Click the info icon
(below the Connector Status) on the integration tile, and note the connector name and host name on which the connector is running. - In BMC Helix Developer Tools, on the Available integrations tab, click the action menu of the CellGateway sandbox integration, and select Edit.
Enter the following information:
- From the entity list, select Events.
- Enter cellgateway_event_pipeline.conf as the entity configuration file name.
- Leave the Name and Value fields blank.
- Ensure that the Encrypt option is not selected.
- Enter cellgateway.tar.gz as the deployable package file name and click Update.
- On the Configured Integrations tab, verify that the integration is updated and connected.
Task 3: Enable and test the integration
Enabling and testing the integration involves the following tasks:
To enable the BMC TrueSight Impact Manager cells to propagate events to the CellGateway integration
Before you begin
- Ensure that the TrueSight Impact Manager server and cell are up and running.
- Ensure that the BMC Helix Operations Management service is up and running.
To enable the BMC TrueSight Impact Manager cells to propagate events to the CellGateway integration, do the following steps:
- Log on to the computer where the BMC TrueSight Infrastructure Management Server is installed.
- Navigate to the installationDirectory/server/etc directory.
Create the gateway.bhom file with the following contents:
protocol=EIF cond.new=always cond.mod=always #drop.mod=[] #drop.new=[] #add.mod=[] #add.new=[] slots.new=[mc_ueid,severity,status,repeat_count,mc_priority,mc_object,mc_host,mc_location,mc_host_address,mc_object_class,mc_parameter,mc_parameter_value,mc_parameter_unit,msg] slots.mod=[mc_ueid,severity,status,repeat_count,mc_priority,mc_object,mc_host,mc_location,mc_host_address,mc_object_class,mc_parameter,mc_parameter_value,mc_parameter_unit,msg] #modify.mod=[] #--------------------------------------------------------------- # Format parameters #--------------------------------------------------------------- init.new=|EIF_EIF|$CLASS|EIF_EIF|200 body.new=|EIF_EIF|$VALUE term.new=\n init.mod=|EIF_EIF|$CLASS|EIF_EIF|204 body.mod=|EIF_EIF|$VALUE term.mod=\n #separator=|EIF_EIF| #quoatable= #openquote= #closequote= #escapequote=
Add the entry for the gateway.bhom file to the mcell.dir file.
The following code snippet shows a sample mcell.dir configuration of a cell with the gateway.bhom entry.
Type <Name> <EncryptionKey> <IPAddress>:<Port> gateway.bhom bhom mc <hostNameorIPAddress>:1850 cell <CELL_NAME> mc <hostNameorIPAddress>:1828
- Navigate to the <MCELL_HOME>/etc/<CELL_NAME>/kb/rules directory.
Create the bhom_propagate.mrl file with the following contents:
refine gw_event : EVENT ($EV) where [$EV.status != BLACKOUT] { # Message - Remove tricky chars to allow REST call to BHOM $NL=char(10); $CR=char(13); $EV.msg=strip($EV.msg,7,$CR); $EV.msg=strip($EV.msg,7,$NL); $EV.msg = strreplace($EV.msg,',',' '); $EV.msg = strreplace($EV.msg,'"',''); $EV.msg=substring($EV.msg, 0, 300); # Message - Add default message if empty to allow REST call to BHOM if($EV.msg == '') then { $EV.msg = "default message: " || 'CLASS=' || $EV.CLASS || ' ObjectClass=' || $EV.mc_object_class || ' Object=' || $EV.mc_object; }; } END
- Add the Propagate rule to the file.
The following code snippet shows the contents of the file with the rule added to the end of the file.
refine gw_event : EVENT ($EV) where [$EV.status != BLACKOUT] { # Message - Remove tricky chars to allow REST call to BHOM $NL=char(10); $CR=char(13); $EV.msg=strip($EV.msg,7,$CR); $EV.msg=strip($EV.msg,7,$NL); $EV.msg = strreplace($EV.msg,',',' '); $EV.msg = strreplace($EV.msg,'"',''); $EV.msg=substring($EV.msg, 0, 300); # Message - Add default message if empty to allow REST call to BHOM if($EV.msg == '') then { $EV.msg = "default message: " || 'CLASS=' || $EV.CLASS || ' ObjectClass=' || $EV.mc_object_class || ' Object=' || $EV.mc_object; }; } END # Propagate event to CellGateway propagate bhom_propagate : EVENT($EV) where [ $EV.status == OPEN ] to bhom END
Add the file name (bhom_propagate.mrl) for the new rule to the compiler load list in the .load file, as shown in the following example:
# # File name: .load # Version: 7.4.00 # Copyright 1998-2022 BMC Software, Inc. All Rights Reserved # kbversem kbverssim mc_startup ......... bhom_propagate
Compile and restart the cell by using the following commands:
mccomp -n <CELL_NAME> mcontrol -n <CELL_NAME> restart
To test the connector for messages
Send a test message to your container by running the following command:
curl -X POST -d 'json={"json":"test event"}' http://<host>:<port>/testing.event
Verify the messages in the /logs/fluent.log file.
The following code snippet shows the sample message received by the connector.2021-09-16 18:48:52 +0000 [info]: Heartbeat call sent successfully. No Command to process. 2021-09-16 18:48:56.999026864 +0000 testing.event: {"json":"test event"} 2021-09-16 18:48:57 +0000 [info]: Heartbeat call sent successfully. No Command to process.
To test the CellGateway integration
- Log on to TrueSight Impact Manager.
Send a sample event to the cell by using the following command:
msend -n <CELL_NAME> -a EVENT -r MINOR -m ‘This is a test event’;
Verify the event in the CellGateway log by running the following command:
tail -f /opt/bmc/connectors/CellGateway/logs/fluent.log
- Verify the increased count of events on the CellGateway integration.
From BMC Helix Operations Management, select Monitoring > Events to view the ingested events.
Task 4: Extend the integration
Extending the integration involves the following tasks:
- Enable automatic synching of events and dropping of duplicate events.
- Add more slots.
- Manage event buffers.
To enable automatic synching of events and dropping of duplicate events
Enable automatic synching of events between TrueSight Impact Manager and BMC Helix Operations Management and dropping of the duplicate events by creating the following policies in BMC Helix Operations Management:
- Sync Events policy: This policy synchs events between TrueSight Impact Manager and BMC Helix Operations Management, as follows:
- If an event is closed in TrueSight Impact Manager, it is also closed in BMC Helix Operations Management.
- When a new event is received, the policy looks for a previous event from the same host, with the same Object value. If the severity, priority, or message of the event has changed, same is updated for the existing event in BMC Helix Operations Management and the repeat count for the event is incremented in BMC Helix Operations Management. The new incoming event is dropped in this case.
- Detect Duplicate Events policy: This policy detects the duplicate events and keeps the events updated in BMC Helix Operations Management, as follows:
When a new event is received, the policy looks for a previous event from the same host, with the same Object value, but which is not an OK event. If the incoming new event has the OK status, the old event, if found, is closed. For example, for an OK event, a matching Critical event is closed. If the incoming event is not an OK event, the severity, priority, and message is updated for the old event and repeat count is incremented for the old event. Also. the incoming new event is dropped.
Consider the following while creating these policies:
- New events are ingested into BMC Helix Operations Management with code 200.
- Updated events are ingested into BMC Helix Operations Management with code 204.
- The code is stored in slot, source_code, and the cell mc_ueid is stored in the slot, object_id to be used as identifier for updates.
- Updated events in the cell are automatically ingested into BMC Helix Operations Management in the following slots:
mc_ueid, severity, status, repeat_count, mc_priority, mc_object, mc_host, mc_location, mc_host_address, mc_object_class, mc_parameter, mc_parameter_value, mc_parameter_unit, msg
To create a policy to enable automatic synching of events
- In BMC Helix Operations Management, go to Configuration > Event Policies, and click Create.
Specify a unique name for the policy (for example, Sync Events).
Specify an optional description and precedence number for the policy.
- Define a condition to select events of the class Monitor Event with the source port equal to 204.
The following image illustrates how the event selection criteria should look. - Build the policy workflow by adding actions.
- Add the Lookup action.
- Click Add Configuration and select Advance Enrichment.
- Click Lookup.
- In the Lookup Settings panel, enter Latest equal ID as the label.
- Select the With custom criteria option and add the following condition to the existing criteria:
$OLD.Object ID Equals $NEW.Object ID
The following image illustrates how the event lookup criteria should look. - Click Apply.
- From Add Below, select Update old events.
- Add an If action.
- In the If Settings panel, enter If Status Closed as the label.
- Add the following condition: $New.Status Equals Closed
- Click Apply.
- Select the Then box.
- Add an Enrich action to close the existing events:
- In the Enrichment Settings panel, enter Close Old Events as the label.
- Select $OLD.Status as the slot.
- Select Closed as the slot value.
- Add the Lookup action.
- Click the Else box.
- Add an Enrich action to update the severity of an old event.
- From Add Below, select Enrich.
- In the Enrichment Settings panel, enter Update Severity as the label.
- Select $OLD.Severity as the slot.
- Select $NEW.Severity as the value.
- Click Apply.
- Add an Enrich action to update the priority of an old event.
- From Add Below, select Enrich.
- In the Enrichment Settings panel, enter Update Priority as the label.
- Select $OLD.Priority as the slot.
- Select $NEW.Priority as the value.
- Click Apply.
- Add an Enrich action to update the message of an old event.
- From Add Below, select Enrich.
- In the Enrichment Settings panel, enter Update Message as the label.
- Select $OLD.Message as the slot.
- Select $NEW.Message as the value.
- Click Apply.
- Add an Enrich action to update the repeat count of an old event.
- From Add Below, select Enrich.
- In the Enrichment Settings panel, enter Increase Repeated as the label.
- Select $OLD.Repeated as the slot.
- Click the Function option.
- Select Math as the function.
- Select Plus as the operator.
- Select $OLD.Repeated as number 1.
- Enter 1 as number 2.
- Click Apply.
- Select the End-If box.
- Add a Function to drop new events:
- From Add Below, select Function.
- Add Drop New Events as the label.
- Select DropNewEvent as the function.
- Click Apply and then click Save.
The resulting policy workflow automatically syncs the events between TrueSight Impact Manager and BMC Helix Operations Management as shown in the following image:
To create a policy to enable automatic detection of duplicate events and drop them
- In BMC Helix Operations Management, go to Configuration > Event Policies, and click Create.
Specify a unique name for the policy (for example, Drop Duplicate Events).
Specify an optional description and precedence number for the policy.
- Define a condition to select events of the class Monitor Event with the source port equal to 200.
The following image illustrates how the event selection criteria should look. - Build the policy workflow by adding actions.
- Add the Lookup action.
- Click Add Configuration and select Advance Enrichment.
- Click Lookup.
- In the Lookup Settings panel, enter Detect Duplicate as the label.
- Select the With custom criteria option and add the following conditions to the existing criteria:
$OLD.Object ID Equals $NEW.Object ID
The following image illustrates how the event lookup criteria should look. - Click Apply.
- From Add Below, select Update old events.
- Add an If action.
- In the If Settings panel, enter If Status Closed as the label.
- Add the following condition: $New.Status Equals Closed
- Click Apply.
- Select the Then box.
- Add an Enrich action to close the existing events:
- In the Enrichment Settings panel, enter Close Old Events as the label.
- Select $OLD.Status as the slot.
- Select Closed as the slot value.
- Add the Lookup action.
- Click the Else box.
- Add an Enrich action to update the severity of an old event.
- From Add Below, select Enrich.
- In the Enrichment Settings panel, enter Update Severity as the label.
- Select $OLD.Severity as the slot.
- Select $NEW.Severity as the value.
- Click Apply.
- Add an Enrich action to update the priority of an old event.
- From Add Below, select Enrich.
- In the Enrichment Settings panel, enter Update Priority as the label.
- Select $OLD.Priority as the slot.
- Select $NEW.Priority as the value.
- Click Apply.
- Add an Enrich action to update the message of an old event.
- From Add Below, select Enrich.
- In the Enrichment Settings panel, enter Update Message as the label.
- Select $OLD.Message as the slot.
- Select $NEW.Message as the value.
- Click Apply.
- Add an Enrich action to update the repeat count of an old event.
- From Add Below, select Enrich.
- In the Enrichment Settings panel, enter Increase Repeated as the label.
- Select $OLD.Repeated as the slot.
- Click the Function option.
- Select Math as the function.
- Select Plus as the operator.
- Select $OLD.Repeated as number 1.
- Enter 1 as number 2.
- Click Apply.
- Select the End-If box.
- Add a Function to drop new events:
- From Add Below, select Function.
- Add Drop New Events as the label.
- Select DropNewEvent as the function.
- Click Apply and then click Save.
The resulting policy workflow automatically detects the duplicate events from TrueSight Impact Manager and drops them as shown in the following image:
To extend the integration with additional slots in BMC Helix Operations Management
The CellGateway integration with TrueSight Impact Manager is by default created to map standard slots and classes in the BMC Helix Operations Management event class, Monitor Event.
The Cell event class is mapped to the source_identifier slot to allow source specific event policies in BMC Helix Operations Management or create tags and event groups based on event classes.
Create the new slot, for example, bmc_info, in BMC Helix Operations Management. For instructions to add a slot by using REST API, see Managing events with REST APIs
.
Click here to see the sample body request with the new slort.{ "attributes":[ { "name": "bmc_info", "dataType": "STRING", "allFacet": [ { "name": "read_only", "value": "false" } ], "enumElements": [], "enum": false } ] }
Add the new slots to the Cell Gateway file.
slots.new=[mc_ueid,severity,status,repeat_count,mc_priority,mc_object,mc_host,mc_location,mc_host_address,mc_object_class,mc_parameter,mc_parameter_value,mc_parameter_unit,msg,bmc_info] slots.mod=[mc_ueid,severity,status,repeat_count,mc_priority,mc_object,mc_host,mc_location,mc_host_address,mc_object_class,mc_parameter,mc_parameter_value,mc_parameter_unit,msg,bmc_info]
Add the new slot to integration configuration file, cellgateway_event_pipeline.conf.
<filter CellGateway_GENERICEVENTS> @type parser key_name message <parse> @type csv delimiter "|EIF_EIF|" parser_type fast keys cell_garbage,cell_class,cell_action,cell_ueid,cell_severity,cell_status,cell_repeat_count,cell_priority,cell_object,cell_host,cell_location,cell_host_address,cell_object_class,cell_parameter,cell_parameter_value,cell_parameter_unit,cell_msg,cell_info </parse> </filter>
Add the new slot to the integration mapping file, cellgateway_mapping.json.
{ "EventMappingDetails": [ { "inputkey": "MonitorEvent", "outputkey": "class", "type": "constant" }, { "inputkey": "cell_action", "outputkey": "source_port", "type": "assignment" }, { "inputkey": "cell_ueid", "outputkey": "object_id", "type": "assignment" }, { "inputkey": "cell_severity", "outputkey": "severity", "type": "assignment" }, { "inputkey": "cell_status", "outputkey": "status", "type": "assignment" }, { "inputkey": "cell_repeat_count", "outputkey": "_repeat_count", "type": "assignment" }, { "inputkey": "cell_priority", "outputkey": "priority", "type": "assignment" }, { "inputkey": "cell_object", "outputkey": "object", "type": "assignment" }, { "inputkey": "cell_host", "outputkey": "source_hostname", "type": "assignment" }, { "inputkey": "cell_location", "outputkey": "location", "type": "assignment" }, { "inputkey": "cell_host_address", "outputkey": "source_address", "type": "assignment" }, { "inputkey": "cell_object_class", "outputkey": "object_class", "type": "assignment" }, { "inputkey": "cell_class", "outputkey": "source_identifier", "type": "assignment" }, { "inputkey": "cell_parameter", "outputkey": "metric_name", "type": "assignment" }, { "inputkey": "cell_parameter_value", "outputkey": "metric_value", "type": "assignment" }, { "inputkey": "cell_parameter_unit", "outputkey": "metric_unit", "type": "assignment" }, { "inputkey": "cell_msg", "outputkey": "msg", "type": "assignment" }, { "inputkey": "cell_info", "outputkey": "bmc_info", "type": "assignment" }] }
Compile and restart the cell by using the following command:
mccomp -n <CELL_NAME> mcontrol -n <CELL_NAME> restart
Restart the integration by running the following commands:
cd /opt/bmc/connectors/CellGateway sh ./restart.sh
To manage event buffers
Event buffering is possible from:
- TrueSight Impact Manager cell to the CellGateway integration by using propagate rules. This type of buffering is enabled by default.
- CellGateway integration to TrueSight Impact Manager. This type of buffering is disabled by default.
Buffering from BMC TrueSight Impact Manager cells to the CellGateway integration
When the TrueSight Impact Manager cell is started, the event buffers are set to a minimum workable size. The default size is 5000 events for each destination buffer and 5000 requests for the propagation buffer.
If the cell cannot propagate events, it stores the events to be propagated to the destination buffers and the requests for the propagation of those events in the propagation buffer. When the buffers become full, the cell automatically expands the buffer size by a specified percentage (10 percent, by default), unless the buffer has exceeded a maximum size. By default, the maximum buffer size is unlimited, although the practical limit of the buffer size is the amount of available memory. After the maximum defined buffer size is reached, additional requests for expansion fail.
When an automatic expansion of a buffer occurs, an MC_CELL_RESOURCE_EXPANSION event is generated. An expanded buffer contains free space after propagation has resumed. To free memory resources, the buffer is reduced when it contains more than the specified amount of free space. Reduction leaves enough free space to avoid the need for an immediate expansion. The buffer is never reduced below the specified minimum size. When the buffer is reduced, an MC_CELL_RESOURCE_REDUCTION event is generated.
You can control the buffer size by configuring various parameters in the mcell.conf file as listed in the following table:
Parameter | Type | Description |
---|---|---|
DestinationBufferBaseSize | Number | The initial number of messages or events retained in the buffer. |
DestinationBufferExpandPercentage | Number | Percentage of the actual buffer size that the buffer expands when events continue to be propagated after the buffer is full. |
DestinationBufferSizeLimit | Number | Maximum allowed buffer size. The default value of 0 means the buffer size is unlimited. In practice, the size is limited to 2^32-1, or to the available amount of memory. If the limit is set to a value lower than DestinationBufferBaseSize, the buffer does not expand beyond DestinationBufferBaseSize. |
DestinationBufferReducePercentage | Number | Minimum percentage of free buffer size required to perform a reduction. |
DestinationBufferKeepSent | Number | Amount of time, in seconds, to keep the sent events buffered while waiting for an answer. |
DestinationBufferKeepWait | Number | Amount of time, in seconds, for which events are retained in the buffer until they can be sent. After the specified time elapses, the retained events are removed from the buffer. |
DestinationBufferReconnectInterval | Number | Time interval, in seconds, during which the cell attempts to reconnect to a destination if the original connection fails. The cell continues to reestablish a connection as long as there are events in the buffer. |
DestinationBufferResendCount | Number | Number of times to resend the unanswered events. |
PropagateBufferBaseSize | Number | Number of requests for propagation to retain in the propagation buffer. Such a request corresponds to executing a Propagate rule. There is one propagate buffer per cell with as many places for requests as set by the parameter. |
PropagateBufferExpandPercentage | Number | Percentage of the actual buffer size that the buffer expands when events continue to be propagated after the buffer is full. |
PropagateBufferSizeLimit | Number | Maximum allowed buffer size. The default value of 0 means the buffer size is unlimited. In practice, the size is limited to 2^32-1, or to the available amount of memory. If the limit is set to a value lower than PropagateBufferBaseSize, the buffer does not expand beyond PropagateBufferBaseSize. |
PropagateBufferReducePercentage | Number | Minimum percentage of free buffer size required to perform a reduction. |
PropagateConfigFileName | Path | Name of the propagation configuration file. |
Buffering from the CellGateway integration to BMC Helix Operations Management
The buffering from the CellGateway integration to BMC Helix Operations Management is disabled by default. You can use buffered parameter available in the bmc-ade-http plug-in to enable or disable the buffeting. For more information about the plug-in, see bmc-ade-http-pull plug-in.
Comments
Log in or register to comment.