add alloy
This commit is contained in:
@@ -47,10 +47,10 @@ scrape_configs:
|
|||||||
- targets: ['10.249.84.41:9060']
|
- targets: ['10.249.84.41:9060']
|
||||||
|
|
||||||
# Loki metrics
|
# Loki metrics
|
||||||
# - job_name: 'loki'
|
- job_name: 'loki'
|
||||||
# sample_limit: 50000
|
sample_limit: 50000
|
||||||
# static_configs:
|
static_configs:
|
||||||
# - targets: ['loki:3100']
|
- targets: ['loki:3100']
|
||||||
|
|
||||||
# Grafana metrics
|
# Grafana metrics
|
||||||
- job_name: 'grafana'
|
- job_name: 'grafana'
|
||||||
@@ -59,7 +59,7 @@ scrape_configs:
|
|||||||
- targets: ['grafana:3000']
|
- targets: ['grafana:3000']
|
||||||
|
|
||||||
# Alloy metrics
|
# Alloy metrics
|
||||||
# - job_name: 'alloy'
|
- job_name: 'alloy'
|
||||||
# sample_limit: 50000
|
sample_limit: 50000
|
||||||
# static_configs:
|
static_configs:
|
||||||
# - targets: ['alloy:12345']
|
- targets: ['10.249.84.41:9030']
|
||||||
|
|||||||
+10
-29
@@ -1,5 +1,4 @@
|
|||||||
services:
|
services:
|
||||||
# Grafana for visualization
|
|
||||||
grafana:
|
grafana:
|
||||||
image: grafana/grafana:latest
|
image: grafana/grafana:latest
|
||||||
container_name: grafana
|
container_name: grafana
|
||||||
@@ -29,34 +28,15 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- monitoring
|
- monitoring
|
||||||
|
|
||||||
# loki:
|
loki:
|
||||||
# image: grafana/loki:latest
|
image: grafana/loki:latest
|
||||||
# container_name: loki
|
container_name: loki
|
||||||
# ports:
|
ports:
|
||||||
# - "9020:3100"
|
- "9020:3100"
|
||||||
# volumes:
|
command: -config.file=/etc/loki/local-config.yaml
|
||||||
# - ./config/loki.yml:/etc/loki/local-config.yaml
|
restart: unless-stopped
|
||||||
# - loki-data:/var/loki
|
networks:
|
||||||
# restart: unless-stopped
|
- monitoring
|
||||||
# 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
|
|
||||||
|
|
||||||
# AlertManager for handling alerts
|
# AlertManager for handling alerts
|
||||||
alertmanager:
|
alertmanager:
|
||||||
@@ -88,6 +68,7 @@ services:
|
|||||||
- '--web.console.libraries=/etc/prometheus/console_libraries'
|
- '--web.console.libraries=/etc/prometheus/console_libraries'
|
||||||
- '--web.console.templates=/etc/prometheus/consoles'
|
- '--web.console.templates=/etc/prometheus/consoles'
|
||||||
- '--web.enable-lifecycle'
|
- '--web.enable-lifecycle'
|
||||||
|
- "--web.enable-remote-write-receiver"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- monitoring
|
- 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