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 was archived by the owner on Aug 23, 2023. It is now read-only.
this makes the configuration of the importer-writer consistent with the
way how MT and other MT-tools are configured. this makes sense to do now
because with the added support for the bigtable store and index the
configuration would get too complex if we'd try to come up with a way to
configure all of that via cli arguments, so its easier and more consistent
to just do it in the same way like everything else.
exitOnError=flag.Bool("exit-on-error", false, "Exit with a message when there's an error")
30
+
httpEndpoint=flag.String("http-endpoint", "127.0.0.1:8080", "The http endpoint to listen on")
31
+
ttlsStr=flag.String("ttls", "35d", "list of ttl strings used by MT separated by ','")
32
+
partitionScheme=flag.String("partition-scheme", "bySeries", "method used for partitioning metrics. This should match the settings of tsdb-gw. (byOrg|bySeries)")
33
+
uriPath=flag.String("uri-path", "/chunks", "the URI on which we expect chunks to get posted")
34
+
numPartitions=flag.Int("num-partitions", 1, "Number of Partitions")
// we don't use the cassandraStore's writeQueue, so we hard code this to 0.
85
-
storeConfig.WriteQueueSize=0
86
-
87
-
// flags from cassandra/config.go, Cassandra
88
-
globalFlags.StringVar(&storeConfig.Addrs, "cassandra-addrs", storeConfig.Addrs, "cassandra host (may be given multiple times as comma-separated list)")
89
-
globalFlags.StringVar(&storeConfig.Keyspace, "cassandra-keyspace", storeConfig.Keyspace, "cassandra keyspace to use for storing the metric data table")
globalFlags.IntVar(&storeConfig.ReadConcurrency, "cassandra-read-concurrency", storeConfig.ReadConcurrency, "max number of concurrent reads to cassandra.")
94
-
globalFlags.IntVar(&storeConfig.WriteConcurrency, "cassandra-write-concurrency", storeConfig.WriteConcurrency, "max number of concurrent writes to cassandra.")
95
-
globalFlags.IntVar(&storeConfig.ReadQueueSize, "cassandra-read-queue-size", storeConfig.ReadQueueSize, "max number of outstanding reads before reads will be dropped. This is important if you run queries that result in many reads in parallel.")
96
-
//flag.IntVar(&storeConfig.WriteQueueSize, "write-queue-size", storeConfig.WriteQueueSize, "write queue size per cassandra worker. should be large engough to hold all at least the total number of series expected, divided by how many workers you have")
97
-
globalFlags.IntVar(&storeConfig.Retries, "cassandra-retries", storeConfig.Retries, "how many times to retry a query before failing it")
98
-
globalFlags.IntVar(&storeConfig.WindowFactor, "cassandra-window-factor", storeConfig.WindowFactor, "size of compaction window relative to TTL")
99
-
globalFlags.StringVar(&storeConfig.OmitReadTimeout, "cassandra-omit-read-timeout", storeConfig.OmitReadTimeout, "if a read is older than this, it will directly be omitted without executing")
100
-
globalFlags.IntVar(&storeConfig.CqlProtocolVersion, "cql-protocol-version", storeConfig.CqlProtocolVersion, "cql protocol version to use")
101
-
globalFlags.BoolVar(&storeConfig.CreateKeyspace, "cassandra-create-keyspace", storeConfig.CreateKeyspace, "enable the creation of the mdata keyspace and tables, only one node needs this")
102
-
globalFlags.BoolVar(&storeConfig.DisableInitialHostLookup, "cassandra-disable-initial-host-lookup", storeConfig.DisableInitialHostLookup, "instruct the driver to not attempt to get host info from the system.peers table")
103
-
globalFlags.BoolVar(&storeConfig.SSL, "cassandra-ssl", storeConfig.SSL, "enable SSL connection to cassandra")
104
-
globalFlags.StringVar(&storeConfig.CaPath, "cassandra-ca-path", storeConfig.CaPath, "cassandra CA certificate path when using SSL")
105
-
globalFlags.BoolVar(&storeConfig.HostVerification, "cassandra-host-verification", storeConfig.HostVerification, "host (hostname and server cert) verification when using SSL")
globalFlags.StringVar(&storeConfig.Username, "cassandra-username", storeConfig.Username, "username for authentication")
108
-
globalFlags.StringVar(&storeConfig.Password, "cassandra-password", storeConfig.Password, "password for authentication")
109
-
globalFlags.StringVar(&storeConfig.SchemaFile, "cassandra-schema-file", storeConfig.SchemaFile, "File containing the needed schemas in case database needs initializing")
110
-
111
-
cassFlags:=cassandra.ConfigSetup()
112
-
113
-
flag.Usage=func() {
114
-
fmt.Println("mt-whisper-importer-writer")
115
-
fmt.Println()
116
-
fmt.Println("Opens an endpoint to send data to, which then gets stored in the MT internal DB(s)")
if (cassandraStore.CliConfig.Enabled&&bigTableStore.CliConfig.Enabled) ||!(cassandraStore.CliConfig.Enabled||bigTableStore.CliConfig.Enabled) {
104
+
log.Fatalf("exactly 1 backend store plugin must be enabled. cassandra: %t bigtable: %t", cassandraStore.CliConfig.Enabled, bigTableStore.CliConfig.Enabled)
105
+
}
106
+
if (cassandra.CliConfig.Enabled&&bigtable.CliConfig.Enabled) ||!(cassandra.CliConfig.Enabled||bigtable.CliConfig.Enabled) {
107
+
log.Fatalf("exactly 1 backend index plugin must be enabled. cassandra: %t bigtable: %t", cassandra.CliConfig.Enabled, bigtable.CliConfig.Enabled)
enable the creation of the mdata keyspace and tables, only one node needs this (default true)
725
-
-cassandra-disable-initial-host-lookup
726
-
instruct the driver to not attempt to get host info from the system.peers table
727
-
-cassandra-host-selection-policy string
728
-
(default "tokenaware,hostpool-epsilon-greedy")
729
-
-cassandra-host-verification
730
-
host (hostname and server cert) verification when using SSL (default true)
731
-
-cassandra-keyspace string
732
-
cassandra keyspace to use for storing the metric data table (default "metrictank")
733
-
-cassandra-omit-read-timeout string
734
-
if a read is older than this, it will directly be omitted without executing (default "60s")
735
-
-cassandra-password string
736
-
password for authentication (default "cassandra")
737
-
-cassandra-read-concurrency int
738
-
max number of concurrent reads to cassandra. (default 20)
739
-
-cassandra-read-queue-size int
740
-
max number of outstanding reads before reads will be dropped. This is important if you run queries that result in many reads in parallel. (default 200000)
741
-
-cassandra-retries int
742
-
how many times to retry a query before failing it
743
-
-cassandra-schema-file string
744
-
File containing the needed schemas in case database needs initializing (default "/etc/metrictank/schema-store-cassandra.toml")
745
-
-cassandra-ssl
746
-
enable SSL connection to cassandra
747
-
-cassandra-timeout string
748
-
cassandra timeout (default "1s")
749
-
-cassandra-username string
750
-
username for authentication (default "cassandra")
751
-
-cassandra-window-factor int
752
-
size of compaction window relative to TTL (default 20)
753
-
-cassandra-write-concurrency int
754
-
max number of concurrent writes to cassandra. (default 10)
0 commit comments