New Relic: Search Logs

📘

Availability

This workflow action is available on Business and Enterprise for Incident Management pricing plans. Contact the Sales Team to upgrade to an account with this action.

Description

Search for logs in New Relic using NRQL (New Relic Query Language). The action runs a query against the Log data type with your chosen time range and returns matching log entries for use in your Incident Workflow.

Instructions

  1. If you have not done so, follow the instructions to Create an Incident Workflow.
  2. When the instructions prompt you to add actions, select this action.
  3. Enter the following Inputs and click Save.
  4. Continue following instructions to Publish the Workflow.
  5. When the action runs, you will see the Outputs listed below.

Inputs

📘

Field References

Fields with the {+} icon accept Field References, which can be useful for referencing incident data or outputs created in prior workflow steps. To add Field References, click {+}, or enter {{, and select relevant fields. Refer to the Field References article for more information.

NameDescription
IntegrationSelect a Workflow Integration or click New New Relic Connection to create one.
NRQL QueryThe NRQL SELECT clause for the logs you want (e.g. SELECT * or SELECT message, newrelic.source). The action automatically adds FROM Log and your configured time range. Default: SELECT *.
Start TimeThe start of the search window.
Options: Past 1 Minute, 5m, 10m, 15m, 30m, 1h, 4h, 1d, 2d, 7d, 14d, 30d.
Default: 1h (Past 1 Hour).
End TimeThe end of the search window.
Options: Now or the same past intervals as Start Time.
Default: Now.
LimitMaximum number of log entries to return.
Min: 1, max: 1000.
Default: 100.

Outputs

NameDescription
LogsJSON array of log entries returned from New Relic.
Log CountTotal number of matching logs returned.
NRQL Query UsedThe full NRQL query sent to New Relic (including FROM Log, time range, and LIMIT).
Time Range StartStart time used for the search (Unix timestamp in milliseconds).
Time Range EndEnd time used for the search (Unix timestamp in milliseconds).
ResultWhether the action succeeded: Success or Failed.
Result SummaryShort description of what the action did or why it failed.
ErrorError message, if the action failed.