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

Sink error result to metricsServer not working #263

Closed
dzy176 opened this issue Apr 25, 2024 · 1 comment
Closed

Sink error result to metricsServer not working #263

dzy176 opened this issue Apr 25, 2024 · 1 comment

Comments

@dzy176
Copy link
Contributor

dzy176 commented Apr 25, 2024

https://github.com/alibaba/kubeskoop/blob/2e79815afe27463313ca73f44e789ea97414cc19/pkg/exporter/cmd/server.go#L299C1-L314C1

In our case, we use serveral sinks config, like:

...
      sinks:
      - name: kafka
        args:
          addr: ...
          topic: ...
      - name: elasticsearch
        args:
          addr: ...
          index: ...

if something wrong with kafka, when we start exporter, the whole metricServer will stop.

12607B89-CB90-44FE-A92F-A94EF214C3DF

I think it's better to record the err log instead of return. Because the second sink we used is valid, we hope events push to elasticsearch.

		//sink
		sinks, err := createSink(cfg.EventConfig.EventSinks)
		if err != nil {
			log.Errorf("failed create sinks, err: %v", err)
			return
		}
@dzy176
Copy link
Contributor Author

dzy176 commented Apr 25, 2024

#264

@BSWANG BSWANG closed this as completed Apr 25, 2024
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