Activating monitoring by using the administration REST API

You can use the IBM® App Connect Enterprise administration REST API to activate the monitoring of applications, message flows, and integration solutions that have been developed by using the REST API or integration services.

Before you begin

Read the following topics:

About this task

The examples in this topic are based on the following resources:
  • An application: MonitoringApp
  • Message flows packaged with the application: MonitoringAppFlow1 and MonitoringAppFlow2
  • A library associated with the application: Monitoring Lib
  • A message flow in the library: MonitoringLibFlow
as shown in this example Integration Explorer pane excerpt:
The diagram shows a deployment topography that includes an application, 2 message flows that are packaged with the application, a library that is associated with the application, and a message flow that is in the library

Activating monitoring on an application

About this task

You can activate monitoring on an application and the message flows that are packaged in it, or you can activate monitoring on a single message flow:

Procedure

  • Activate monitoring on an application and its message flows:
    1. For an independent integration server:
      POST http://hostname:port/apiv2/applications/applicationName/start-monitoring

      For example, to activate monitoring on the application MonitoringApp, use the following curl command:

      curl -X POST http://hostname:port/apiv2/applications/MonitoringApp/start-monitoring
      
    2. For an integration server that is managed by an integration node:
      POST http://hostname:port/apiv2/servers/integrationServerName/applications/applicationName/start-monitoring

      For example, to activate monitoring on the application MonitoringApp on integration server ACESERV1, use the following curl command:

      curl -X POST http://hostname:port/apiv2/servers/ACESERV1/applications/MonitoringApp/start-monitoring

      If the command is successful, an HTTP status code 200 is returned.

  • Activate monitoring on a single message flow:
    1. For an independent integration server:
      POST http://hostname:port/apiv2/applications/applicationName/messageflows/messageflowName/start-monitoring

      For example, to activate monitoring on the message flow MonitoringAppFlow1, use the following curl command:

      curl -X POST http://hostname:port/apiv2/applications/MonitoringApp/messageflows/MonitoringAppFlow1/start-monitoring

      If the message flow is in a library:

      POST http://hostname:port/apiv2/applications/applicationName/libraries/libraryName/messageflows/messageflowName/start-monitoring

      For example, to activate monitoring on the message flow MonitoringLibFlow, use the following curl command:

      curl -X POST http://hostname:port/apiv2/applications/MonitoringApp/libraries/MonitoringLib/messageflows/MonitoringLibFlow/start-monitoring
    2. For an integration server that is managed by an integration node:
      POST http://hostname:port/apiv2/servers/integrationServerName/applications/applicationName/messageflows/messageflowName/start-monitoring

      For example, to activate monitoring on the message flow MonitoringAppFlow1 that is deployed on integration server ACESERV1, use the following curl command:

      curl -X POST http://hostname:port/apiv2/servers/ACESERV1/applications/MonitoringApp/messageflows/MonitoringAppFlow1/start-monitoring

      If the message flow is in a library:

      POST http://hostname:port/apiv2/servers/integrationServerName/applications/applicationName/libraries/libraryName/messageflows/messageflowName/start-monitoring

      For example, to activate monitoring on the message flow MonitoringLibFlow that is deployed on integration server ACESERV1, use the following curl command:

      curl -X POST http://hostname:port/apiv2/servers/ACESERV1/applications/MonitoringApp/libraries/MonitoringLib/messageflows/MonitoringLibFlow/start-monitoring

      If the command is successful, an HTTP status code 200 is returned.

What to do next

You can use the mqsireportflowmonitoring command to verify the monitoring status of the application and message flows.

Activating monitoring on a REST API integration solution

About this task

You can activate monitoring on an integration solution, including the message that are packaged in it, that has been developed by using a REST API or you can activate monitoring on a single message flow in such an integration solution:

Procedure

  • Activate monitoring on a REST API integration solution and its message flows:
    1. For an independent integration server:
      POST http://hostname:port/apiv2/rest-apis/rest-apiName/start-monitoring
    2. For an integration server that is managed by an integration node:
      POST http://hostname:port/apiv2/servers/integrationServerName/rest-apis/rest-apiName/start-monitoring

      If the command is successful, an HTTP status code 200 is returned.

  • Activate monitoring on a single message flow:
    1. For an independent integration server:
      POST http://hostname:port/apiv2/rest-apis/rest-apiName/messageflows/messageflowName/start-monitoring

      If the message flow is in a library:

      POST http://hostname:port/apiv2/rest-apis/rest-apiName/libraries/libraryName/messageflows/messageflowName/start-monitoring
    2. For an integration server that is managed by an integration node:
      POST http://hostname:port/apiv2/servers/integrationServerName/rest-apis/rest-apiName/messageflows/messageflowName/start-monitoring

      If the message flow is in a library:

      POST http://hostname:port/apiv2/servers/integrationServerName/rest-apis/rest-apiName/libraries/libraryName/messageflows/messageflowName/start-monitoring

      If the command is successful, an HTTP status code 200 is returned.

What to do next

You can use the mqsireportflowmonitoring command to verify the monitoring status of the application and message flows.

Activating monitoring on an integration services integration solution

About this task

You can activate monitoring on an integration solution, including the message that are packaged in it, that has been developed by using integration services or you can activate monitoring on a single message flow in such an integration solution:

Procedure

  • Activate monitoring on an integration services integration solution and its message flows:
    1. For an independent integration server:
      POST http://hostname:port/apiv2/services/integrationServiceName/start-monitoring
      
    2. For an integration server that is managed by an integration node:
      POST http://hostname:port/apiv2/servers/integrationServerName/services/integrationServiceName/start-monitoring

      If the command is successful, an HTTP status code 200 is returned.

  • Activate monitoring on a single message flow:
    1. For an independent integration server:
      POST http://hostname:port/apiv2/services/intergrationServiceName/messageflows/messageflowName/start-monitoring

      If the message flow is in a library:

      POST http://hostname:port/apiv2/services/intergrationServiceName/libraries/libraryName/messageflows/messageflowName/start-monitoring
    2. For an integration server that is managed by an integration node:
      POST http://hostname:port/apiv2/servers/integrationServerName/services/intergationServiceName/messageflows/messageflowName/start-monitoring

      If the message flow is in a library:

      POST http://hostname:port/apiv2/servers/integrationServerName/services/intergationServiceName/libraries/libraryName/messageflows/messageflowName/start-monitoring

      If the command is successful, an HTTP status code 200 is returned.

What to do next

You can use the mqsireportflowmonitoring command to verify the monitoring status of the integration solution and message flows.

Activating monitoring on all integration solutions

About this task

You can use a single command in the administration REST API to activate monitoring on all integration solutions and message flows that have been developed in applications, including those that have been developed by using a REST API or integrations services, and all those in libraries.

Procedure

Activate monitoring on all integration solutions and their message flows:
  1. For an independent integration server:
    POST http://hostname:port/apiv2/monitoring/flow-monitoring/start-monitoring
  2. For an integration server that is managed by an integration node:
    POST http://hostname:port/apiv2 servers/integrationServerName/monitoring/flow-monitoring/start-monitoring

    If the command is successful, an HTTP status code 200 is returned.

What to do next

You can use the mqsireportflowmonitoring command to verify the monitoring status of the integration solutions and message flows.