Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Commit 63bc54d

Browse files
committed
update docs to reflect updated arguments syntax
1 parent 2ae1b8c commit 63bc54d

File tree

2 files changed

+116
-45
lines changed

2 files changed

+116
-45
lines changed

cmd/mt-whisper-importer-writer/main.go

+12-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import (
99
"time"
1010

1111
"github.com/grafana/metrictank/mdata"
12+
bigTableStore "github.com/grafana/metrictank/store/bigtable"
13+
cassandraStore "github.com/grafana/metrictank/store/cassandra"
1214

1315
"github.com/grafana/metrictank/cluster"
1416
"github.com/grafana/metrictank/cluster/partitioner"
@@ -96,10 +98,18 @@ func main() {
9698
fmt.Printf("global config flags:\n\n")
9799
globalFlags.PrintDefaults()
98100
fmt.Println()
101+
fmt.Printf("storetype: only 'cass' and 'bt' supported\n\n")
102+
fmt.Printf("cass store config flags:\n\n")
103+
cassandraStore.ConfigSetup().PrintDefaults()
104+
fmt.Println()
105+
fmt.Printf("bt store config flags:\n\n")
106+
bigTableStore.ConfigSetup().PrintDefaults()
107+
fmt.Println()
99108
fmt.Printf("idxtype: only 'cass' and 'bt' supported\n\n")
100-
fmt.Printf("cass config flags:\n\n")
109+
fmt.Printf("cass index config flags:\n\n")
101110
cassandra.ConfigSetup().PrintDefaults()
102-
fmt.Printf("bt config flags:\n\n")
111+
fmt.Println()
112+
fmt.Printf("bt index config flags:\n\n")
103113
bigtable.ConfigSetup().PrintDefaults()
104114
fmt.Println()
105115
fmt.Println("EXAMPLES:")

docs/tools.md

+104-43
Original file line numberDiff line numberDiff line change
@@ -708,72 +708,108 @@ Opens an endpoint to send data to, which then gets stored in the MT internal DB(
708708
709709
Usage:
710710
711-
mt-whisper-importer-writer [global config flags] <idxtype> [idx config flags]
711+
mt-whisper-importer-writer [global config flags] <storetype> [store config flags] <idxtype> [idx config flags]
712712
713713
global config flags:
714714
715-
-cassandra-addrs string
715+
-exit-on-error
716+
Exit with a message when there's an error (default true)
717+
-http-endpoint string
718+
The http endpoint to listen on (default "127.0.0.1:8080")
719+
-num-partitions int
720+
Number of Partitions (default 1)
721+
-partition-scheme string
722+
method used for partitioning metrics. This should match the settings of tsdb-gw. (byOrg|bySeries) (default "bySeries")
723+
-schemas-file string
724+
path to storage-schemas.conf file (default "/etc/metrictank/storage-schemas.conf")
725+
-ttls string
726+
list of ttl strings used by MT separated by ',' (default "35d")
727+
-uri-path string
728+
the URI on which we expect chunks to get posted (default "/chunks")
729+
-verbose
730+
More detailed logging
731+
732+
storetype: only 'cass' and 'bt' supported
733+
734+
cass store config flags:
735+
736+
-addrs string
716737
cassandra host (may be given multiple times as comma-separated list) (default "localhost")
717-
-cassandra-auth
738+
-auth
718739
enable cassandra authentication
719-
-cassandra-ca-path string
740+
-ca-path string
720741
cassandra CA certificate path when using SSL (default "/etc/metrictank/ca.pem")
721-
-cassandra-consistency string
742+
-consistency string
722743
write consistency (any|one|two|three|quorum|all|local_quorum|each_quorum|local_one (default "one")
723-
-cassandra-create-keyspace
744+
-cql-protocol-version int
745+
cql protocol version to use (default 4)
746+
-create-keyspace
724747
enable the creation of the mdata keyspace and tables, only one node needs this (default true)
725-
-cassandra-disable-initial-host-lookup
748+
-disable-initial-host-lookup
726749
instruct the driver to not attempt to get host info from the system.peers table
727-
-cassandra-host-selection-policy string
750+
-enabled
751+
enable the cassandra backend store plugin (default true)
752+
-host-selection-policy string
728753
(default "tokenaware,hostpool-epsilon-greedy")
729-
-cassandra-host-verification
754+
-host-verification
730755
host (hostname and server cert) verification when using SSL (default true)
731-
-cassandra-keyspace string
756+
-keyspace string
732757
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
758+
-omit-read-timeout string
759+
if a read is older than this, it will be omitted, not executed (default "60s")
760+
-password string
736761
password for authentication (default "cassandra")
737-
-cassandra-read-concurrency int
762+
-read-concurrency int
738763
max number of concurrent reads to cassandra. (default 20)
739-
-cassandra-read-queue-size int
764+
-read-queue-size int
740765
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
766+
-retries int
742767
how many times to retry a query before failing it
743-
-cassandra-schema-file string
768+
-schema-file string
744769
File containing the needed schemas in case database needs initializing (default "/etc/metrictank/schema-store-cassandra.toml")
745-
-cassandra-ssl
770+
-ssl
746771
enable SSL connection to cassandra
747-
-cassandra-timeout string
772+
-timeout string
748773
cassandra timeout (default "1s")
749-
-cassandra-username string
774+
-username string
750775
username for authentication (default "cassandra")
751-
-cassandra-window-factor int
776+
-window-factor int
752777
size of compaction window relative to TTL (default 20)
753-
-cassandra-write-concurrency int
778+
-write-concurrency int
754779
max number of concurrent writes to cassandra. (default 10)
755-
-cql-protocol-version int
756-
cql protocol version to use (default 4)
757-
-exit-on-error
758-
Exit with a message when there's an error (default true)
759-
-http-endpoint string
760-
The http endpoint to listen on (default "127.0.0.1:8080")
761-
-num-partitions int
762-
Number of Partitions (default 1)
763-
-overwrite-chunks
764-
If true existing chunks may be overwritten (default true)
765-
-partition-scheme string
766-
method used for partitioning metrics. This should match the settings of tsdb-gw. (byOrg|bySeries) (default "bySeries")
767-
-ttls string
768-
list of ttl strings used by MT separated by ',' (default "35d")
769-
-uri-path string
770-
the URI on which we expect chunks to get posted (default "/chunks")
771-
-verbose
772-
More detailed logging
780+
-write-queue-size int
781+
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 (default 100000)
773782
774-
idxtype: only 'cass' supported for now
783+
bt store config flags:
775784
776-
cass config flags:
785+
-bigtable-instance string
786+
Name of bigtable instance (default "default")
787+
-create-cf
788+
enable the creation of the table and column families (default true)
789+
-enabled
790+
enable the bigtable backend store plugin
791+
-gcp-project string
792+
Name of GCP project the bigtable cluster resides in (default "default")
793+
-max-chunkspan duration
794+
Maximum chunkspan size used. (default 6h0m0s)
795+
-read-concurrency int
796+
Number concurrent reads that can be processed (default 20)
797+
-read-timeout duration
798+
read timeout (default 5s)
799+
-table-name string
800+
Name of bigtable table used for chunks (default "metrics")
801+
-write-concurrency int
802+
Number of writer threads to use. (default 10)
803+
-write-max-flush-size int
804+
Max number of chunks in each batch write to bigtable (default 10000)
805+
-write-queue-size int
806+
Max number of chunks, per write thread, allowed to be unwritten to bigtable. Must be larger then write-max-flush-size (default 100000)
807+
-write-timeout duration
808+
write timeout (default 5s)
809+
810+
idxtype: only 'cass' and 'bt' supported
811+
812+
cass index config flags:
777813
778814
-auth
779815
enable cassandra user authentication
@@ -818,7 +854,32 @@ cass config flags:
818854
-write-queue-size int
819855
Max number of metricDefs allowed to be unwritten to cassandra (default 100000)
820856
857+
bt index config flags:
858+
859+
-bigtable-instance string
860+
Name of bigtable instance (default "default")
861+
-create-cf
862+
enable the creation of the table and column families (default true)
863+
-enabled
864+
865+
-gcp-project string
866+
Name of GCP project the bigtable cluster resides in (default "default")
867+
-prune-interval duration
868+
Interval at which the index should be checked for stale series. (default 3h0m0s)
869+
-table-name string
870+
Name of bigtable table used for metricDefs (default "metrics")
871+
-update-bigtable-index
872+
synchronize index changes to bigtable. not all your nodes need to do this. (default true)
873+
-update-interval duration
874+
frequency at which we should update the metricDef lastUpdate field, use 0s for instant updates (default 3h0m0s)
875+
-write-concurrency int
876+
Number of writer threads to use (default 5)
877+
-write-max-flush-size int
878+
Max number of metricDefs in each batch write to bigtable (default 10000)
879+
-write-queue-size int
880+
Max number of metricDefs allowed to be unwritten to bigtable. Must be larger then write-max-flush-size (default 100000)
881+
821882
EXAMPLES:
822-
mt-whisper-importer-writer -cassandra-addrs=192.168.0.1 -cassandra-keyspace=mydata -exit-on-error=true -fake-avg-aggregates=true -http-endpoint=0.0.0.0:8080 -num-partitions=8 -partition-scheme=bySeries -ttls=8d,2y -uri-path=/chunks -verbose=true -cassandra-window-factor=20 cass -hosts=192.168.0.1:9042 -keyspace=mydata
883+
mt-whisper-importer-writer -exit-on-error=true -fake-avg-aggregates=true -http-endpoint=0.0.0.0:8080 -num-partitions=8 -partition-scheme=bySeries -ttls=8d,2y -uri-path=/chunks -verbose=true cass -addrs=192.168.0.1 -keyspace=mydata -window-factor=20 cass -hosts=192.168.0.1:9042 -keyspace=mydata
823884
```
824885

0 commit comments

Comments
 (0)