---
title: Monitor deployments (Java agent)
source: https://docs.newrelic.com/docs/apm/agents/java-agent/instrumentation/monitor-deployments-java-agent
---

> #### ⚠️ IMPORTANT
>
> This feature has been deprecated and will be removed in the next major agent release.

New Relic allows you to send information about application deployments from the command line. Then, you can view deployment information on the [**Deployments** page](https://docs.newrelic.com/docs/apm/applications-menu/events/deployments-page) in the UI: Go to **[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > APM & services > Applications > (select an app) > Events > Deployments**.

## Installation [#Installation]

Part of the [installation](https://docs.newrelic.com/docs/agents/java-agent/installation/java-agent-manual-installation) process involves changing the [`app_name`](https://docs.newrelic.com/docs/agents/java-agent/configuration/java-agent-configuration-config-file#cfg-app_name) in your `newrelic.yml` file to a meaningful name. When you run the deployment upload script, it will use the app name to associate all of the instances of the app with the deployment. Each time you run the script, it will report a new deployment to New Relic.

For example, if you set the deployment marker and ran the script to push 100 instances of the app, the **Deployments** page will show one deployment for the 100 instances. If you ran the script again, it would show another deployment.

As part of the installation process, after changing the [`app_name`](https://docs.newrelic.com/docs/agents/java-agent/configuration/java-agent-configuration-config-file#cfg-app_name), add this entry to `newrelic.yml` in the `common` section:

```yml
api_host: rpm.newrelic.com
```

Customers connecting to the EU region data center will need to use the following entry instead:

```yml
api_host: rpm.eu.newrelic.com
```

## Command line [#Manual]

To send deployment information to New Relic from the Java agent `jar`, execute the following command from the command line:

```bash
java -jar newrelic.jar deployment DEPLOYMENT_OPTIONS
```

You can include these optional values with the deployment command:

| Deployment option    | Description                                                                                                                                                                                                 |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--appname=NAME`     | Set the application name. Defaults to [`app_name`](https://docs.newrelic.com/docs/agents/java-agent/configuration/java-agent-configuration-config-file#cfg-app_name) setting from `newrelic.yml`.           |
| `--environment=NAME` | Override the [`NEW_RELIC_ENVIRONMENT`](https://docs.newrelic.com/docs/agents/java-agent/configuration/java-agent-configuration-config-file#newrelic-environment) or `newrelic.environment` system property. |
| `--user=USER`        | Specify the user who is deploying the change.                                                                                                                                                               |
| `--revision=REV`     | Specify the revision being deployed.                                                                                                                                                                        |
| `--changes`          | Read in a change log from the standard input. For example, you can pipe the change log: ````bash echo "get SHA-1 34837888734" | java -jar newrelic.jar deployment DEPLOYMENT_OPTIONS --changes ```  ````    |

## Proxy configurations [#proxy]

The Java agent does not pick up proxy configurations from the `newrelic.yml` file. Recommendation: If you use a proxy in your application, use either of these options to record deployments:

-   Manually pass the proxy configuration in the Java command.
-   Use the [New Relic REST API v2](https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/recording-deployments).

## REST API [#Other]

In addition to using the command line, you can [record deployments with the New Relic REST API v2](https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/recording-deployments).
