欢迎来到 一木浮生 的博客

人生三重境界:昨夜西风凋碧树,独上高楼,望尽天涯路。 衣带渐宽终不悔,为伊消得人憔悴。 众里寻他千百度,蓦然回首,那人却在灯火阑珊处。
扩大
缩小

Rancher1.6 部署Influxdb

一、rancher部署

使用镜像:influxdb:latest

映射端口:

TCP 28086:8086
 
UDP 28089:8089
 
UDP 25826:25826

 

挂载卷:

/home/work/influxdb-prom/etc/:/etc/influxdb/
/home/work/influxdb-prom/data/:/var/lib/influxdb
/usr/share/collectd/types.db:/usr/share/collectd/types.db

 

配置文件:

influxdb.conf
reporting-disabled = false
bind-address = ":8088"
 
[meta]
  dir = "/var/lib/influxdb/meta"
  retention-autocreate = true
  logging-enabled = true
 
[data]
  dir = "/var/lib/influxdb/data"
  wal-dir = "/var/lib/influxdb/wal"
  query-log-enabled = true
  cache-max-memory-size = 1073741824
  cache-snapshot-memory-size = 26214400
  cache-snapshot-write-cold-duration = "10m0s"
  compact-full-write-cold-duration = "4h0m0s"
  max-series-per-database = 1000000
  max-values-per-tag = 100000
  trace-logging-enabled = false
 
[coordinator]
  write-timeout = "10s"
  max-concurrent-queries = 0
  query-timeout = "0s"
  log-queries-after = "0s"
  max-select-point = 0
  max-select-series = 0
  max-select-buckets = 0
 
[retention]
  enabled = true
  check-interval = "30m0s"
 
[shard-precreation]
  enabled = true
  check-interval = "10m0s"
  advance-period = "30m0s"
 
[admin]
  enabled = true
  bind-address = ":8083"
  https-enabled = false
  https-certificate = "/etc/ssl/influxdb.pem"
 
[monitor]
  store-enabled = true
  store-database = "_internal"
  store-interval = "10s"
 
[subscriber]
  enabled = true
  http-timeout = "30s"
  insecure-skip-verify = false
  ca-certs = ""
  write-concurrency = 40
  write-buffer-size = 1000
 
[http]
  enabled = true
  bind-address = ":8086"
  auth-enabled = false
  log-enabled = false
  write-tracing = false
  pprof-enabled = true
  https-enabled = false
  https-certificate = "/etc/ssl/influxdb.pem"
  https-private-key = ""
  max-row-limit = 0
  max-connection-limit = 0
  shared-secret = ""
  realm = "InfluxDB"
  unix-socket-enabled = false
  bind-socket = "/var/run/influxdb.sock"
 
[[graphite]]
  enabled = false
  bind-address = ":2003"
  database = "graphite"
  retention-policy = ""
  protocol = "tcp"
  batch-size = 5000
  batch-pending = 10
  batch-timeout = "1s"
  consistency-level = "one"
  separator = "."
  udp-read-buffer = 0
 
[[collectd]]
  enabled = true
  bind-address = ":25826"
  database = "collectd"
  typesdb = "/usr/share/collectd/types.db"
  retention-policy = "default"
#  batch-size = 5000
#  batch-pending = 10
#  batch-timeout = "10s"
#  read-buffer = 0
#  security-level = "none"
#  auth-file = "/etc/collectd/auth_file"
 
[[opentsdb]]
  enabled = false
  bind-address = ":4242"
  database = "opentsdb"
  retention-policy = ""
  consistency-level = "one"
  tls-enabled = false
  certificate = "/etc/ssl/influxdb.pem"
  batch-size = 1000
  batch-pending = 5
  batch-timeout = "1s"
  log-point-errors = true
 
[[udp]]
  enabled = true
  bind-address = ":8089"
  database = "udp"
  retention-policy = ""
  batch-size = 5000
  batch-pending = 10
  read-buffer = 0
  batch-timeout = "1s"
  precision = ""
 
[continuous_queries]
  log-enabled = true
  enabled = true
  run-interval = "1s"

部署机器:调度

调度
monitor=true

 

数据库初始化:

初始化数据库

CREATE DATABASE "prometheus" WITH DURATION 15d SHARD DURATION 1d NAME "prometheus"

posted on 2020-07-06 20:35  一木浮生  阅读(377)  评论(0编辑  收藏  举报

导航