This document outlines the NRQL functions supported by the Pipeline Control gateway. This enhancement provides ways to manage your data within New Relic.
Function | Description | Example NRQL query |
---|---|---|
| Extracts a value from a string based on a specified pattern. |
|
| Filters data based on facets or dimensions associated with your metrics/events. |
|
| Returns the largest integer less than or equal to the specified number. |
|
| Extracts a specific field from a complex data structure (for example, JSON object). |
|
| Extracts the hour component from a timestamp. |
|
| Returns the remainder of a division operation. |
|
| Converts a string value to a numerical type. |
|
| Rounds a number to the nearest integer or to a specified number of decimals. |
|
| Converts a numerical or other value to a string type. |
|
| Extracts a specified portion of a string. |
|
| Extracts the day of the week from a timestamp (for example, 'Monday', 'Sunday'). |
|
Examples of NRQL functions in pipeline rules
These examples demonstrate how you can combine multiple functions and use them in more intricate scenarios to achieve precise data filtering and deletion.
DELETE FROM ContainerSample WHERE state = 'exited' and status LIKE '%Exited%' and status NOT LIKE '%second%' and status not like '%About a minute ago%' and not (status like '%minute%' and numeric(aparse(status,'%Exited (%) * minutes ago%')) < 10)
DELETE FROM Log, LogExtendedRecord WHERE dimensions() LIKE '%collectd%' AND newrelic.logs.customEventType IS NULL
DELETE FROM Log WHERE message LIKE '%lib/ladon/middleware/caching.rb:49 run> terminated with exception%' and floor(timestamp/101) = (timestamp/101)
These new functions significantly expand the capabilities of your NRQL queries when working with Pipeline Control gateway, allowing for more precise data analysis and management.