Setting up deployment notifications

Use agent-specific procedures or New Relic's REST API to set up deployment information. Once you set up notifications, view deployment details from your app's Deployments dashboard.

Agent procedures

To record deployments, follow the procedure appropriate for your New Relic agent:

API procedures

You can also record deployments by using the New Relic REST API. For procedures and an example of how to use the API:

  1. From the New Relic menu bar, select APM > (selected app) > Events > Deployments.
  2. Select Show instructions.

    icon-show-instructions.png

New Relic's user interface then shows procedures for recording deployments and troubleshooting tips.

To return to the deployments list, select Back to deployments list.

Examples

Here is an example of using curl to record deployments via the API with your API key and application ID:

  curl -H "x-api-key:REPLACE_WITH_YOUR_API_KEY" -d "deployment[app_name]=REPLACE_WITH_YOUR_APP_NAME" -d "deployment[description]=This is an app id deployment" https://api.newrelic.com/deployments.xml

For Windows users, here are examples using PowerShell to send deployment information:

Invoke-RestMethod -uri https://rpm.newrelic.com/deployments.xml -Method Post -Headers @{"x-api-key"="REPLACE_WITH_YOUR_API_KEY"} -Body @{"deployment[application_id]"="REPLACE_WITH_YOUR_APP_ID"; "deployment[description]"="This is an app id deployment"}
Invoke-RestMethod -uri https://rpm.newrelic.com/deployments.xml -Method Post -Headers @{"x-api-key"="REPLACE_WITH_YOUR_API_KEY"} -Body @{"deployment[app_name]"="REPLACE_WITH_YOUR_APP_NAME"; "deployment[description]"="This is an app name deployment"}

Limits on the deployment[ ] fields

There are limits to the length of each field when recording a deployment:

  • deployment[description] 65535 characters or less
  • deployment[changelog] 65535 characters or less
  • deployment[user] 31 characters or less
  • deployment[revision] 127 characters or less

Caution: When recording deployments via curl:

  • Do not include line breaks or carriage returns. These will cause errors or fail to report.
  • Do not include a semicolon ; in the character string. Semicolons denote the end of a line in the CLI and your command will be truncated.

For more help

If you need additional help, get support at support.newrelic.com .

If you need additional help, get support at support.newrelic.com.