Comments (4)
Besides using tls On
make sure not to include the protocol (https://) part in your FLUENT_ELASTICSEARCH_HOST. At least that was my issue.
from fluent-bit-kubernetes-logging.
@xncbf : I have a similar issue. Do you solve yours ?
Here is the fluent bit documentation about elasticsearch output plugin, it looks like you have the right parameters.
Here is my log output from a random fluent-bit 1.3.3 daemonset :
[2019/11/29 12:44:51] [error] [io fd=50] error sending data to: elasticsearch-es-http:9200 (Broken pipe)
[2019/11/29 12:44:51] [error] [src/flb_http_client.c:844 errno=25] Inappropriate ioctl for device
[2019/11/29 12:44:51] [ warn] [out_es] http_do=-1 URI=/_bulk
[2019/11/29 12:46:28] [error] [src/flb_http_client.c:844 errno=32] Broken pipe
[2019/11/29 12:46:28] [ warn] [out_es] http_do=-1 URI=/_bulk
[2019/11/29 12:51:40] [error] [io fd=50] error sending data to: elasticsearch-es-http:9200 (Broken pipe)
[2019/11/29 12:51:40] [error] [src/flb_http_client.c:844 errno=25] Inappropriate ioctl for device
[2019/11/29 12:51:40] [ warn] [out_es] http_do=-1 URI=/_bulk
And my conf :
output-elasticsearch.conf: |
[OUTPUT]
Name es
Match *
Host ${FLUENT_ELASTICSEARCH_HOST}
Port ${FLUENT_ELASTICSEARCH_PORT}
Logstash_Format On
Replace_Dots On
Retry_Limit False
HTTP_User ${FLUENT_ELASTICSEARCH_USER}
HTTP_Passwd ${FLUENT_ELASTICSEARCH_PASSWORD}
from fluent-bit-kubernetes-logging.
@ledroide , did you find out the solution?
I was having the same problem as you, which I fixed by enabling tls
on the output configuration.
output-elasticsearch.conf: |
[OUTPUT]
Name es
Match *
Host ${FLUENT_ELASTICSEARCH_HOST}
Port ${FLUENT_ELASTICSEARCH_PORT}
HTTP_User ${FLUENT_ELASTICSEARCH_USER}
HTTP_Passwd ${FLUENT_ELASTICSEARCH_PASSWORD}
Logstash_Format On
Replace_Dots On
Retry_Limit False
tls On
The errors stopped being logged, by I still couldn't make fluent-bit send anything to my Elasticsearch hosted on Elastic Cloud.
I'm having this output now on fluent-bit containers after adding tls:
Fluent Bit v1.3.11
Copyright (C) Treasure Data
[2020/04/23 18:52:17] [ info] [storage] version=1.0.3, initializing...
[2020/04/23 18:52:17] [ info] [storage] in-memory
[2020/04/23 18:52:17] [ info] [storage] normal synchronization mode, checksum disabled, max_chunks_up=128
[2020/04/23 18:52:17] [ info] [engine] started (pid=1)
[2020/04/23 18:52:17] [ info] [filter_kube] https=1 host=kubernetes.default.svc port=443
[2020/04/23 18:52:17] [ info] [filter_kube] local POD info OK
[2020/04/23 18:52:17] [ info] [filter_kube] testing connectivity with API server...
[2020/04/23 18:52:17] [ info] [filter_kube] API server connectivity OK
[2020/04/23 18:52:17] [ info] [http_server] listen iface=0.0.0.0 tcp_port=2020
[2020/04/23 18:52:17] [ info] [sp] stream processor started
UPDATE
Actually the logs are working for me now.
The only thing left for me was to create the Index Pattern in Kibana, so I could visualize the logs. I created a Index Pattern for logstash-*
, and can see the logs now. But I don't why exactly they are being created in that index, since the default is fluentbit
.
But I also think @ledroide 's problem is not http, as I said before. I tested and it also worked.
from fluent-bit-kubernetes-logging.
Change the following to solve the problem
fluent-bit-configmap.yaml
output-elasticsearch.conf: |
[OUTPUT]
Name es
Match *
Host ${FLUENT_ELASTICSEARCH_HOST}
Port ${FLUENT_ELASTICSEARCH_PORT}
HTTP_User ${FLUENT_ELASTICSEARCH_USER}
HTTP_Passwd ${FLUENT_ELASTICSEARCH_PASSWORD}
Logstash_Format On
Logstash_Prefix k8s-fluentbit
Replace_Dots On
Retry_Limit False
tls On
tls.verify Off
Type flb
fluent-bit-ds.yaml
env:
- name: FLUENT_ELASTICSEARCH_HOST
value: "elastic-es-http.logging.svc"
- name: FLUENT_ELASTICSEARCH_PORT
value: "9200"
- name: FLUENT_ELASTICSEARCH_SCHEME
value: "https"
- name: FLUENT_ELASTICSEARCH_USER
value: "elastic"
- name: FLUENT_ELASTICSEARCH_PASSWORD
value: "*****"
from fluent-bit-kubernetes-logging.
Related Issues (20)
- fluent-bit kafka data pipeline is not working. HOT 2
- How to configure multiple targets in fluent-bit
- Add Archive notice HOT 1
- Add how to uninstall to readme
- Not able to access fluent-bit metrics
- Readme is repetitive
- Need to include `LICENSE` on this repo HOT 2
- No matches for kind "DaemonSet" in version "extensions/v1beta1" HOT 2
- Missing required field "selector" in DaemonSet spec for Elasticsearch HOT 2
- Critical security issues with sqllite 3.31.0 on latest fluentbit release (v1.5.4) HOT 1
- k8s日志落盘打到kafka可以自定义topic变量吗 HOT 1
- Anyone using this one to send over to cloudwatch? HOT 1
- v1.6.7 seems to have broken Kubernetes API connection HOT 1
- Support CoreOS? HOT 4
- for containerd/cri please include note about /var/lib dir HOT 1
- fluent-bit: error while loading shared libraries: librdkafka.so
- Installation fails on k8s 1.22 HOT 1
- extra line in fluent-bit role file for 1.22 HOT 1
- Question - how to apply python multiline exceptions
- [error] [sqldb] cannot open database /var/log/flb_kube.db HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluent-bit-kubernetes-logging.