Contact Us 1-800-596-4880

Update Agent Configuration in mule-agent.yml

When you run amc_setup with parameters to install the Runtime Manager agent, the agent configuration is written to the $MULE_HOME/conf/mule-agent.yml file. At startup, the agent reads its configuration from this file.

You can further configure or change the agent configuration by manually adding or editing parameters in the mule-agent.yml file.

You can configure some agent components during runtime using the agent API.

mule-agent.yml File Structure

The mule-agent.yml file has the following structure:

  1. Component types

    Transports, services, internal handlers, and external handlers

    1. Component name

      For example, mule.agent.jmx.publisher.service

      1. Component configuration

        A component can have complex object configurations, including more than one level of recursion.

Here is an example mule-agent.yml file:

transports:
  rest.agent.transport:
    enabled: false
  websocket.transport:
    enabled: true
    consoleUri: wss://mule-manager.anypoint.mulesoft.com:443/mule
    handshake:
      enabled: true
      body: null
globalConfiguration:
  security:
    keyStorePassword: keyStorePass
    keyStoreAlias: agent
    keyStoreAliasPassword: keyStoreAliasPass
  authenticationProxy:
    endpoint: https://arm-auth-proxy.cloudhub.io
internalHandlers:
  mule.agent.tracking.handler.analytics:
    enabled: false
services:
  mule.agent.logging.service:
    applicationLogLevels:
    - artifactName: application-1
      scopeLoggingConfigurations: []
    - artifactName: application-2
      scopeLoggingConfigurations: []
    enabled: true

Enable Both REST Agent Transport and WebSocket Transport

When you register Mule runtime engine with Runtime Manager, the generated mule-agent.yml file disables the REST agent transport and replaces any existing configuration.

Conversely, if you run ./amc_setup -I, you enable the REST agent transport and disable the WebSocket transport (it replaces any existing WebSocket transport configuration used to connect to Runtime Manager).

To run both transports, modify the mule-agent.yml file with the following values:

transports:
  websocket.transport:
    consoleUri: wss://mule-manager.anypoint.mulesoft.com:443/mule
    security:
      keyStorePassword: _password_
      keyStoreAlias: agent
      keyStoreAliasPassword: _password_
      handshake:
        enabled: true
        body:
          agentVersion: 1.1.0
          muleVersion: 3.7.0
          gatewayVersion: 2.0.2
  rest.agent.transport:
    port: 8888

services:
  mule.agent.jmx.publisher.service:
    enabled: true
    frequency: 15
    frequencyTimeUnit: MINUTES

Send Data to External Analytics Tools

If you want to use the Runtime Manager agent to send data from Runtime Manager to Splunk, an ELK stack, or other external software, see Export Data to External Analytics Tools.

JMX Monitoring Publication Services

MuleSoft provides several OpenSource JMX monitoring publishing modules for Cloudwatch, Graphite, Nagios, and Zabbix:

  • Cloudwatch publishers enable users to send JMX metrics to Amazon Cloudwatch.

  • Graphite provides Graphite JMX metrics integration.

  • Nagios provides integration with Nagios.

    This module is included in Mule runtime engine.

  • Zabbix sends metrics to Zabbix instances.

For information, see JMX.

Configure the Log Location

You can configure the agent to log its state in a different location than the default mule_agent.log file. For information, see Configuring Logging.

This option is supported only in the Runtime Manager agent 1.5.2 or later.

Configure a Callback URL

If you want to forward Runtime Manager agent notifications to an external or internal URL, configure a callback URL for the REST agent transport in the mule-agent.yml file.