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

Commit 751ae46

Browse files
committed
./scripts/dev/tools-to-doc.sh > docs/tools.md
1 parent 3e02874 commit 751ae46

File tree

1 file changed

+15
-80
lines changed

1 file changed

+15
-80
lines changed

docs/tools.md

+15-80
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,10 @@ Flags:
182182
183183
-config string
184184
configuration file path (default "/etc/metrictank/metrictank.ini")
185-
-format string
186-
template to render the data with (default "{{.Part}} {{.OrgId}} {{.Id}} {{.Name}} {{.Metric}} {{.Interval}} {{.Value}} {{.Time}} {{.Unit}} {{.Mtype}} {{.Tags}}")
185+
-format-md string
186+
template to render MetricData with (default "{{.Part}} {{.OrgId}} {{.Id}} {{.Name}} {{.Interval}} {{.Value}} {{.Time}} {{.Unit}} {{.Mtype}} {{.Tags}}")
187+
-format-point string
188+
template to render MetricPoint data with (default "{{.Part}} {{.MKey}} {{.Value}} {{.Time}}")
187189
-prefix string
188190
only show metrics that have this prefix
189191
-substr string
@@ -202,56 +204,35 @@ Inspects what's flowing through kafka (in mdm format) and reports out of order d
202204
* it sniffs points being added on a per-series (metric Id) level
203205
* for every series, tracks the last 'correct' point. E.g. a point that was able to be added to the series because its timestamp is higher than any previous timestamp
204206
* if for any series, a point comes in with a timestamp equal or lower than the last point correct point - which metrictank would not add unless it falls within the reorder buffer - it triggers an event for this out-of-order point
205-
every event is printed using the specified format
207+
every event is printed using the specified, respective format based on the message format
206208
207209
# Event formatting
208210
Uses standard golang templating. E.g. {{field}} with these available fields:
209-
.Head.subfield - head is last successfully added message
210-
.Bad.subfield - Bad is the current point that could not be added (assuming no re-order buffer)
211-
(subfield is any property of the out-of-order MetricData: Time OrgId Id Name Metric Interval Value Unit Mtype Tags and also these 2 extra fileds: Part (partition) and Seen (when the msg was consumed from kafka)
212211
NumBad - number of failed points since last successful add
213212
DeltaTime - delta between Head and Bad time properties in seconds (point timestamps)
214213
DeltaSeen - delta between Head and Bad seen time in seconds (consumed from kafka)
214+
.Head.* - head is last successfully added message
215+
.Bad.* - Bad is the current point that could not be added (assuming no re-order buffer)
216+
under Head and Bad, the following subfields are available:
217+
Part (partition) and Seen (when the msg was consumed from kafka)
218+
for MetricData, prefix these with Md. : Time OrgId Id Name Metric Interval Value Unit Mtype Tags
219+
for MetricPoint, prefix these with Mp. : Time MKey Value
215220
216221
Flags:
217222
218223
-config string
219224
configuration file path (default "/etc/metrictank/metrictank.ini")
225+
-do-unknown-mp
226+
process MetricPoint messages for which no MetricData messages have been seen, and hence for which we can't apply prefix/substr filter (default true)
220227
-format string
221-
template to render event with (default "{{.Bad.Id}} {{.Bad.Name}} {{.DeltaTime}} {{.DeltaSeen}} {{.NumBad}}")
228+
template to render event with (default "{{.Bad.Md.Id}} {{.Bad.Md.Name}} {{.Bad.Mp.MKey}} {{.DeltaTime}} {{.DeltaSeen}} {{.NumBad}}")
222229
-prefix string
223230
only show metrics with a name that has this prefix
224231
-substr string
225232
only show metrics with a name that has this substring
226233
```
227234

228235

229-
## mt-replicator-via-tsdb
230-
231-
```
232-
mt-replicator-via-tsdb
233-
234-
Replicates a kafka mdm topic on a given cluster to a remote tsdb-gw server
235-
236-
Flags:
237-
238-
-batch-size int
239-
number of metrics to send in each batch. (default 10000)
240-
-config string
241-
configuration file path
242-
-destination-key string
243-
admin-key of destination tsdb-gw server (default "admin-key")
244-
-destination-url string
245-
tsdb-gw address to send metrics to (default "http://localhost/metrics")
246-
-instance string
247-
instance identifier. must be unique. Used for naming queue consumers and emitted metrics (default "default")
248-
-log-level int
249-
log level. 0=TRACE|1=DEBUG|2=INFO|3=WARN|4=ERROR|5=CRITICAL|6=FATAL (default 2)
250-
-version
251-
print version string
252-
```
253-
254-
255236
## mt-schemas-explain
256237

257238
```
@@ -441,7 +422,7 @@ Notes:
441422
With great power comes great responsibility
442423
* points that are not in the `from <= ts < to` range, are prefixed with `-`. In range has prefix of '>`
443424
* When using chunk-summary, if there's data that should have been expired by cassandra, but for some reason didn't, we won't see or report it
444-
* Doesn't automatically return data for aggregated series. It's up to you to query for id_<rollup>_<span> when appropriate
425+
* Doesn't automatically return data for aggregated series. It's up to you to query for an AMKey (id_<rollup>_<span>) when appropriate
445426
* (rollup is one of sum, cnt, lst, max, min and span is a number in seconds)
446427
```
447428

@@ -534,52 +515,6 @@ Usage of ./mt-whisper-importer-reader:
534515
Organization ID the data belongs to (default 1)
535516
-position-file string
536517
file to store position and load position from
537-
-test.bench regexp
538-
run only benchmarks matching regexp
539-
-test.benchmem
540-
print memory allocations for benchmarks
541-
-test.benchtime d
542-
run each benchmark for duration d (default 1s)
543-
-test.blockprofile file
544-
write a goroutine blocking profile to file
545-
-test.blockprofilerate rate
546-
set blocking profile rate (see runtime.SetBlockProfileRate) (default 1)
547-
-test.count n
548-
run tests and benchmarks n times (default 1)
549-
-test.coverprofile file
550-
write a coverage profile to file
551-
-test.cpu list
552-
comma-separated list of cpu counts to run each test with
553-
-test.cpuprofile file
554-
write a cpu profile to file
555-
-test.failfast
556-
do not start new tests after the first test failure
557-
-test.list regexp
558-
list tests, examples, and benchmarks matching regexp then exit
559-
-test.memprofile file
560-
write a memory profile to file
561-
-test.memprofilerate rate
562-
set memory profiling rate (see runtime.MemProfileRate)
563-
-test.mutexprofile string
564-
write a mutex contention profile to the named file after execution
565-
-test.mutexprofilefraction int
566-
if >= 0, calls runtime.SetMutexProfileFraction() (default 1)
567-
-test.outputdir dir
568-
write profiles to dir
569-
-test.parallel n
570-
run at most n tests in parallel (default num-processors)
571-
-test.run regexp
572-
run only tests and examples matching regexp
573-
-test.short
574-
run smaller test suite to save time
575-
-test.testlogfile file
576-
write test action log to file (for use only by cmd/go)
577-
-test.timeout d
578-
panic test binary after duration d (default 0, timeout disabled)
579-
-test.trace file
580-
write an execution trace to file
581-
-test.v
582-
verbose: print additional output
583518
-threads int
584519
Number of workers threads to process and convert .wsp files (default 10)
585520
-verbose

0 commit comments

Comments
 (0)