You might find that you ingest data you don't need or want. You can drop some types of data, which enables you:
- To filter out unimportant low-value data
- To filter out potentially sensitive data
If you choose to drop data, only new data will be affected. Existing data cannot be edited or deleted.
ヒント
If you are sending data to New Relic using Prometheus remote write, you can also drop data by changing the remote_write
section of your YAML config file.
For more information, see Drop data using Prometheus remote write.
Requirements
You must have a user role with permissions for dropping data.
Currently the following data types can be targeted for data dropping:
- APM-reported events
- Browser-reported events
- Mobile-reported events
- Synthetics-reported events
- Custom events (like those generated by the APM agent APIs or the Event API)
- Log data
- Trace spans
- Default infrastructure monitoring events and infrastructure integrations events, with this exception:
- Downsampled
SystemSample
,ProcessSample
,NetworkSample
andStorageSample
with time windows longer than 59 minutes can't be dropped. This data doesn't count towards your data ingest.
- Downsampled
- Dimensional metrics, with these caveats:
- Billing impacts: for New Relic One pricing, dropped data is not billable. For original pricing, dropped data is billable.
- For metrics generated by the events-to-metrics service: drop rules won't work but these metrics can be stopped or attributes pruned by disabling or re-configuring the events-to-metric rule.
Support for additional types are planned for the future.
Create drop data rule
注意
Use caution when deciding to drop data. The data you drop is not recoverable. Before using this feature, please review caution information below.
To drop data, create a NerdGraph-format drop rule that includes:
- A NRQL string that specifies what data types to drop
- An action type specifying how to apply the NRQL string
You can form and make the call in the NerdGraph explorer.
There are two ways to drop data:
Drop entire data types or a data subset (with optional filter). This uses the
DROP_DATA
action type and uses NRQL of the form:SELECT * FROM DATA_TYPE_1, DATA_TYPE_2 (WHERE OPTIONAL_FILTER)
For this type of drop rule, you cannot use anything other than
*
in theSELECT
clause.Drop attributes from data types (with optional filter). This uses the
DROP_ATTRIBUTES
action type and uses NRQL of the form:SELECT dropAttr1, dropAttr2 FROM DATA_TYPE (WHERE OPTIONAL_FILTER)
For this type of drop rule, you must pass in a non-empty list of raw attributes names.
NRQL restrictions
Not all NRQL clauses make sense for generating drop rules. You can provide a WHERE
clause to select data with specific attributes. Other features such as TIMESERIES
, COMPARE WITH
, FACET
, and other clauses cannot be used.
The two action types have these restrictions:
DROP_DATA
can use onlySELECT *
.DROP_ATTRIBUTES
requires use ofSELECT
with "raw" attributes (attributes with no aggregator function applied). This also means you cannot useSELECT *
. Additionally, there are some attributes that are integral to their data type and cannot be dropped (such astimestamp
on event data). If you include them, registration will fail.
Example drop rules
Here are some example drop rules:
Verify your drop rule works
After you create a drop rule, verify that it is working as expected. The rule should take effect quickly after a successful registration, so try running a TIMESERIES
version of the query you registered to see that the data drops off.
Drop rule type | NRQL |
---|---|
| Drop rule NRQL:
Validation NRQL:
This should drop to 0. To verify that it did not affect any thing else, invert the |
| Drop rule NRQL:
Validation NRQL:
Both lines should drop to 0. To verify that it did not affect events that contained these attributes and still should, invert the |
View rules
Here is an example NerdGraph call that returns the drop rules set on an account:
{
actor {
account(id: YOUR_ACCOUNT_ID) {
nrqlDropRules {
list {
rules {
id
nrql
accountId
action
createdBy
createdAt
description
}
error { reason description }
}
}
}
}
}
Delete drop rules
Here is an example NerdGraph call deleting two specific drop rules:
mutation {
nrqlDropRulesDelete(accountId: YOUR_ACCOUNT_ID, ruleIds: ["48", "98"]) {
successes {
id
nrql
accountId
action
description
}
failures {
error { reason description }
submitted { ruleId accountId }
}
}
}
Audit drop rule history
To see who created and deleted drop rules, query your account audit logs. The list endpoint also includes the user ID of the person who created the rule.
Cautions when dropping data
When creating drop rules, you are responsible for ensuring that the rules accurately identify and discard the data that meets the conditions that you have established. You are also responsible for monitoring the rule, as well as the data you disclose to New Relic.
New Relic cannot guarantee that this functionality will completely resolve data disclosure concerns you may have. New Relic does not review or monitor how effective the rules you develop are.
Creating rules about sensitive data can leak information about what kinds of data you maintain, including the format of your data or systems (for example, through referencing email addresses or specific credit card numbers). Rules you create, including all information in those rules, can be viewed and edited by any user with the relevant role-based access control permissions.
Only new data will be dropped. Existing data cannot be edited or deleted.
Learn more
Recommendations for learning more:
- NerdGraph basics and terminology
- NRQL basics
- Browse the Explorers Hub for community discussions about NRQL drop rules.
その他のヘルプ
さらに支援が必要な場合は、これらのサポートと学習リソースを確認してください:
- Explorers Hubでは、コミュニティからのサポートを受けたり、ディスカッションに参加したりすることができます。
- 当社サイトで答えを見つけて、サポートポータルの使用方法を確認してください。
- Linux、Windows、およびmacOS向けトラブルシューティングツールであるNew Relic Diagnosticsを実行してください。
- New Relicの とandドキュメント をご確認ください。