편집하다

편집하다

다음 collectd인스턴스가 파일에서 실행 중이고 influx.conf모든 것이 정상입니다. 하지만 이제 기존 인스턴스와 완전히 격리된 다른 인스턴스를 설정하고 싶습니다. 어떻게 해야 합니까? influx.conf파일에서 다음을 수행 할 수 있나요 ?

[[collectd]]
  enabled = true
  bind-address = "0.0.0.0:8096"
  database = "database-1"

[[collectd]]
  enabled = true
  bind-address = "0.0.0.0:8097"
  database = "database-2"

답변1

~에 따르면문서, 위에서 지정한 대로 여러 CollectD 입력 인스턴스를 사용할 수 있어야 합니다.

편집하다

구성이 누락되었으며 security-level추가 옵션이 있을 수 있습니다.

run: invalid collectd config: Invalid security level. To generate a valid configuration file run `influxd config > influxdb.generated.conf`

collectd이는 다음과 같이 구성된 3개의 인스턴스에서도 효과적이었습니다 .

[[collectd]]
  enabled = true 
  bind-address = ":25826"
  database = "collectd-1"
  retention-policy = ""
  batch-size = 5000
  batch-pending = 10
  batch-timeout = "10s"
  read-buffer = 0
  typesdb = "/usr/share/collectd/types.db"
  security-level = "none"
  auth-file = "/etc/collectd/auth_file"
  parse-multivalue-plugin = "split"

[[collectd]]
  enabled = true
  bind-address = ":25827"
  database = "collectd-2"
  retention-policy = ""
  batch-size = 5000
  batch-pending = 10
  batch-timeout = "10s"
  read-buffer = 0
  typesdb = "/usr/share/collectd/types.db"
  security-level = "none"
  auth-file = "/etc/collectd/auth_file"
  parse-multivalue-plugin = "split"

[[collectd]]
  enabled = true
  bind-address = ":25828"
  database = "collectd-3"
  retention-policy = ""
  batch-size = 5000
  batch-pending = 10
  batch-timeout = "10s"
  read-buffer = 0
  typesdb = "/usr/share/collectd/types.db"
  security-level = "none"
  auth-file = "/etc/collectd/auth_file"
  parse-multivalue-plugin = "split"
$ docker run -p 8086:8086 -v $PWD/influxdb.conf:/etc/influxdb/influxdb.conf:ro -v $PWD/types.db:/usr/share/collectd/types.db influxdb -config /etc/influxdb/influxdb.conf
[...]
ts=2019-08-20T14:23:49.750638Z lvl=info msg="Starting collectd service" log_id=0HNrR~ZG000 service=collectd
ts=2019-08-20T14:23:49.750653Z lvl=info msg="Loading types from file" log_id=0HNrR~ZG000 service=collectd path=/usr/share/collectd/types.db
ts=2019-08-20T14:23:49.754041Z lvl=info msg="Listening on UDP" log_id=0HNrR~ZG000 service=collectd addr=[::]:25826
ts=2019-08-20T14:23:49.754405Z lvl=info msg="Starting collectd service" log_id=0HNrR~ZG000 service=collectd
ts=2019-08-20T14:23:49.754436Z lvl=info msg="Loading types from file" log_id=0HNrR~ZG000 service=collectd path=/usr/share/collectd/types.db
ts=2019-08-20T14:23:49.759837Z lvl=info msg="Listening on UDP" log_id=0HNrR~ZG000 service=collectd addr=[::]:25827
ts=2019-08-20T14:23:49.760296Z lvl=info msg="Starting collectd service" log_id=0HNrR~ZG000 service=collectd
ts=2019-08-20T14:23:49.760321Z lvl=info msg="Loading types from file" log_id=0HNrR~ZG000 service=collectd path=/usr/share/collectd/types.db
ts=2019-08-20T14:23:49.763582Z lvl=info msg="Listening on UDP" log_id=0HNrR~ZG000 service=collectd addr=[::]:25828
ts=2019-08-20T14:23:49.764035Z lvl=info msg="Sending usage statistics to usage.influxdata.com" log_id=0HNrR~ZG000
ts=2019-08-20T14:23:49.764091Z lvl=info msg="Listening for signals" log_id=0HNrR~ZG000

관련 정보