# Delete a custom metric data points extracted from log on grail

**URL:** <https://community.dynatrace.com/t/delete-a-custom-metric-data-points-extracted-from-log-on-grail/43400>\
**Category:** Open Q&A\
**Tags:** log-processing, dynatrace-managed, grail\
**Created:** [December 28, 2023, 10:52pm UTC](https://community.dynatrace.com/t/delete-a-custom-metric-data-points-extracted-from-log-on-grail/43400 "2023-12-28T22:52:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pallepavan](https://avatars.discourse-cdn.com/v4/letter/p/958977/32.png) [@pallepavan](https://community.dynatrace.com/u/pallepavan)\
**Post date:** [December 28, 2023, 10:52pm UTC](https://community.dynatrace.com/t/delete-a-custom-metric-data-points-extracted-from-log-on-grail/43400/1 "2023-12-28T22:52:38Z")

</div>

I have created a log metric and data is successfully ingested

but now i need to remove the metric all together from dynatrace (including all the ingested data points)

---

<div class="post-metadata">

**Author:** ![DanielS](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@DanielS](https://community.dynatrace.com/u/DanielS)\
**Post date:** [December 29, 2023, 6:39pm UTC](https://community.dynatrace.com/t/delete-a-custom-metric-data-points-extracted-from-log-on-grail/43400/2 "2023-12-29T18:39:00Z")

</div>

hello [@pallepavan](https://community.dynatrace.com/user/66885)&nbsp;you can do this on a bucket level for the log data, if you defined a specific bucket where the log data goes, you can truncate or delete the bucket.

You need the&nbsp; **storage:bucket-definitions:truncate** permission to be able to do it.

In this tip you have more details to use the [Grail API](https://community.dynatrace.com/post/228896).

And for the metric you can use the [API](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/metric-v2/delete-metrics). But have in mind that you can’t delete a metric if it has data points ingested within the last two hours.
