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

--source=和--sink=后面怎么一次性加多个源? #247

Closed
wgngoo opened this issue Oct 9, 2022 · 3 comments
Closed

--source=和--sink=后面怎么一次性加多个源? #247

wgngoo opened this issue Oct 9, 2022 · 3 comments

Comments

@wgngoo
Copy link

wgngoo commented Oct 9, 2022

.e.g,dingtalk sink demo

  • --sink=dingtalk:[your_webhook_url]&label=[your_cluster_id]&level=[Normal or Warning(default)]
    --source=和--sink=后面怎么一次性加多个源?
@wolgod
Copy link

wolgod commented Oct 28, 2022

i also want‘t to know

@wanggithub08
Copy link

sink应该是数组,亲测多个sink好使

@Shuimo03
Copy link

Shuimo03 commented Apr 7, 2023

可以看下初始化这一段代码: kube-eventer/eventer.go

var (
	argFrequency    = flag.Duration("frequency", 30*time.Second, "The resolution at which Eventer pushes events to sinks")
	argMaxProcs     = flag.Int("max_procs", 0, "max number of CPUs that can be used simultaneously. Less than 1 for default (number of cores)")
	argSources      flags.Uris
	argSinks        flags.Uris
	argVersion      bool
	argEventMetrics bool
	argHealthzIP    = flag.String("healthz-ip", "0.0.0.0", "ip eventer health check service uses")
	argHealthzPort  = flag.Uint("healthz-port", 8084, "port eventer health check listens on")
)

flag.Var(&argSources, "source", "source(s) to read events from")
	flag.Var(&argSinks, "sink", "external sink(s) that receive events")
	flag.BoolVar(&argVersion, "version", false, "print version info and exit")
	flag.BoolVar(&argEventMetrics, "event-metrics", true, "whether to collect and export event metrics")
	flag.Parse()

uri都是slice,所以是可以添加多个source和sinks

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

5 participants