Skip to content

Commit 2caa9e7

Browse files
BarbatosBarbatos
authored andcommitted
add alloy readme
1 parent 4f3bd0b commit 2caa9e7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

metric_monitor/REMOTE_WRITE_WITH_THANOS.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,18 @@ remote_write:
127127
- The `--storage.tsdb.max-block-duration=30m` flag defines the maximum duration for generating TSDB blocks locally. With this setting, Prometheus will create new TSDB blocks at intervals no longer than 30 minutes, ensuring regular data persistence and efficient storage management.
128128
- Other storage flags can be found in the [official documentation](https://prometheus.io/docs/prometheus/latest/storage/#operational-aspects). For a quick start, you could use the default values.
129129

130+
#### Alternative way to set up Prometheus and Node Exporter
131+
Grafana Alloy can be used to set up Prometheus and Node Exporter.
132+
##### Alloy configuration file
133+
Please refer to the [prometheus-loki.alloy](./conf/prometheus-loki.alloy) for the Alloy configuration file. You need to replace some items' value to match your environment, such as `prometheus.scrape.targets`, `discovery.relabel`
134+
Note: If you don't need the loki feature, you can remove the last two configuration parts that start with loki.
135+
136+
##### Start Alloy
137+
Use the `.docker-compose/docker-compose-alloy.yml` and the following command to start Alloy.
138+
```sh
139+
docker-compose -f ./docker-compose/docker-compose-alloy.yml up -d
140+
```
141+
130142
### Step 2: Set up Thanos Receive
131143
The [Thanos Receive](https://thanos.io/tip/components/receive.md/#receiver) service implements the Prometheus Remote Write API. It builds on top of the existing Prometheus TSDB and retains its usefulness while extending its functionality with long-term-storage, horizontal scalability, and downsampling. Prometheus instances are configured to continuously write metrics to it. Thanos Receive exposes the StoreAPI so that Thanos Queriers can query received metrics in real-time.
132144

0 commit comments

Comments
 (0)