How to delete metrics?

9,035 views
Skip to first unread message

mle...@gmail.com

unread,
Jun 4, 2015, 11:46:33 PM6/4/15
to prometheus...@googlegroups.com
Hi there

I have been experimenting with the graphite exporter and getting apache spark to send its metrics there. My first attempts didn't use a mapping file so all the metric names were exported 'as is' from the graphite format. Spark sends metrics from each executor (node) and includes the job name in the name of the metric so now it has hundreds of metric names in the drop down list and in the auto complete of the graph ui and prom dash. How can I delete them?

To be clear I don't care about the data, it was just during testing.

Thanks
Matthew

Fabian Reinartz

unread,
Jun 5, 2015, 4:04:57 AM6/5/15
to mle...@gmail.com, prometheus...@googlegroups.com
Hi Matthew,

If you are just testing things and want to clear all the data, you can simply delete the whole storage folder (/tmp/metrics by default).
Deleting only specific metrics is not yet possible in version 0.14.0. This will most likely come with version 0.15.0 in which an official HTTP API will be added.


Fabian

--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matthew Jones

unread,
Jun 10, 2015, 10:47:11 PM6/10/15
to Fabian Reinartz, prometheus...@googlegroups.com

Thanks for the quick response

Unfortunately I would like to keep the data from all my other collectors so I will just wait till 0.15.0.

Matthew

Julius Volz

unread,
Jun 11, 2015, 8:16:56 AM6/11/15
to Matthew Jones, Fabian Reinartz, prometheus-developers
Update: https://github.com/prometheus/prometheus/pull/783 just got merged.

Now you can do an HTTP API request like this to delete certain matching series from the storage:

DELETE /api/v1/series?match[]=mymetricname{foo="bar"}

dar...@subayai.com

unread,
Dec 6, 2017, 5:11:37 PM12/6/17
to Prometheus Developers
Regarding the clients (attempting to use the Hystrix-Prometheus Java client suite)...

Do not fully understand how/when (including synchronization to avoid losing metrics) in any (push or pull model) the metrics are reset after they are gathered by the server?

The push gateway implementation does not clear/reset anything after successful push to gateway and don't see where/how Prometheus server would clear/reset metrics on each client on successful pull... ?

Looked at Collector class, CollectoryRegistry and associated sub-classes.
CollectorRegistry.clear() actually works like "unregister(Collector)" ... just for all Collectors and hence afterward, Hystrix publishes no metrics.

This would imply having to unregister and re-register all (Hystrix) methods for every scrape/push cycle... which makes no sense (and the writers to the Collectors would lose metrics during this process in a highly concurrent environment).

Clearly something is missed here... please advise.

Thank you.

Brian Brazil

unread,
Dec 7, 2017, 3:58:05 AM12/7/17
to dar...@subayai.com, Prometheus Developers
On 6 December 2017 at 22:11, <dar...@subayai.com> wrote:
Regarding the clients (attempting to use the Hystrix-Prometheus Java client suite)...

Do not fully understand how/when (including synchronization to avoid losing metrics) in any (push or pull model) the metrics are reset after they are gathered by the server?

The push gateway implementation does not clear/reset anything after successful push to gateway and don't see where/how Prometheus server would clear/reset metrics on each client on successful pull... ?

Looked at Collector class, CollectoryRegistry and associated sub-classes.
CollectorRegistry.clear() actually works like "unregister(Collector)" ... just for all Collectors and hence afterward, Hystrix publishes no metrics.

This would imply having to unregister and re-register all (Hystrix) methods for every scrape/push cycle... which makes no sense (and the writers to the Collectors would lose metrics during this process in a highly concurrent environment).

Clearly something is missed here... please advise.


Brian
 

Thank you.


On Thursday, June 4, 2015 at 11:46:33 PM UTC-4, mle...@gmail.com wrote:
> Hi there
>
> I have been experimenting with the graphite exporter and getting apache spark to send its metrics there. My first attempts didn't use a mapping file so all the metric names were exported 'as is' from the graphite format. Spark sends metrics from each executor (node) and includes the job name in the name of the metric so now it has hundreds of metric names in the drop down list and in the auto complete of the graph ui and prom dash. How can I delete them?
>
> To be clear I don't care about the data, it was just during testing.
>
> Thanks
> Matthew
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
To post to this group, send email to prometheus-developers@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/7dfaa06f-ccce-466e-a157-6848433a3daa%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages