You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Read is on `/api/prom/read` and write is on `/api/prom/push`.
14
+
15
+
16
+
## Configs API
2
17
3
18
The configs service provides an API-driven multi-tenant approach to handling various configuration files for prometheus. The service hosts an API where users can read and write Prometheus rule files, Alertmanager configuration files, and Alertmanager templates to a database.
4
19
5
20
Each tenant will have it's own set of rule files, Alertmanager config, and templates. A POST operation will effectively replace the existing copy with the configs provided in the request body.
6
21
7
-
## Configs Format
22
+
###Configs Format
8
23
9
24
At the current time of writing, the API is part-way through a migration from a single Configs service that handled all three sets of data to a split API ([Tracking issue](https://github.com/cortexproject/cortex/issues/619)). All APIs take and return all sets of data.
10
25
11
26
The following schema is used both when retrieving the current configs from the API and when setting new configs via the API.
12
27
13
-
### Schema:
28
+
####Schema:
14
29
15
30
```json
16
31
{
@@ -30,7 +45,7 @@ The following schema is used both when retrieving the current configs from the A
30
45
}
31
46
```
32
47
33
-
### Formatting
48
+
####Formatting
34
49
35
50
`id` - should be incremented every time data is updated; Cortex will use the config with the highest number.
36
51
@@ -42,9 +57,9 @@ The following schema is used both when retrieving the current configs from the A
42
57
43
58
`config.template_files` - The contents of a template file should be as described [here](https://prometheus.io/docs/alerting/notification_examples/#defining-reusable-templates), encoded as a single string to fit within the overall JSON payload.
44
59
45
-
## Endpoints
60
+
###Endpoints
46
61
47
-
### Manage Alertmanager
62
+
####Manage Alertmanager
48
63
49
64
`GET /api/prom/configs/alertmanager` - Get current Alertmanager config
50
65
@@ -73,7 +88,7 @@ Error Response: BadRequest(400)
73
88
}
74
89
```
75
90
76
-
### Manage Rules
91
+
####Manage Rules
77
92
78
93
`GET /api/prom/configs/rules` - Get current rule files
0 commit comments