Re: [prometheus-users] Delete Metrics From PushGateway

2022-07-21 Thread Bjoern Rabenstein
On 08.07.22 18:14, 'Alan Tam CA' via Prometheus Users wrote:
> 
> I am wondering if there is a way to match all values of the instance label 
> using regex in the URL. So something like
> 
>-   curl -X DELETE 
>http://pushgateway.example.org:9091/metrics/job/some_job/instance/~".+";
>
> Note: Prometheus has this feature to match all values of a label using ~".+". 
> For instance: 
> 
> curl -X POST -g 
> 'http://prometheus.example.org:9090/api/v1/admin/tsdb/delete_series?match[]={__name__=~".+"}'
>  

No, that's not possible.

The Pushgateway isn't really a database (like Prometheus itself), so
it doesn't have any fancy matching.

-- 
Björn Rabenstein
[PGP-ID] 0x851C3DA17D748D03
[email] bjo...@rabenste.in

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/Ytl%2BYRkwAe7dpbFD%40mail.rabenste.in.


[prometheus-users] Delete Metrics From PushGateway

2022-07-09 Thread 'Alan Tam CA' via Prometheus Users
Hello,

The PushGateway docs state the following:

Delete all metrics in the group identified by {job="some_job"} (note that 
this does not include metrics in 
the {job="some_job",instance="some_instance"} group from the previous 
example, even if those metrics have the same job label):

   -   curl -X DELETE 
   http://pushgateway.example.org:9091/metrics/job/some_job
   

I am wondering if there is a way to match all values of the instance label 
using regex in the URL. So something like

   -   curl -X DELETE 
   http://pushgateway.example.org:9091/metrics/job/some_job/instance/~".+";
   
Note: Prometheus has this feature to match all values of a label using ~".+". 
For instance: 

curl -X POST -g 
'http://prometheus.example.org:9090/api/v1/admin/tsdb/delete_series?match[]={__name__=~".+"}'
 

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/0b2c9765-1c19-4cf4-8c03-223406cdde0bn%40googlegroups.com.