more alloy annoying
This commit is contained in:
+10
-5
@@ -32,15 +32,20 @@ scrape_configs:
|
|||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['grafana:3000']
|
- targets: ['grafana:3000']
|
||||||
|
|
||||||
# Replace node-exporter job with Alloy
|
# Node metrics from Alloy - with custom instance name
|
||||||
- job_name: 'ktpv-orch_node-exporter'
|
- job_name: 'node'
|
||||||
sample_limit: 50000
|
sample_limit: 50000
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['alloy:12345'] # Scrape from Alloy's metrics endpoint
|
- targets: ['alloy:12345']
|
||||||
|
labels:
|
||||||
|
instance: 'main-server' # Use any name you want
|
||||||
metrics_path: /metrics
|
metrics_path: /metrics
|
||||||
|
|
||||||
- job_name: 'ktpv-apps01_node-exporter'
|
# Remote node for the second server
|
||||||
|
- job_name: 'node-app-server01'
|
||||||
sample_limit: 50000
|
sample_limit: 50000
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['10.249.84.41:12345'] # Adjust IP as needed
|
- targets: ['10.249.84.41:12345']
|
||||||
|
labels:
|
||||||
|
instance: 'app-server-01' # Use any name you want
|
||||||
metrics_path: /metrics
|
metrics_path: /metrics
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ services:
|
|||||||
alloy:
|
alloy:
|
||||||
image: grafana/alloy:latest
|
image: grafana/alloy:latest
|
||||||
container_name: alloy
|
container_name: alloy
|
||||||
|
hostname: localhost # Set a proper hostname
|
||||||
volumes:
|
volumes:
|
||||||
- ./config/config.alloy:/etc/alloy/config.alloy
|
- ./config/config.alloy:/etc/alloy/config.alloy
|
||||||
- /proc:/host/proc:ro # CRITICAL - must be mounted at /host/proc
|
- /proc:/host/proc:ro # CRITICAL - must be mounted at /host/proc
|
||||||
@@ -101,6 +102,8 @@ services:
|
|||||||
- "12345:12345"
|
- "12345:12345"
|
||||||
privileged: true # CRITICAL for accessing system metrics
|
privileged: true # CRITICAL for accessing system metrics
|
||||||
pid: "host" # CRITICAL for accessing process metrics
|
pid: "host" # CRITICAL for accessing process metrics
|
||||||
|
environment:
|
||||||
|
- HOSTNAME=localhost # Explicitly set the hostname for metrics
|
||||||
networks:
|
networks:
|
||||||
- monitoring
|
- monitoring
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user