You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.
Hi @Dieterbe ,
i've started to look into grafana/carbon-relay-ng#442 and the first issue i've found was that the publisher is configured via flags.
carbon-relay-ng has to instantiate multiple instances of the publisher (one per route) with different configs, since flags are globally this is no option here.
I would suggest to implement a second "New" function which allows passing the parameters:
func NewWithOptions(brokers []string, topic, codecOption, partitionSchemes, schemaFile, kafkaVersionString string, onlyOrgIdsOption []int64, flushFrequency, clearInterval time.Duration, producerMaxMessages int, useV2, encodeOrgID, autoInterval bool) *mtPublisher {
enabled = true // enable metric publishing
topicsStr = topic // set topic
onlyOrgIds = onlyOrgIdsOption // restrict publishing data belonging to org id; 0 means no restriction (may be given multiple times, once per topic specified in 'metrics-topic', as a comma-separated list)
codec = codecOption // "compression: none|gzip|snappy"
partitionSchemesStr = partitionSchemes // method used for partitioning metrics. (byOrg|bySeries|bySeriesWithTags|bySeriesWithTagsFnv) (may be given multiple times, once per topic, as a comma-separated list)
flushFreq = flushFrequency // The best-effort frequency of flushes to kafka
maxMessages = producerMaxMessages // The maximum number of messages the producer will send in a single request
schemasConf = schemaFile // path to carbon storage-schemas.conf file
v2 = useV2 // enable optimized MetricPoint payload
v2Org = encodeOrgID // encode org-id in messages
v2ClearInterval = clearInterval // interval after which we always resend a full MetricData
kafkaVersionStr = kafkaVersionString // Kafka version in semver format. All brokers must be this version or newer.
return New(brokers, autoInterval)
}
have a look at some of the other plugins, for example store/cassandra/config.go. note how it has a config struct, you can create a cliconfig and register flags on it, but also build a config however you like (e.g. externally)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi @Dieterbe ,
i've started to look into grafana/carbon-relay-ng#442 and the first issue i've found was that the publisher is configured via flags.
carbon-relay-ng has to instantiate multiple instances of the publisher (one per route) with different configs, since flags are globally this is no option here.
I would suggest to implement a second "New" function which allows passing the parameters:
https://github.com/grafana/metrictank/blob/master/publish/kafka/publish.go
What is your opinion on this?
The text was updated successfully, but these errors were encountered: