Activating monitoring

Use the mqsichangeflowmonitoring command to activate monitoring after you configure monitoring event sources.

Before you begin

Configure monitoring event sources by using either monitoring properties or a monitoring profile:

About this task

If monitoring is activated for a message flow, and monitoring properties or a monitoring profile are not configured for the flow, transaction events are emitted. You must ensure that event publication for monitoring messages is enabled and is correctly configured. For more information, see Configuring the publication of event messages.

You can start or stop monitoring and specify the required event format by setting properties in the configuration file for your integration server (server.conf.yaml.
Monitoring:
  MessageFlow:
    #publicationOn: inactive           # choose 1 of : active|inactive, default inactive
                                       # Ensure Events.BusinessEvents.MQ|MQTT is set
    #eventFormat: MonitoringEventV2    # choose 1 of : MonitoringEventV2|WMB
Changes that you make to the properties in the .conf.yaml file take effect when the integration server is restarted, and apply to every flow in the integration server.

When you configure monitoring for your flows, you can use the mqsichangeflowmonitoring command to activate or deactivate monitoring without restarting the integration server. The options that you set with this command remain in effect until you run the command again or restart the integration server. When you restart the integration server, the settings that are specified in the server.conf.yaml file take effect.

To activate monitoring, specify the -c active parameter on the mqsichangeflowmonitoring command. To deactivate monitoring, specify -c inactive. You can activate or deactivate monitoring for all message flows in all integration servers. Alternatively, you can specify the integration servers, applications, libraries, or message flows for which monitoring is to be turned on or off.

For more information, see the mqsichangeflowmonitoring command.

You can also use a monitoring profile to configure your message flows to emit monitoring events. When you create a monitoring profile, you deploy it to a policy project and then activate it on a specific message flow, application, or integration server. Activate the monitoring profile by using either the mqsichangeflowmonitoring command or the administration REST API. Alternatively, you can specify a monitoring profile as a BAR file override, as described in Configurable properties in a BAR file. You can override a deployed monitoring profile by putting an updated .monprofile.xml file in the integration server's overrides directory, as described in Order of precedence for overrides.

You can check the monitoring options that are set for a message flow, application, or library, by using the mqsireportflowmonitoring command. For more information, see mqsireportflowmonitoring command.

Procedure

Configure monitoring options for a message flow by setting properties in the Monitoring section of the configuration file for your integration node or server (node.conf.yaml or server.conf.yaml):

  1. Open the appropriate node.conf.yaml or server.conf.yaml configuration file by using a YAML editor.

    If you do not have access to a YAML editor, you can edit the file by using a plain text editor. However, you must ensure that you do not include any tab characters, which are invalid in YAML and would cause your configuration to fail. If you are using a plain text editor, ensure that you use a YAML validation tool to validate the content of your file.

  2. To configure message flow monitoring options, set the following properties in the configuration file:
    1. Enable message flow monitoring by setting the publicationOn property to active. By default, message flow monitoring is turned off.
    2. Specify the required format of monitoring events by setting the eventFormat property.
      Valid options are MonitoringEventV2 and WMB

    MonitoringEventV2 is the default format that is used by default in IBM® App Connect Enterprise Version 11.0. It provides some additional data that relates to Shared Libraries and the CCSID of encoded message bodies.

    Specify WMB if you want the monitoring events to be emitted in the same format as used in prior versions;WebSphere® Message Broker Version 8.0.0.0, IBM Integration Bus Version 9.0, and IBM Integration Bus Version 10.0 .

    For more information, see The monitoring event.

  3. Save the file and restart the integration server for the changes to take effect.
    Changes that you make to the properties in .conf.yaml files take effect when the integration server is restarted. For more information about how to start an integration server, see Starting an integration server.

When monitoring is configured, you can use the mqsichangeflowmonitoring command to dynamically start or stop message flow monitoring, without restarting the integration server:

  1. Optional: To activate monitoring, use the -c active parameter. You can activate monitoring for all message flows in all integration servers, or you can specify the integration servers, applications, libraries, message flows for which monitoring is to be activated.
    For example,
    To turn on monitoring for all message flows in library lib1 in application app1, on the specified integration server, use the following command:
    mqsichangeflowmonitoring -c active -i localhost -p 7600 -k app1 -y lib1 -f "*"

    By default, the settings that you specify with this command persist when the integration server or node is restarted and when the message flow is redeployed. If you do not want the settings to persist, you can specify the --non-persist parameter. The --non-persist parameter causes the settings to remain in effect only until a restart or redeploy, at which point the settings that are specified in the server.conf.yaml or node.conf.yaml configuration file take effect.

  2. Optional: To deactivate monitoring, use the -c inactive parameter. You can deactivate monitoring for all message flows in all integration servers, or you can specify the integration servers, applications, libraries, message flows for which monitoring is to be turned off.
    For example,
    To turn off monitoring for message flow flow3 in application app0, which is on integration server server0 on integration node broker1, use the following command:
    mqsichangeflowmonitoring -c inactive broker1 -e server0 -k app0 -f flow3