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
@@ -32,29 +36,32 @@ The repeatable flag `--endpoint.sd-config=<content>` can be used to specify a `S
32
36
33
37
File Service Discovery is another mechanism for configuring components. With File SD, a list of files can be watched for updates, and the new configuration will be dynamically loaded when a change occurs. The list of files to watch is passed to a component via a flag shown in the component-specific sections below.
34
38
35
-
The format of the configuration file is the same as the one used in [Prometheus' File SD](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#file_sd_config). Both YAML and JSON files can be used. The format of the files is as follows:
39
+
Both YAML and JSON files can be used. The format of the files is as follows:
36
40
37
41
* JSON:
38
42
39
43
```json
40
-
[
41
-
{
42
-
"targets": ["localhost:9090", "example.org:443"]
43
-
}
44
-
]
44
+
{
45
+
"endpoints": [
46
+
{ "address": "localhost:9090" },
47
+
{ "address": "example.org:443" }
48
+
]
49
+
}
45
50
```
46
51
47
52
* YAML:
48
53
49
54
```yaml
50
-
- targets: ['localhost:9090', 'example.org:443']
55
+
endpoints:
56
+
- address: 'localhost:9090'
57
+
- address: 'example.org:443'
51
58
```
52
59
53
60
As a fallback, the file contents are periodically re-read at an interval that can be set using a flag specific to the component as shown below. The default value for all File SD re-read intervals is 5 minutes.
54
61
55
62
### Thanos Querier
56
63
57
-
The repeatable flag `--endpoint.sd-config-file` can be used to specify the path to files that contain addresses of `StoreAPI` servers.
64
+
The flag `--endpoint.sd-config-file` can be used to specify the path to files that contain addresses of `StoreAPI` servers.
58
65
59
66
The flag `--endpoint.sd-config-reload-interval=<5m>` can be used to change the fallback re-read interval from the default 5 minutes.
60
67
@@ -73,27 +80,27 @@ To use DNS SD, just add one of the following prefixes to the domain name in your
73
80
* `dns+` - the domain name after this prefix will be looked up as an A/AAAA query. *A port is required for this query type*. An example using this lookup with a static flag:
* `dnssrv+` - the domain name after this prefix will be looked up as a SRV query, and then each SRV record will be looked up as an A/AAAA query. You do not need to specify a port as the one from the query results will be used. For example:
This configuration will instruct Thanos to discover all endpoints within the `thanos-store` service in the `monitoring` namespace and use the declared port named `grpc`.
92
99
93
100
* `dnssrvnoa+` - the domain name after this prefix will be looked up as a SRV query, with no A/AAAA lookup made after that. Similar to the `dnssrv+` case, you do not need to specify a port. For example:
The default interval between DNS lookups is 30s. This interval can be changed using the `store.sd-dns-interval` flag for `StoreAPI` configuration in `Thanos Querier`, or `query.sd-dns-interval` for `QueryAPI` configuration in `Thanos Ruler`.
0 commit comments