cleanup and add alloy
This commit is contained in:
15
client/alloy-config.alloy
Normal file
15
client/alloy-config.alloy
Normal file
@@ -0,0 +1,15 @@
|
||||
local.file_match "caddy" {
|
||||
path_targets = [{"__path__" = "/tmp/app-logs/debug.log"}]
|
||||
sync_period = "5s"
|
||||
}
|
||||
|
||||
loki.write "remote_loki" {
|
||||
endpoint {
|
||||
url = "http://10.50.50.x/loki/api/v1/push"
|
||||
}
|
||||
}
|
||||
|
||||
loki.source.file "local_files" {
|
||||
targets = local.file_match.caddy.targets
|
||||
forward_to = [loki.write.local.loki.reciever]
|
||||
}
|
20
client/compose.yml
Normal file
20
client/compose.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
services:
|
||||
# monitor the host
|
||||
node_exporter:
|
||||
image: quay.io/prometheus/node-exporter:latest
|
||||
command:
|
||||
- '--path.rootfs=/host'
|
||||
network_mode: host
|
||||
# uses port 9100
|
||||
pid: host
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- '/:/host:ro'
|
||||
alloy:
|
||||
image: grafana/alloy:latest
|
||||
ports:
|
||||
- 12345:12345
|
||||
volumes:
|
||||
- ./alloy-config.alloy:/etc/alloy/config.alloy
|
||||
- ./logs:/tmp/app-logs/
|
||||
command: run --server.http.listen-addr=0.0.0.0:12345 --storage.path=/var/lib/alloy/data /etc/alloy/config.alloy
|
Reference in New Issue
Block a user