Skip to content

Instantly share code, notes, and snippets.

@MartinLuksik
Last active December 19, 2023 13:18
Show Gist options
  • Save MartinLuksik/858dd009b3a74b448ef7be64a6651a29 to your computer and use it in GitHub Desktop.
Save MartinLuksik/858dd009b3a74b448ef7be64a6651a29 to your computer and use it in GitHub Desktop.
[Victoriametrics]
# select data with start & end
curl -v http://vmcluster-cr-victoria-metrics-cluster-vmselect.kube-prometheus-stack.svc.cluster.local:8481/select/0/prometheus/api/v1/series -d 'match[]=costInBillingCurrency' -d 'start=2023-12-01T00:00:00Z' -d 'end=2023-12-07T23:59:59Z'
curl -v http://vmcluster-cr-victoria-metrics-cluster-vmselect.kube-prometheus-stack.svc.cluster.local:8481/select/0/prometheus/api/v1/series -d 'match[]=costInBillingCurrency{month="12"}'
# delete metrics from clustered db:
curl -v http://vmcluster-cr-victoria-metrics-cluster-vmselect.kube-prometheus-stack.svc.cluster.local:8481/delete/0/prometheus/api/v1/admin/tsdb/delete_series -d 'match[]=gl_log_size'
# delete metrics from clustered db:
curl -v http://vmcluster-cr-victoria-metrics-cluster-vmselect.kube-prometheus-stack.svc.cluster.local:8481/delete/0/prometheus/api/v1/admin/tsdb/delete_series -d 'match[]=costInBillingCurrency{month="12"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment