---
schema_version: "1"
id: a3a4850d51b721e5cda71c8106e47f16237b0c141e180db563703dc5967ac0de
title: Runtime Manager Agent Notifications
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/runtime-manager/runtime-manager-agent-notifications.md
canonical_url: https://docs.mulesoft.com/runtime-manager/runtime-manager-agent-notifications
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 141f80d4bbf313fa9d3d2e754fa7869bc9fa8feb5b0dcd9ec877927e98825008
description: MuleSoft Documentation Site
latest: true
---
---
product: Runtime Manager
keywords: agent, mule, esb, servers, monitor, notifications, external systems, third party, get status, metrics
---

# Runtime Manager Agent Notifications

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

[![logo hybrid active](/mulesoft/current/en-us/_/img/icons/hybrid-cloud.svg "Hybrid")Hybrid](deployment-strategies#hybrid-deployments)[ ![logo server active](/mulesoft/current/en-us/_/img/icons/server-cloud.svg "Anypoint Platform PCE")Private Cloud Edition](deployment-strategies#anypoint-platform-private-cloud-edition)

The Anypoint Runtime Manager agent publishes notifications, in JSON format, about events that occur
in the Mule instance. This enables you to implement a system for receiving and handling
notifications. Notifications are sent over both the REST and WebSocket transports. For more
information about transports, see
[Runtime Manager Agent Architecture](https://docs.mulesoft.com/runtime-manager/runtime-manager-agent-architecture).

## Configure the Agent Notifications Callback URL

To forward Runtime Manager agent notifications to a URL over the REST transport, configure a
`callback` URL in the `mule-agent.yml` file.

To configure the `callback` URL:

1.  Add the `callback` URL to the `mule-agent.yml` file:

    ```yaml
    transports:
      rest.agent.transport:
        enabled: true
        callback:
          url: http://localhost:8080/
        port: 8888
    ```

    The values for `port` and `url` depend on the external server that will receive the
    notifications.

    The configured URL must end with a trailing slash (`/`) because the agent appends the path to
    the URL.

2.  Restart Mule runtime engine.

## Application Deployment Notifications

The Runtime Manager agent sends a notification every time there is a change in state during an
application deployment or undeployment. Notifications are sent via a `PUT` request to the
`applications/<appname>/deployment` path:

PUT <callback URL>/applications/<application name>/deployment HTTP/1.1

### Example Notification

```json
{
  "application": {
    "name": "applicationName",
    "domain": "domainName",
    "state": "STARTED"
  },
  "status": "DEPLOYED",
  "message": "Application successfully deployed."
}
```

### Notification Fields

Fields in each application deployment notification:

<table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><p><code>application</code></p></td><td><div><div><p>Contains the following itemized information about the application:</p></div><div><ul><li><p>Application name</p></li><li><p>Name of the domain to which the application is deployed</p></li><li><p>Current state of the application</p></li></ul></div><div><p>For a list of all possible application states, see the <a href="#application-states-and-deployment-status">Application States and Deployment Status</a> section.</p></div></div></td></tr><tr><td><p><code>status</code></p></td><td><div><div><p>Current status of the deployment. After a deployment operation is completed, the message remains as <code>DEPLOYED</code>; after an undeployment operation the message remains as <code>UNDEPLOYED</code>.</p></div><div><p>For a list of all possible status messages, see the <a href="#application-states-and-deployment-status">Application States and Deployment Status</a> section.</p></div></div></td></tr><tr><td><p><code>message</code></p></td><td><p>An informational message about the current deployment stage. In case of a deployment failure, information about the reason for the failure is included in the message.</p></td></tr></tbody></table>

## Domain Deployment Notifications

The Runtime Manager agent sends a notification every time there is a change in state during a domain
deployment or undeployment.

Notifications are sent via a PUT request to the `domains/<domainname>/deployment` path:

PUT <callback URL>/domains/<domain name>/deployment HTTP/1.1

### Example Notification

```json
"domain": {
    "name": "domainName",
    "applications": [
      {
        "name": "application1",
        "domain": "domainName",
        "state": "STARTED"
      },
      {
        "name": "application2",
        "domain": "domainName",
        "state": "STOPPED"
      },
    ]
  },
  "status": "DEPLOYED",
  "message": "Domain successfully deployed."
}
```

### Notification Fields

Fields in each domain deployment notification:

<table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><p><code>domain</code></p></td><td><div><div><p>Contains the following itemized information about the domain:</p></div><div><ul><li><p>Domain name</p></li><li><p>List of applications deployed to the domain, specifying:</p><div><ul><li><p>Application name</p></li><li><p>Domain name</p></li><li><p>Application status</p></li></ul></div></li></ul></div></div></td></tr><tr><td><p><code>status</code></p></td><td><div><div><p>Current status of the deployment. After a deployment operation is completed, the message remains as <code>DEPLOYED</code>; after an undeployment operation the message remains as <code>UNDEPLOYED</code>.</p></div><div><p>For a list of all possible status messages, see the <a href="#application-states-and-deployment-status">Application States and Deployment Status</a> section.</p></div></div></td></tr><tr><td><p><code>message</code></p></td><td><p>An informational message about the current deployment stage. In case of a deployment failure, information about the reason for the failure is included in the message.</p></td></tr></tbody></table>

## Keep-Alive Notifications

The Runtime Manager agent sends a periodic keep-alive notification to verify that the Mule instance
is still running. The notification is sent via a `POST` request with an empty body to the
`keepAlive` path:

POST <callback URL>/keepAlive HTTP/1.1

## Application States and Deployment Status

### Application States

Application states represent the different stages in the lifecycle of a Mule application.

For the list of application states, see
[Application Status States](https://docs.mulesoft.com/runtime-manager/managing-deployed-applications#application_status_states).

### Deployment Status

Deployment statuses represent the different steps for successful deployment or undeployment of an
application or a domain.

For the list of valid deployment statuses, see
[Application Deployment States](https://docs.mulesoft.com/runtime-manager/managing-deployed-applications#application_deploy_states).

## See Also

- [Update Agent Configuration in mule-agent.yml](https://docs.mulesoft.com/runtime-manager/rtm-agent-config-yaml)
