Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spec.es.type not working in Output.logging.kubesphere.io/v1alpha2 #4395

Closed
LQBing opened this issue Oct 26, 2021 · 1 comment
Closed

spec.es.type not working in Output.logging.kubesphere.io/v1alpha2 #4395

LQBing opened this issue Oct 26, 2021 · 1 comment

Comments

@LQBing
Copy link
Contributor

LQBing commented Oct 26, 2021

Describe the Bug

I just wanna output log into my external ES with _type as doc not the default value _doc.

Refer to the es output plugin document , I create an Output.logging.kubesphere.io/v1alpha2 custom resource with spec.es.type value as "doc".

But, after the Output.logging.kubesphere.io/v1alpha2 custom resource apply, the flunent-bit pod print warn log [ warn] net_tcp_fd_connect: getaddrinfo(host='doc'): Name or service not known and output log not appear in my extrnal ES.

Versions Used
KubeSphere: v3.1.0
Kubernetes:

Environment
How many nodes and their hardware configuration:

For example: CentOS 7.5 / 3 masters: 8cpu/8g; 3 nodes: 8cpu/16g
(and other info are welcomed to help us debugging)

How To Reproduce
Steps to reproduce the behavior:

  1. Install kubesphere
  2. Install logging feature and config with extrnal ES
  3. Create an Output.logging.kubesphere.io/v1alpha2 custom resource with blow yaml file:
apiVersion: logging.kubesphere.io/v1alpha2
kind: Output
metadata:
  labels:
    logging.kubesphere.io/component: nginx
    logging.kubesphere.io/enabled: 'true'
  name: es-nginx
  namespace: kubesphere-logging-system
spec:
  es:
    type: "doc"
    host: "xxx.xxx.xxx.xxx"
    logstashFormat: true
    logstashPrefix: ks-mycluster-nginx
    port: 9200
    timeKey: '@timestamp'
  match: nginx
  1. Check the fluent-bit log, my fluent-bit log like blow:
2021-10-26T14:27:38.732020409+08:00 [2021/10/26 06:27:38] [ warn] net_tcp_fd_connect: getaddrinfo(host='doc'): Name or service not known

2021-10-26T14:27:38.732589157+08:00 [2021/10/26 06:27:38] [error] [src/flb_http_client.c:1120 errno=32] Broken pipe

2021-10-26T14:27:38.732599446+08:00 [2021/10/26 06:27:38] [ warn] [output:es:es.2] http_do=-1 URI=/_bulk

2021-10-26T14:27:38.732935277+08:00 [2021/10/26 06:27:38] [ warn] [engine] failed to flush chunk '39-1635229658.209486665.flb', retry in 6 seconds: task_id=5, input=tail.3 > output=es.2

2021-10-26T14:27:44.779557818+08:00 [2021/10/26 06:27:44] [ warn] net_tcp_fd_connect: getaddrinfo(host='doc'): Name or service not known

2021-10-26T14:27:44.779989661+08:00 [2021/10/26 06:27:44] [error] [src/flb_http_client.c:1120 errno=32] Broken pipe

2021-10-26T14:27:44.780009144+08:00 [2021/10/26 06:27:44] [ warn] [output:es:es.2] http_do=-1 URI=/_bulk

2021-10-26T14:27:44.780253761+08:00 [2021/10/26 06:27:44] [ warn] [engine] chunk '39-1635229658.209486665.flb' cannot be retried: task_id=5, input=tail.3 > output=es.2

2021-10-26T14:28:47.376303969+08:00 level=info msg="Killed Fluent Bit"

2021-10-26T14:28:47.376341498+08:00 level=info msg="Config file changed, stop Fluent Bit"

Expected behavior

I just wanna output log into my external ES with _type as doc not the default value _doc.

@dkeven
Copy link
Contributor

dkeven commented Oct 31, 2021

It's a simple mistake in the fluentbit-operator, I've created a PR fluent/fluent-operator#160 to fix this

@LQBing LQBing closed this as completed Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants