0

i tried create system metric dashboard

my plan is...

fluent-bit > fluentd > mongod

all is on my google-cloud-platform (compute engine)

fluent-bit > fluentd > stdout <---- is very well work

and i used fluent-plugin-mongo

/etc/td-agent/td-agent.conf:

<source>
  @type forward
  bind 0.0.0.0
  port 24224
</source>

<match jhleeeme-gce.bit.system.*>
  @type mongo
  host localhost
  port 27017
  user myUser
  password myPassword

#  <buffer>
#    # flush
#    flush_interval 10s
#  </buffer>
  # db
  database system_metric_db

  # collection
  # Set 'tag_mapped' if you want to use tag mapped mode.
  tag_mapped

  # If tag is "forward.foo.bar", then prefix "forward." is removed.
  # Collection name to insert is "foo.bar".
  remove_tag_prefix jhleeeme-gce.bit.system.

  # Set 'capped' if you want to use capped collection
  capped
  capped_size 50m

 # <inject>
 #   # key name of timestamp
 #   # default: time
 #   time_key time
 # </inject>
  collection untagged

</match>
Nicholas K
  • 15,148
  • 7
  • 31
  • 57
이정환
  • 1
  • 1
  • Are you getting an error message? Could you share it with us? – Soni Sol Feb 15 '20 at 02:15
  • I found the permission error message. My mongodb-user cannot create a database But my mongodb-user created a database in mongo-shell... The collection was created in the System.admin database. ......... In the end, I decided to use influxDB. Thank you @José Soní – 이정환 Feb 19 '20 at 13:49

0 Answers0