add alloy
This commit is contained in:
@@ -47,10 +47,10 @@ scrape_configs:
|
||||
- targets: ['10.249.84.41:9060']
|
||||
|
||||
# Loki metrics
|
||||
# - job_name: 'loki'
|
||||
# sample_limit: 50000
|
||||
# static_configs:
|
||||
# - targets: ['loki:3100']
|
||||
- job_name: 'loki'
|
||||
sample_limit: 50000
|
||||
static_configs:
|
||||
- targets: ['loki:3100']
|
||||
|
||||
# Grafana metrics
|
||||
- job_name: 'grafana'
|
||||
@@ -59,7 +59,7 @@ scrape_configs:
|
||||
- targets: ['grafana:3000']
|
||||
|
||||
# Alloy metrics
|
||||
# - job_name: 'alloy'
|
||||
# sample_limit: 50000
|
||||
# static_configs:
|
||||
# - targets: ['alloy:12345']
|
||||
- job_name: 'alloy'
|
||||
sample_limit: 50000
|
||||
static_configs:
|
||||
- targets: ['10.249.84.41:9030']
|
||||
|
||||
+10
-29
@@ -1,5 +1,4 @@
|
||||
services:
|
||||
# Grafana for visualization
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
container_name: grafana
|
||||
@@ -29,34 +28,15 @@ services:
|
||||
networks:
|
||||
- monitoring
|
||||
|
||||
# loki:
|
||||
# image: grafana/loki:latest
|
||||
# container_name: loki
|
||||
# ports:
|
||||
# - "9020:3100"
|
||||
# volumes:
|
||||
# - ./config/loki.yml:/etc/loki/local-config.yaml
|
||||
# - loki-data:/var/loki
|
||||
# restart: unless-stopped
|
||||
# networks:
|
||||
# - monitoring
|
||||
|
||||
# alloy:
|
||||
# image: grafana/alloy:latest
|
||||
# container_name: grafana-alloy
|
||||
# ports:
|
||||
# - "9030:12345"
|
||||
# volumes:
|
||||
# - ./config/alloy.conf:/etc/alloy/config.alloy
|
||||
# - alloy-data:/var/lib/alloy/data
|
||||
# command:
|
||||
# - run
|
||||
# - --server.http.listen-addr=0.0.0.0:12345
|
||||
# - --storage.path=/var/lib/alloy/data
|
||||
# - /etc/alloy/config.alloy
|
||||
# restart: unless-stopped
|
||||
# networks:
|
||||
# - monitoring
|
||||
loki:
|
||||
image: grafana/loki:latest
|
||||
container_name: loki
|
||||
ports:
|
||||
- "9020:3100"
|
||||
command: -config.file=/etc/loki/local-config.yaml
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- monitoring
|
||||
|
||||
# AlertManager for handling alerts
|
||||
alertmanager:
|
||||
@@ -88,6 +68,7 @@ services:
|
||||
- '--web.console.libraries=/etc/prometheus/console_libraries'
|
||||
- '--web.console.templates=/etc/prometheus/consoles'
|
||||
- '--web.enable-lifecycle'
|
||||
- "--web.enable-remote-write-receiver"
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- monitoring
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
version: "3.3"
|
||||
|
||||
networks:
|
||||
loki:
|
||||
|
||||
services:
|
||||
loki:
|
||||
image: grafana/loki:latest
|
||||
ports:
|
||||
- "3100:3100"
|
||||
command: -config.file=/etc/loki/local-config.yaml
|
||||
networks:
|
||||
- loki
|
||||
|
||||
promtail:
|
||||
image: grafana/promtail:latest
|
||||
volumes:
|
||||
- /var/log:/var/log
|
||||
command: -config.file=/etc/promtail/config.yml
|
||||
networks:
|
||||
- loki
|
||||
|
||||
grafana:
|
||||
environment:
|
||||
- GF_PATHS_PROVISIONING=/etc/grafana/provisioning
|
||||
- GF_AUTH_ANONYMOUS_ENABLED=true
|
||||
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
|
||||
- GF_FEATURE_TOGGLES_ENABLE=alertingSimplifiedRouting,alertingQueryAndExpressionsStepMode
|
||||
entrypoint:
|
||||
- sh
|
||||
- -euc
|
||||
- |
|
||||
mkdir -p /etc/grafana/provisioning/datasources
|
||||
cat <<EOF > /etc/grafana/provisioning/datasources/ds.yaml
|
||||
apiVersion: 1
|
||||
datasources:
|
||||
- name: Loki
|
||||
type: loki
|
||||
access: proxy
|
||||
orgId: 1
|
||||
url: http://loki:3100
|
||||
basicAuth: false
|
||||
isDefault: true
|
||||
version: 1
|
||||
editable: false
|
||||
EOF
|
||||
/run.sh
|
||||
image: grafana/grafana:latest
|
||||
ports:
|
||||
- "3000:3000"
|
||||
networks:
|
||||
- loki
|
||||
Reference in New Issue
Block a user