Skip to content

Commit

Permalink
feat: enable web api to interact with timeseries db
Browse files Browse the repository at this point in the history
  • Loading branch information
janikvonrotz committed Jan 31, 2025
1 parent 062c39b commit cc7a046
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion roles/prometheus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,14 @@ docker rm -f prom01
docker volume rm prom01
```

Then redeploy.
Then redeploy.

### Remove timeseries metrics

Use the prometheus web api to delete a time series.

```bash
curl -X POST -g 'http://prom01:9090/api/v1/admin/tsdb/delete_series?match[]={instance="https://n8n.example.com"}'
```

Then restart the container.
2 changes: 1 addition & 1 deletion roles/prometheus/tasks/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
description: "{{ prometheus_description }}"
image: "{{ prometheus_image }}"
restart_policy: unless-stopped
command: --storage.tsdb.retention.time={{ prometheus_retention_time }} --config.file=/etc/prometheus/prometheus.yml
command: --storage.tsdb.retention.time={{ prometheus_retention_time }} --config.file=/etc/prometheus/prometheus.yml --web.enable-admin-api
volumes:
- "{{ prometheus_volume_name }}:/prometheus"
- "{{ prometheus_data_dir }}/prometheus.yml:/etc/prometheus/prometheus.yml"
Expand Down

0 comments on commit cc7a046

Please sign in to comment.