- Remove duplicate db.metrics section (port 7203 conflict) - Fix coordinator health endpoint (/health not /api/v1/services/m3db/health) - Update README: remove NodePort references, always use LoadBalancer - Add bootstrap instructions (workaround for init job chicken-and-egg) - Fix test-metrics.sh: correct health endpoint and JSON parsing
261 lines
6.8 KiB
YAML
261 lines
6.8 KiB
YAML
##############################################################################
|
|
# M3DB Configuration
|
|
# Tuned for replacing Mimir — supports Prometheus remote write/read
|
|
##############################################################################
|
|
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: m3db-config
|
|
namespace: m3db
|
|
labels:
|
|
app.kubernetes.io/name: m3db
|
|
data:
|
|
m3dbnode.yml: |
|
|
coordinator:
|
|
listenAddress: 0.0.0.0:7201
|
|
metrics:
|
|
scope:
|
|
prefix: coordinator
|
|
prometheus:
|
|
handlerPath: /metrics
|
|
listenAddress: 0.0.0.0:7203
|
|
sanitization: prometheus
|
|
samplingRate: 1.0
|
|
extended: none
|
|
|
|
# Prometheus remote write/read endpoints (Mimir replacement)
|
|
tagOptions:
|
|
idScheme: quoted
|
|
|
|
db:
|
|
logging:
|
|
level: info
|
|
|
|
# Metrics handled by coordinator section above (port 7203)
|
|
# db-specific metrics disabled to avoid port conflict
|
|
|
|
listenAddress: 0.0.0.0:9000
|
|
clusterListenAddress: 0.0.0.0:9001
|
|
httpNodeListenAddress: 0.0.0.0:9002
|
|
httpClusterListenAddress: 0.0.0.0:9003
|
|
debugListenAddress: 0.0.0.0:9004
|
|
|
|
hostID:
|
|
resolver: hostname
|
|
|
|
client:
|
|
writeConsistencyLevel: majority
|
|
readConsistencyLevel: unstrict_majority
|
|
writeTimeout: 10s
|
|
fetchTimeout: 15s
|
|
connectTimeout: 20s
|
|
writeRetry:
|
|
initialBackoff: 500ms
|
|
backoffFactor: 3
|
|
maxRetries: 2
|
|
jitter: true
|
|
fetchRetry:
|
|
initialBackoff: 500ms
|
|
backoffFactor: 2
|
|
maxRetries: 3
|
|
jitter: true
|
|
|
|
# Cluster discovery via etcd
|
|
discovery:
|
|
config:
|
|
service:
|
|
env: default_env
|
|
zone: embedded
|
|
service: m3db
|
|
cacheDir: /var/lib/m3kv
|
|
etcdClusters:
|
|
- zone: embedded
|
|
endpoints:
|
|
- http://etcd-0.etcd.m3db.svc.cluster.local:2379
|
|
- http://etcd-1.etcd.m3db.svc.cluster.local:2379
|
|
- http://etcd-2.etcd.m3db.svc.cluster.local:2379
|
|
|
|
# Cache configuration
|
|
cache:
|
|
series:
|
|
policy: lru
|
|
postingsList:
|
|
size: 262144
|
|
|
|
# Commit log
|
|
commitlog:
|
|
flushMaxBytes: 524288
|
|
flushEvery: 1s
|
|
queue:
|
|
calculationType: fixed
|
|
size: 2097152
|
|
|
|
# Filesystem (data persistence)
|
|
filesystem:
|
|
filePathPrefix: /var/lib/m3db
|
|
writeBufferSize: 65536
|
|
dataReadBufferSize: 65536
|
|
infoReadBufferSize: 128
|
|
seekReadBufferSize: 4096
|
|
throughputLimitMbps: 1000.0
|
|
throughputCheckEvery: 128
|
|
|
|
# Repair disabled by default — enable once cluster is stable
|
|
repair:
|
|
enabled: false
|
|
|
|
# Pooling for performance
|
|
pooling:
|
|
blockAllocSize: 16
|
|
type: simple
|
|
seriesPool:
|
|
size: 262144
|
|
lowWatermark: 0.7
|
|
highWatermark: 1.0
|
|
blockPool:
|
|
size: 262144
|
|
lowWatermark: 0.7
|
|
highWatermark: 1.0
|
|
encoderPool:
|
|
size: 262144
|
|
lowWatermark: 0.7
|
|
highWatermark: 1.0
|
|
segmentReaderPool:
|
|
size: 16384
|
|
lowWatermark: 0.2
|
|
highWatermark: 1.0
|
|
iteratorPool:
|
|
size: 2048
|
|
lowWatermark: 0.2
|
|
highWatermark: 1.0
|
|
fetchBlockMetadataResultsPool:
|
|
size: 65536
|
|
capacity: 32
|
|
lowWatermark: 0.01
|
|
highWatermark: 1.0
|
|
fetchBlocksMetadataResultsPool:
|
|
size: 32
|
|
capacity: 4096
|
|
lowWatermark: 0.01
|
|
highWatermark: 1.0
|
|
bytesPool:
|
|
buckets:
|
|
- capacity: 16
|
|
size: 524288
|
|
lowWatermark: 0.01
|
|
highWatermark: 1.0
|
|
- capacity: 32
|
|
size: 262144
|
|
lowWatermark: 0.01
|
|
highWatermark: 1.0
|
|
- capacity: 64
|
|
size: 131072
|
|
lowWatermark: 0.01
|
|
highWatermark: 1.0
|
|
- capacity: 128
|
|
size: 65536
|
|
lowWatermark: 0.01
|
|
highWatermark: 1.0
|
|
- capacity: 256
|
|
size: 65536
|
|
lowWatermark: 0.01
|
|
highWatermark: 1.0
|
|
- capacity: 1440
|
|
size: 16384
|
|
lowWatermark: 0.01
|
|
highWatermark: 1.0
|
|
- capacity: 4096
|
|
size: 8192
|
|
lowWatermark: 0.01
|
|
highWatermark: 1.0
|
|
|
|
---
|
|
|
|
##############################################################################
|
|
# M3 Coordinator standalone config
|
|
# Handles Prometheus remote read/write + Grafana queries
|
|
##############################################################################
|
|
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: m3coordinator-config
|
|
namespace: m3db
|
|
labels:
|
|
app.kubernetes.io/name: m3coordinator
|
|
data:
|
|
m3coordinator.yml: |
|
|
listenAddress: 0.0.0.0:7201
|
|
|
|
logging:
|
|
level: info
|
|
|
|
metrics:
|
|
scope:
|
|
prefix: coordinator
|
|
prometheus:
|
|
handlerPath: /metrics
|
|
listenAddress: 0.0.0.0:7203
|
|
sanitization: prometheus
|
|
samplingRate: 1.0
|
|
|
|
tagOptions:
|
|
idScheme: quoted
|
|
|
|
clusters:
|
|
- namespaces:
|
|
- namespace: default
|
|
type: unaggregated
|
|
retention: 48h
|
|
- namespace: agg_10s_30d
|
|
type: aggregated
|
|
retention: 720h
|
|
resolution: 10s
|
|
- namespace: agg_1m_1y
|
|
type: aggregated
|
|
retention: 8760h
|
|
resolution: 1m
|
|
client:
|
|
config:
|
|
service:
|
|
env: default_env
|
|
zone: embedded
|
|
service: m3db
|
|
cacheDir: /var/lib/m3kv
|
|
etcdClusters:
|
|
- zone: embedded
|
|
endpoints:
|
|
- http://etcd-0.etcd.m3db.svc.cluster.local:2379
|
|
- http://etcd-1.etcd.m3db.svc.cluster.local:2379
|
|
- http://etcd-2.etcd.m3db.svc.cluster.local:2379
|
|
writeConsistencyLevel: majority
|
|
readConsistencyLevel: unstrict_majority
|
|
|
|
# Downsample configuration
|
|
downsample:
|
|
rules:
|
|
mappingRules:
|
|
- name: "10s for 30 days"
|
|
filter: "__name__:*"
|
|
aggregations: ["Last"]
|
|
storagePolicies:
|
|
- resolution: 10s
|
|
retention: 720h
|
|
- name: "1m for 1 year"
|
|
filter: "__name__:*"
|
|
aggregations: ["Last"]
|
|
storagePolicies:
|
|
- resolution: 1m
|
|
retention: 8760h
|
|
|
|
# Ingest — Prometheus remote write (uses defaults)
|
|
# ingest:
|
|
# ingester:
|
|
# workerPoolSize: 10000
|
|
|
|
# Carbon ingestion disabled (uncomment if needed)
|
|
# carbon:
|
|
# ingester:
|
|
# listenAddress: "0.0.0.0:7204"
|