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 nrdb actions available in the workflow automation actions catalog. These actions enable you to query new relic database.
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.
Executes a cross-accounts NRQL query through the NerdGraph API.
Input
Optionality
Type
Description
Example
query
Required
String
The NRQL query statement.
accountIds
Optional
List of int
New Relic Account IDs specifies the target accounts for query execution. If not provided, the query runs against the workflow's execution account.
selectors
Optional
List
The selectors to get the only specified parameters as output.
steps:
-name: queryForLog
type: action
action: newrelic.nrdb.query
version:1
inputs:
accountIds:[12345]
query: FROM Log SELECT * WHERE message LIKE 'DEMO%'
selectors:
-name: resultsAsString
expression:'.results | tostring'
Output
Type
Description
Example
results
An array of objects containing the results of the query. See Expressions property for more information.
success
Boolean
Status of the request.
errorMessage
String
Failure reason as message.
{
"success":true
results=[
{ message=[INFO]-Workflow: test has ended, messageId=39af98 },
{ message=[INFO]-Workflow: test - Step query has started, messageId=649c612 },
...
]
}
Runs a cross-accounts NRQL query through the NerdGraph API.
Input Field
Optionality
Type
Description
query
Required
String
The NRQL query statement.
accountIds
Optional
List of int
The New Relic Account IDs input accepts a list of account IDs that specify which accounts the query will execute against. If this input is not provided, the query defaults to the workflow's execution account.
format
Optional
Enum
To specify the type for the results, Accepts only JSON or CSV. Defaults to JSON .
selectors
Optional
List
The selectors to get the only specified parameters as output.
Example
steps:
-name: queryForLog
type: action
action: newrelic.nrdb.query
version:1
inputs:
accountIds:[12345]
query: FROM Log SELECT * WHERE message LIKE 'DEMO%'
selectors:
-name: resultsAsString
expression:'.results | tostring'
Output Field
Type
Description
Example
results
An array of objects containing the results of the query. See Expressions property for more information.
success
Boolean
Status of the request.
errorMessage
String
Failure reason as message.
{
"success":true
results=[
{ message=[INFO]-Workflow: test has ended, messageId=39af98 },
{ message=[INFO]-Workflow: test - Step query has started, messageId=649c612 },