Publishing admin logs over MQTT and IBM MQ

You can publish admin logs over the MQ Telemetry Transport (MQTT) messaging and IBM® MQ by configuring the node.conf.yaml or server.conf.yaml file to enable publishing.

Before you begin

Read the information about admin logs and MQTT in IBM App Connect Enterprise logs and Using MQTT with IBM App Connect Enterprise.

About this task

The information that is published over MQTT and IBM MQ is identical to the information in the admin log files. However, the process differs slightly depending on whether you publish from an independent integration server or an integration node.
  • Publishing from an independent integration server:
    • You can publish from an independent integration server by updating the server.conf.yaml file.
    • You must specify an MQTT server to publish over MQTT.
    • If you do not specify an MQEndpoint policy, either the default queue manager or the remote default queue manager is used for publishing.
  • Publishing from an integration node:
    • You can publish from an integration node by updating the node.conf.yaml file.
    • You do not have to specify an IBM MQ policy if the integration node has a specified default queue manager.
    • You do not have to specify an MQTT policy. An integration node publishes to the built-in MQTT pub/sub broker, which is available by default when the integration node is started.

Procedure

  1. Use a YAML editor to open the node.conf.yaml file for the integration node that you want to modify, or the server.conf.yaml file for the integration server that you want got modify.

    You can edit the file by using the built-in YAML editor that is provided in the IBM App Connect Enterprise Toolkit, either by double-clicking the file in the Application Development view or by right-clicking the file and selecting Open with > YAML editor. If you choose to edit the file by using a plain text editor, ensure that you do not include any tab characters (which are not valid in YAML) and use a YAML validation tool to validate the contents of your file.

    For more information about working with YAML, see http://www.yaml.org/start.html.

  2. Modify the properties that you want to change:
    1. If you want to publish the admin log over MQTT, go to the MQTT section of the Admin Events section, uncomment the property enabled, and set the value to true.
      
      Events:
        AdminEvents:   #AdminLog like events
          MQTT:
            enabled: true    # Set true or false, default false
            #policy: ''         # Specify a {policy project}:policy if not using  'default MQTTServer'
            #publishRetryInterval: 0  # Set the retry interval (in milliseconds), to pause all publications and retry, when publication failures are causing serious delay to the transaction.
          MQ:
            enabled: true    # Set true or false, default false
            #policy: ''    # Specify a {policy project}:policy if not using  'defaultQueueManager'
            #publishRetryInterval: 0  # Set the retry interval (in milliseconds), to pause all publications and retry, when publication failures are causing serious delay to the transaction.
      
    2. If you want to publish the admin log over MQ, go to the MQ section of the Admin Events section, uncomment the property enabled, and set the value to true.
      
      Events:
        AdminEvents:   #AdminLog like events
          MQTT:
            enabled: true    # Set true or false, default false
            #policy: ''         # Specify a {policy project}:policy if not using  'default MQTTServer'
            #publishRetryInterval: 0  # Set the retry interval (in milliseconds), to pause all publications and retry, when publication failures are causing serious delay to the transaction.
          MQ:
            enabled: true    # Set true or false, default false
            #policy: ''    # Specify a {policy project}:policy if not using  'defaultQueueManager'
            #publishRetryInterval: 0  # Set the retry interval (in milliseconds), to pause all publications and retry, when publication failures are causing serious delay to the transaction.
      
  3. Optional: Configure an MQTT or MQ policy to publish to a non-default MQTT server or queue manager by completing the following steps:
    1. Create an MQTT publish policy or an MQEndpoint policy in the IBM App Connect Enterprise Toolkit. For more information, see the following topics:
    2. Copy the policy project to the node-level policies directory. For example:/var/mqsi/components/<nodeName>/policies.
      For example, if you have an integration node that is called eventLogPublishNode, a policy project that is called DefaultPolicies, and an MQEndpoint policy that is called MyMQEP:
      /var/mqsi/components/eventLogPublishNode/policies/DefaultPolicies/MyMQEP.policyxml
    3. Configure the policy property in the node.conf.yaml file to point at the relevant policy. For example:
      
      MQ:
            enabled: true    # Set true or false, default false
            policy: '{DefaultPolicies}:MyMQEP'    # Specify a {policy project}:policy if not using  'defaultQueueManager'
            #publishRetryInterval: 0  # Set the retry interval (in milliseconds), to pause all publications and retry, when publication failures are causing serious delay to the transaction.
      
  4. Subscribe to the relevant topics for MQTT and IBM MQ:
    1. The relevant topics for MQTT are in the form IBM/IntegrationBus/<nodeName>/AdminLog/JSON/<serverName>. For example:
      IBM/IntegrationBus/eventLogPublishNode/AdminLog/JSON
      IBM/IntegrationBus/eventLogPublishNode/AdminLog/JSON/server
    2. The relevant topics for MQ are in the form $SYS/Broker/<nodeName>/AdminLog/JSON/<serverName>. For example:
      $SYS/Broker/eventLogPublishNode/AdminLog/JSON
      $SYS/Broker/eventLogPublishNode/AdminLog/JSON/server1
      IBM/IntegrationBus/eventLogPublishNode/AdminLog/JSON/server
    • Events are either published from the node to the node level topic or from the server to the server level topic.
    • When you publish from an independent integration server, the node name part of the topic hierarchy uses the constant integration_server.

What to do next

Complete some administration actions and observe the published events. For example, create an integration server as described in Creating an integration server, or start or stop a deployed resource as described in Starting or stopping deployed resources.
For more information, see Administering IBM App Connect Enterprise.
For more information about viewing published events, see Viewing administration activity in the admin log.