Closed sathishkumar64 closed 3 years ago
Which image do you use in kubernetes? If none of image contains fluent-plugin-mongo, you should create custom Docker image first.
Hi @cosmo0920,
I'm using fluentd:v1.3 image. And now i'm not getting error,but my logs are not shipping to mongo.
My Config Map file:
kind: ConfigMap
apiVersion: v1
data:
forward.input.conf: |-
<source>
@type tail
path /logs/*.log
pos_file /tmp/fluentd1.pos
tag *
read_from_head true
<parse>
@type json
</parse>
</source>
output.conf: |-
<match **>
@type mongo
host *****-*****.gcp.mongodb.net #Atlas mongodb cluster host
user *****
password *****
database coe-*****
collection ******-collection
port 27017
capped
capped_size 1024m
</match>
metadata:
name: fluentd-es-config
namespace: logging
And now i'm not getting error
Does this mean startup log or runtime log?
@repeatedly
I need application logs.
This is because fluent/fluentd image does not install fluent-plugin-mongo. https://github.com/fluent/fluentd-docker-image/blob/master/v1.11/debian/Dockerfile#L25
You must create fluent-plugin-mongo included image first. https://github.com/fluent/fluentd-docker-image#how-to-build-your-own-image
@operatorequals creates their image to bundle fluent-plugin-mongo and run on kubernetes: https://github.com/fluent/fluent-plugin-mongo/issues/149#issue-732134603 We can use this image.
Hi,
We are running our application in kubernetes. we want to ship containers logs to mongodb for using fluent. My config file is : <match **> @type mongo log_level info etc......
during creation of fluent we are getting following errors: error="Unknown output plugin 'mongo'. Run 'gem search -rd fluent-plugin' to find plugins". so please tell me how to install plugin in kubernetes.
Regards, Sathish