moar
This commit is contained in:
91
loki/loki.yaml
Normal file
91
loki/loki.yaml
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
# Configuration: https://grafana.com/docs/loki/latest/configuration/
|
||||||
|
|
||||||
|
auth_enabled: false
|
||||||
|
|
||||||
|
server:
|
||||||
|
http_listen_port: 3100
|
||||||
|
log_level: warn
|
||||||
|
http_server_read_timeout: 3m
|
||||||
|
http_server_write_timeout: 2m
|
||||||
|
grpc_server_max_recv_msg_size: 52428800
|
||||||
|
grpc_server_max_send_msg_size: 52428800
|
||||||
|
grpc_server_max_concurrent_streams: 100
|
||||||
|
|
||||||
|
common:
|
||||||
|
path_prefix: /data/loki
|
||||||
|
storage:
|
||||||
|
filesystem:
|
||||||
|
chunks_directory: /data/chunks
|
||||||
|
rules_directory: /data/rules
|
||||||
|
replication_factor: 1
|
||||||
|
|
||||||
|
frontend:
|
||||||
|
max_outstanding_per_tenant: 2048
|
||||||
|
|
||||||
|
frontend_worker:
|
||||||
|
grpc_client_config:
|
||||||
|
max_recv_msg_size: 52428800
|
||||||
|
max_send_msg_size: 52428800
|
||||||
|
|
||||||
|
ingester:
|
||||||
|
wal:
|
||||||
|
enabled: true
|
||||||
|
dir: /data/loki/wal
|
||||||
|
lifecycler:
|
||||||
|
ring:
|
||||||
|
kvstore:
|
||||||
|
store: inmemory
|
||||||
|
heartbeat_timeout: 5m
|
||||||
|
|
||||||
|
chunk_encoding: "snappy"
|
||||||
|
|
||||||
|
ingester_client:
|
||||||
|
grpc_client_config:
|
||||||
|
max_recv_msg_size: 52428800
|
||||||
|
max_send_msg_size: 52428800
|
||||||
|
|
||||||
|
limits_config:
|
||||||
|
ingestion_rate_mb: 30
|
||||||
|
ingestion_burst_size_mb: 100
|
||||||
|
split_queries_by_interval: 24h
|
||||||
|
per_stream_rate_limit: 10000000
|
||||||
|
per_stream_rate_limit_burst: 20000000
|
||||||
|
allow_structured_metadata: true # Enabled for schema v13 and tsdb index type
|
||||||
|
reject_old_samples: true
|
||||||
|
reject_old_samples_max_age: 336h
|
||||||
|
ruler:
|
||||||
|
alertmanager_url: http://alertmanager:9093
|
||||||
|
|
||||||
|
querier:
|
||||||
|
max_concurrent: 1024
|
||||||
|
|
||||||
|
query_range:
|
||||||
|
align_queries_with_step: true
|
||||||
|
max_retries: 5
|
||||||
|
cache_results: true
|
||||||
|
|
||||||
|
query_scheduler:
|
||||||
|
grpc_client_config:
|
||||||
|
max_recv_msg_size: 52428800
|
||||||
|
max_send_msg_size: 52428800
|
||||||
|
|
||||||
|
schema_config:
|
||||||
|
configs:
|
||||||
|
- from: 2020-10-24
|
||||||
|
store: boltdb-shipper
|
||||||
|
object_store: filesystem
|
||||||
|
schema: v11
|
||||||
|
index:
|
||||||
|
prefix: index_
|
||||||
|
period: 24h
|
||||||
|
|
||||||
|
- from: 2025-01-31
|
||||||
|
store: tsdb
|
||||||
|
object_store: filesystem
|
||||||
|
schema: v13
|
||||||
|
index:
|
||||||
|
prefix: index_
|
||||||
|
period: 24h
|
||||||
|
|
||||||
|
analytics:
|
||||||
|
reporting_enabled: false
|
||||||
1523
loki/loki_config_runtime.yaml
Normal file
1523
loki/loki_config_runtime.yaml
Normal file
File diff suppressed because it is too large
Load Diff
72
promtail/promtail.yaml
Normal file
72
promtail/promtail.yaml
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
server:
|
||||||
|
http_listen_port: 9080 # HTTP server for Promtail
|
||||||
|
grpc_listen_port: 0 # Disabling gRPC (not needed in most cases)
|
||||||
|
|
||||||
|
positions:
|
||||||
|
filename: /tmp/positions.yaml # Where Promtail saves its log read positions
|
||||||
|
|
||||||
|
clients:
|
||||||
|
- url: http://loki:3100/loki/api/v1/push # Loki push endpoint
|
||||||
|
batchsize: 1024000 # Max size of logs to batch in bytes (1MB)
|
||||||
|
batchwait: 1s # Max time to wait before sending a batch
|
||||||
|
|
||||||
|
scrape_configs:
|
||||||
|
######################################################################################
|
||||||
|
##################### SCRAPE DOCKER NETWORKS #######################
|
||||||
|
######################################################################################
|
||||||
|
- job_name: 'docker-containers'
|
||||||
|
docker_sd_configs:
|
||||||
|
- host: unix:///var/run/docker.sock
|
||||||
|
refresh_interval: 10s
|
||||||
|
filters:
|
||||||
|
- name: network
|
||||||
|
values:
|
||||||
|
- rpc_chains
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: ['__meta_docker_container_name']
|
||||||
|
target_label: 'container_name'
|
||||||
|
- source_labels: ['__meta_docker_container_image']
|
||||||
|
target_label: 'container_image'
|
||||||
|
- source_labels: ['__meta_docker_network_name']
|
||||||
|
target_label: 'network'
|
||||||
|
|
||||||
|
######################################################################################
|
||||||
|
##################### SYSTEM LOGS #######################
|
||||||
|
######################################################################################
|
||||||
|
- job_name: system
|
||||||
|
static_configs:
|
||||||
|
- targets: ["localhost"]
|
||||||
|
labels:
|
||||||
|
job: varlogs
|
||||||
|
nodename: system
|
||||||
|
__path__: /var/log/*log
|
||||||
|
|
||||||
|
######################################################################################
|
||||||
|
##################### NGINX LOGS #######################
|
||||||
|
######################################################################################
|
||||||
|
- job_name: nginx
|
||||||
|
static_configs:
|
||||||
|
- targets: ["localhost"]
|
||||||
|
labels:
|
||||||
|
job: nginx
|
||||||
|
nodename: system
|
||||||
|
__path__: /var/log/nginx/*.log
|
||||||
|
|
||||||
|
######################################################################################
|
||||||
|
##################### JOURNALD / SYSTEMD LOGS #######################
|
||||||
|
######################################################################################
|
||||||
|
- job_name: journal
|
||||||
|
journal:
|
||||||
|
json: false
|
||||||
|
max_age: 12h
|
||||||
|
path: /var/log/journal
|
||||||
|
# matches: _TRANSPORT=kernel # Optional filtering by transport type
|
||||||
|
labels:
|
||||||
|
job: systemd-journal
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [__journal__systemd_unit]
|
||||||
|
target_label: systemd_unit
|
||||||
|
- source_labels: [__journal__hostname]
|
||||||
|
target_label: nodename
|
||||||
|
- source_labels: [__journal_syslog_identifier]
|
||||||
|
target_label: syslog_identifier
|
||||||
37
telegraf/telegraf.conf
Normal file
37
telegraf/telegraf.conf
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# Telegraf Configuration for Docker Container Disk I/O Only
|
||||||
|
|
||||||
|
[agent]
|
||||||
|
interval = "10s"
|
||||||
|
round_interval = true
|
||||||
|
metric_batch_size = 1000
|
||||||
|
metric_buffer_limit = 10000
|
||||||
|
collection_jitter = "0s"
|
||||||
|
flush_interval = "10s"
|
||||||
|
flush_jitter = "0s"
|
||||||
|
precision = "0s"
|
||||||
|
hostname = ""
|
||||||
|
omit_hostname = false
|
||||||
|
|
||||||
|
# Prometheus output
|
||||||
|
[[outputs.prometheus_client]]
|
||||||
|
listen = ":9273"
|
||||||
|
path = "/metrics"
|
||||||
|
metric_version = 2
|
||||||
|
collectors_exclude = ["gocollector", "process"]
|
||||||
|
|
||||||
|
# Docker input plugin - disk I/O only
|
||||||
|
[[inputs.docker]]
|
||||||
|
endpoint = "unix:///var/run/docker.sock"
|
||||||
|
|
||||||
|
# Container filters
|
||||||
|
container_state_include = ["running"]
|
||||||
|
|
||||||
|
# Timeout for docker commands
|
||||||
|
timeout = "5s"
|
||||||
|
|
||||||
|
# Only collect block I/O metrics
|
||||||
|
perdevice_include = ["blkio"]
|
||||||
|
total_include = ["blkio"]
|
||||||
|
|
||||||
|
# Include useful Docker labels as tags
|
||||||
|
docker_label_include = ["com.docker.compose.service", "com.docker.compose.project"]
|
||||||
Reference in New Issue
Block a user