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.
Copy file name to clipboardexpand all lines: cmd/mt-split-metrics-by-ttl/main.go
+3-1
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,8 @@ var (
32
32
cassandraUsername=flag.String("cassandra-username", "cassandra", "username for authentication")
33
33
cassandraPassword=flag.String("cassandra-password", "cassandra", "password for authentication")
34
34
35
+
cassandraDisableInitialHostLookup=flag.Bool("cassandra-disable-initial-host-lookup", false, "instruct the driver to not attempt to get host info from the system.peers table")
36
+
35
37
// hard coded to default because those have no effect in the case of this tool anyway
Copy file name to clipboardexpand all lines: cmd/mt-store-cat/main.go
+3-1
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,8 @@ var (
53
53
cassandraPassword=flag.String("cassandra-password", "cassandra", "password for authentication")
54
54
cassandraOmitReadTimeout=flag.Int("cassandra-omit-read-timeout", 60, "if a read is older than this, it will directly be omitted without executing")
55
55
56
+
cassandraDisableInitialHostLookup=flag.Bool("cassandra-disable-initial-host-lookup", false, "instruct the driver to not attempt to get host info from the system.peers table")
57
+
56
58
// our own flags
57
59
from=flag.String("from", "-24h", "get data from (inclusive). only for points and points-summary format")
58
60
to=flag.String("to", "now", "get data until (exclusive). only for points and points-summary format")
Copy file name to clipboardexpand all lines: cmd/mt-update-ttl/main.go
+3
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,8 @@ var (
36
36
cassandraUsername=flag.String("cassandra-username", "cassandra", "username for authentication")
37
37
cassandraPassword=flag.String("cassandra-password", "cassandra", "password for authentication")
38
38
39
+
cassandraDisableInitialHostLookup=flag.Bool("cassandra-disable-initial-host-lookup", false, "instruct the driver to not attempt to get host info from the system.peers table")
40
+
39
41
startTs=flag.Int("start-timestamp", 0, "timestamp at which to start, defaults to 0")
40
42
endTs=flag.Int("end-timestamp", math.MaxInt32, "timestamp at which to stop, defaults to int max")
41
43
numThreads=flag.Int("threads", 1, "number of workers to use to process data")
Copy file name to clipboardexpand all lines: cmd/mt-whisper-importer-writer/main.go
+3-1
Original file line number
Diff line number
Diff line change
@@ -94,6 +94,8 @@ var (
94
94
95
95
cassandraSchemaFile=flag.String("cassandra-schema-file", "/etc/metrictank/schema-store-cassandra.toml", "File containing the needed schemas in case database needs initializing")
96
96
97
+
cassandraDisableInitialHostLookup=flag.Bool("cassandra-disable-initial-host-lookup", false, "instruct the driver to not attempt to get host info from the system.peers table")
# This config file controls which summaries are created (using which consolidation functions) for your lower-precision archives, as defined in storage-schemas.conf
2
+
# It is an extension of http://graphite.readthedocs.io/en/latest/config-carbon.html#storage-aggregation-conf
3
+
# Note:
4
+
# * This file is optional. If it is not present, we will use avg for everything
5
+
# * Anything not matched also uses avg for everything
6
+
# * xFilesFactor is not honored yet. What it is in graphite is a floating point number between 0 and 1 specifying what fraction of the previous retention level's slots must have non-null values in order to aggregate to a non-null value. The default is 0.5.
7
+
# * aggregationMethod specifies the functions used to aggregate values for the next retention level. Legal methods are avg/average, sum, min, max, and last. The default is average.
8
+
# Unlike Graphite, you can specify multiple, as it is often handy to have different summaries available depending on what analysis you need to do.
9
+
# When using multiple, the first one is used for reading. In the future, we will add capabilities to select the different archives for reading.
10
+
# * the settings configured when metrictank starts are what is applied. So you can enable or disable archives by restarting metrictank.
11
+
#
12
+
# see https://github.com/grafana/metrictank/blob/master/docs/consolidation.md for related info.
# It is an extension of http://graphite.readthedocs.io/en/latest/config-carbon.html#storage-schemas-conf
3
+
# Note:
4
+
# * You can have 0 to N sections
5
+
# * The first match wins, starting from the top. If no match found, we default to single archive of minutely points, retained for 7 days in 2h chunks
6
+
# * The patterns are unanchored regular expressions, add '^' or '$' to match the beginning or end of a pattern.
7
+
# * When running a cluster of metrictank instances, all instances should have the same agg-settings.
8
+
# * Unlike whisper (graphite), the config doesn't stick: if you restart metrictank with updated settings, then those
9
+
# will be applied. The configured rollups will be saved by primary nodes and served in responses if they are ready.
10
+
# (note in particular that if you remove archives here, we will no longer read from them)
11
+
# * Retentions must be specified in order of increasing interval and retention
12
+
# * The reorderBuffer an optional buffer that temporarily keeps data points in memory as raw data and allows insertion at random order. The specified value is how many datapoints, based on the raw interval specified in the first defined retention, should be kept before they are flushed out. This is useful if the metric producers cannot guarantee that the data will arrive in order, but it is relatively memory intensive. If you are unsure whether you need this, better leave it disabled to not waste memory.
13
+
#
14
+
# A given rule is made up of at least 3 lines: the name, regex pattern, retentions and optionally the reorder buffer size.
15
+
# The retentions line can specify multiple retention definitions. You need one or more, space separated.
16
+
#
17
+
# There are 2 formats for a single retention definition:
18
+
# 1) 'series-interval:count-of-datapoints' legacy and not easy to read
19
+
# 2) 'series-interval:retention[:chunkspan:numchunks:ready]' more friendly format with optionally 3 extra fields
20
+
#
21
+
#Series intervals and retentions are specified using the following suffixes:
22
+
#
23
+
#s - second
24
+
#m - minute
25
+
#h - hour
26
+
#d - day
27
+
#y - year
28
+
#
29
+
# The final 3 fields are specific to metrictank and if unspecified, use sane defaults.
30
+
# See https://github.com/grafana/metrictank/blob/master/docs/memory-server.md for more details
31
+
#
32
+
# chunkspan: duration of chunks. e.g. 10min, 30min, 1h, 90min...
33
+
# must be valid value as described here https://github.com/grafana/metrictank/blob/master/docs/memory-server.md#valid-chunk-spans
34
+
# Defaults to a the smallest chunkspan that can hold at least 100 points.
35
+
#
36
+
# numchunks: number of raw chunks to keep in in-memory ring buffer
37
+
# See https://github.com/grafana/metrictank/blob/master/docs/memory-server.md for details and trade-offs, especially when compared to chunk-cache
38
+
# which may be a more effective method to cache data and alleviate workload for cassandra.
39
+
# Defaults to 2
40
+
#
41
+
# ready: whether the archive is ready for querying. This is useful if you recently introduced a new archive, but it's still being populated
42
+
# so you rather query other archives, even if they don't have the retention to serve your queries
# This example has 3 retention definitions, the first and last override some default options (to use 10minutely and 2hourly chunks and only keep one of them in memory
51
+
# and the last rollup is marked as not ready yet for querying.
casIdx.IntVar(&protoVer, "protocol-version", 4, "cql protocol version to use")
89
91
casIdx.BoolVar(&createKeyspace, "create-keyspace", true, "enable the creation of the index keyspace and tables, only one node needs this")
90
92
casIdx.StringVar(&schemaFile, "schema-file", "/etc/metrictank/schema-idx-cassandra.toml", "File containing the needed schemas in case database needs initializing")
91
-
93
+
casIdx.BoolVar(&disableInitialHostLookup, "disable-initial-host-lookup", false, "instruct the driver to not attempt to get host info from the system.peers table")
92
94
casIdx.BoolVar(&ssl, "ssl", false, "enable SSL connection to cassandra")
93
95
casIdx.StringVar(&capath, "ca-path", "/etc/metrictank/ca.pem", "cassandra CA certficate path when using SSL")
94
96
casIdx.BoolVar(&hostverification, "host-verification", true, "host (hostname and server cert) verification when using SSL")
iter:=c.session.Query("SELECT id, orgid, partition, name, interval, unit, mtype, tags, lastupdate from metric_idx where partition=?", partition).Iter()
q:=fmt.Sprintf("SELECT id, orgid, partition, name, interval, unit, mtype, tags, lastupdate from metric_idx where partition in (%s)", strings.Join(placeholders, ","))
cassandraTimeout=flag.Int("cassandra-timeout", 1000, "cassandra timeout in milliseconds")
73
-
cassandraReadConcurrency=flag.Int("cassandra-read-concurrency", 20, "max number of concurrent reads to cassandra.")
74
-
cassandraWriteConcurrency=flag.Int("cassandra-write-concurrency", 10, "max number of concurrent writes to cassandra.")
75
-
cassandraReadQueueSize=flag.Int("cassandra-read-queue-size", 200000, "max number of outstanding reads before reads will be dropped. This is important if you run queries that result in many reads in parallel.")
76
-
cassandraWriteQueueSize=flag.Int("cassandra-write-queue-size", 100000, "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")
77
-
cassandraRetries=flag.Int("cassandra-retries", 0, "how many times to retry a query before failing it")
78
-
cassandraWindowFactor=flag.Int("cassandra-window-factor", 20, "size of compaction window relative to TTL")
79
-
cassandraOmitReadTimeout=flag.Int("cassandra-omit-read-timeout", 60, "if a read is older than this, it will directly be omitted without executing")
80
-
cqlProtocolVersion=flag.Int("cql-protocol-version", 4, "cql protocol version to use")
81
-
cassandraCreateKeyspace=flag.Bool("cassandra-create-keyspace", true, "enable the creation of the mdata keyspace and tables, only one node needs this")
68
+
cassandraAddrs=flag.String("cassandra-addrs", "localhost", "cassandra host (may be given multiple times as comma-separated list)")
69
+
cassandraKeyspace=flag.String("cassandra-keyspace", "metrictank", "cassandra keyspace to use for storing the metric data table")
cassandraTimeout=flag.Int("cassandra-timeout", 1000, "cassandra timeout in milliseconds")
73
+
cassandraReadConcurrency=flag.Int("cassandra-read-concurrency", 20, "max number of concurrent reads to cassandra.")
74
+
cassandraWriteConcurrency=flag.Int("cassandra-write-concurrency", 10, "max number of concurrent writes to cassandra.")
75
+
cassandraReadQueueSize=flag.Int("cassandra-read-queue-size", 200000, "max number of outstanding reads before reads will be dropped. This is important if you run queries that result in many reads in parallel.")
76
+
cassandraWriteQueueSize=flag.Int("cassandra-write-queue-size", 100000, "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")
77
+
cassandraRetries=flag.Int("cassandra-retries", 0, "how many times to retry a query before failing it")
78
+
cassandraWindowFactor=flag.Int("cassandra-window-factor", 20, "size of compaction window relative to TTL")
79
+
cassandraOmitReadTimeout=flag.Int("cassandra-omit-read-timeout", 60, "if a read is older than this, it will directly be omitted without executing")
80
+
cqlProtocolVersion=flag.Int("cql-protocol-version", 4, "cql protocol version to use")
81
+
cassandraCreateKeyspace=flag.Bool("cassandra-create-keyspace", true, "enable the creation of the mdata keyspace and tables, only one node needs this")
82
+
cassandraDisableInitialHostLookup=flag.Bool("cassandra-disable-initial-host-lookup", false, "instruct the driver to not attempt to get host info from the system.peers table")
82
83
83
84
cassandraSSL=flag.Bool("cassandra-ssl", false, "enable SSL connection to cassandra")
84
85
cassandraCaPath=flag.String("cassandra-ca-path", "/etc/metrictank/ca.pem", "cassandra CA certificate path when using SSL")
0 commit comments