preview
We're still working on this feature, but we'd love for you to try it out!
This feature is currently provided as part of a preview program pursuant to our pre-release policies.
This page provides a comprehensive reference for new relic ingest actions available in the workflow automation actions catalog. These actions enable you to send events and logs to new relic.
Prerequisites
Before using New Relic actions in workflow automation, ensure you have:
- A New Relic account with appropriate permissions.
- A New Relic license key (if sending data to a different account).
- The necessary permissions for the specific New Relic services you plan to use.
See License Key for information on how to create and manage your New Relic Account License Key.
Data ingest actions
Reports a custom event to New Relic.
Input Field | Optionality | Type | Description | Example |
|---|---|---|---|---|
attributes | Optional | Map | Common attributes which is part of all the events when provided. Merging for each event item when needed event item overrides common definition. |
|
events | Required | List | The list of event data. ImportantEvents requires the use of aneventType field that represents the custom event type. The maximum events allowed per request is 100.
|
|
licenseKey | Optional | String | The New Relic Account License Key (required) specifies the target account for your events. If not provided, the system uses the default license key from the account executing the workflow. Read more about our API keys to create and manage your New Relic Account License Key. |
|
selectors | Optional | List | The selectors to get only the specified parameters as output. |
|
Output Field | Type |
|---|---|
success | Boolean |
errorMessage | string |
Workflow example |
|---|
Expected output: Retrieve events: After successfully executing a workflow, you can retrieve the associated event by running a query under the account that executed the workflow: |
Send logs to New Relic
Input Field | Optionality | Type | Description | Example |
|---|---|---|---|---|
attributes | Optional | Map | Common attributes are included in all logs when provided. These merge with each log item, with log-specific values overriding common attributes when conflicts occur. |
|
logs | Required | List | List of logs. Each log requires a |
|
licenseKey | Optional | String | The New Relic Account License Key (required) specifies the target account for your events. If not provided, the system uses the default license key from the account executing the workflow. Read more about our API keys to create and manage your New Relic Account License Key. |
|
selectors | Optional | List | The selectors to get only the specified parameters as output. |
Output Field | Type |
|---|---|
success | Boolean |
errorMessage | string |
Workflow example |
|---|
Expected output: Retrieve logs: After successfully executing a workflow, you can retrieve the associated log by running a query under the account that executed the workflow: |
Input Field | Optionality | Type | Example |
|---|---|---|---|
metrics | Required | List | |
attributes | Optional | Map | |
licenseKey | Optional | String | The New Relic Account License Key (required) specifies the target account for your events. If not provided, the system uses the default license key from the account executing the workflow. Read more about our API keys to create and manage your New Relic Account License Key.
|
selectors | Optional | List | |
Required key-value pairs in the metrics
Each metric data point map in the metrics list uses the following key-value structure:
Attribute | Type | Optionality | Description |
|---|---|---|---|
name | String | Required | The name of the metric. The value must be less than 255 characters. |
value | Number or Map | Required | The value varies depending on the metric type. For |
timestamp | Long | Optional | The metric's start time in Unix time. The default uses UTC time zone. This field also support seconds, microseconds, and nanoseconds. However, the data will be converted to milliseconds for storage and query. Metrics are dropped if they have a timestamp more than 48 hours in the past or more than 24 hours in the future from the time they are reported. |
interval.ms | Positive long | Required for | The length of the time window. |
type | Recommended | Supports only | |
attributes | Strings, JSON numbers, or Booleans | Recommended | A map of key value pairs associated with this specific metric. Values can be strings, JSON numbers, or booleans. Keys are case-sensitive and must be less than 255 characters. |
Important
The metrics API mandates a timestamp. Within the action, the timestamp is optional, defaulting to the current time if not supplied prior to metrics ingestion.
Share attributes across metrics with common
If you want to include a set of attributes on multiple metrics (and not add the same attributes for each metric), you can use the common block. This is an optional map that specifies information that applies to all associated metric data points. Values in the common section will be overridden if the same key exists on a metric data point.
The block can include:
Attribute | Type | Optionality | Description |
|---|---|---|---|
timestamp | Long | The metric's start time in Unix time. This defaults to the current time in the UTC time zone. This field also supports seconds, microseconds, and nanoseconds. However, the data will be converted to milliseconds for storage and later querying. | |
interval.ms | Positive long | Required for | The length of the time window. |
attributes | Strings, JSON numbers, or Booleans | A map of key-value pairs associated with this specific metric. Values can be strings, JSON numbers, or booleans. |
Output Field | Type | Example |
|---|---|---|
requestId | String |
|
success | Boolean |
|
errorMessage | String |
|
Workflow example |
|---|
|