1promtool(1)                         2.32.1                         promtool(1)
2
3
4

NAME

6       promtool - Tooling for the Prometheus monitoring system
7

SYNOPSIS

9       promtool [<flags>] <command> [<args> ...]
10
11

DESCRIPTION

13       Tooling for the Prometheus monitoring system.
14

OPTIONS

16       -h, --help
17              Show  context-sensitive  help  (also try --help-long and --help-
18              man).
19
20       --version
21              Show application version.
22
23       --enable-feature=
24              Comma separated feature names to enable (only  PromQL  related).
25              See  https://prometheus.io/docs/prometheus/latest/feature_flags/
26              for the options and more details.
27

COMMANDS

29   help [<command>...]
30       Show help.
31
32   check service-discovery [<flags>] <config-file> <job>
33       Perform service discovery for the given job name  and  report  the  re‐
34       sults, including relabeling.
35
36       --timeout=30s
37              The time to wait for discovery results.
38
39   check config [<flags>] <config-files>...
40       Check if the config files are valid or not.
41
42       --agent
43              Check config file for Prometheus in Agent mode.
44
45   check web-config <web-config-files>...
46       Check if the web config files are valid or not.
47
48   check rules <rule-files>...
49       Check if the rule files are valid or not.
50
51   check metrics
52       Pass  Prometheus  metrics  over  stdin to lint them for consistency and
53       correctness.
54
55       examples:
56
57       $ cat metrics.prom | promtool check metrics
58
59       $ curl -s http://localhost:9090/metrics | promtool check metrics
60
61   query instant [<flags>] <server> <expr>
62       Run instant query.
63
64       --time=TIME
65              Query evaluation time (RFC3339 or Unix timestamp).
66
67   query range [<flags>] <server> <expr>
68       Run range query.
69
70       --header=HEADER
71              Extra headers to send to server.
72
73       --start=START
74              Query range start time (RFC3339 or Unix timestamp).
75
76       --end=END
77              Query range end time (RFC3339 or Unix timestamp).
78
79       --step=STEP
80              Query step size (duration).
81
82   query series --match=MATCH [<flags>] <server>
83       Run series query.
84
85       --match=MATCH
86              Series selector. Can be specified multiple times.
87
88       --start=START
89              Start time (RFC3339 or Unix timestamp).
90
91       --end=END
92              End time (RFC3339 or Unix timestamp).
93
94   query labels [<flags>] <server> <name>
95       Run labels query.
96
97       --start=START
98              Start time (RFC3339 or Unix timestamp).
99
100       --end=END
101              End time (RFC3339 or Unix timestamp).
102
103   debug pprof <server>
104       Fetch profiling debug information.
105
106   debug metrics <server>
107       Fetch metrics debug information.
108
109   debug all <server>
110       Fetch all debug information.
111
112   test rules <test-rule-file>...
113       Unit tests for rules.
114
115   tsdb bench write [<flags>] [<file*>]
116       Run a write performance benchmark.
117
118       --out="benchout"
119              Set the output path.
120
121       --metrics=10000
122              Number of metrics to read.
123
124       --scrapes=3000
125              Number of scrapes to simulate.
126
127   tsdb analyze [<flags>] [<db path*>] [<block id>]
128       Analyze churn, label pair cardinality and compaction efficiency.
129
130       --limit=20
131              How many items to show in each list.
132
133       --extended
134              Run extended analysis.
135
136   tsdb list [<flags>] [<db path*>]
137       List tsdb blocks.
138
139       -r, --human-readable
140              Print human readable values.
141
142   tsdb dump [<flags>] [<db path*>]
143       Dump samples from a TSDB.
144
145       --min-time=-9223372036854775808
146              Minimum timestamp to dump.
147
148       --max-time=9223372036854775807
149              Maximum timestamp to dump.
150
151   tsdb create-blocks-from openmetrics <input file> [<output directory*>]
152       Import samples from OpenMetrics input and produce TSDB  blocks.  Please
153       refer to the storage docs for more details.
154
155   tsdb create-blocks-from rules --start=START [<flags>] <rule-files>...
156       Create blocks of data for new recording rules.
157
158       --url=http://localhost:9090
159              The URL for the Prometheus API with the data where the rule will
160              be backfilled from.
161
162       --start=START
163              The time to start backfilling the  new  rule  from.  Must  be  a
164              RFC3339 formatted date or Unix timestamp. Required.
165
166       --end=END
167              If  an  end  time  is  provided, all recording rules in the rule
168              files provided will be backfilled to the end time. Default  will
169              backfill  up to 3 hours ago. Must be a RFC3339 formatted date or
170              Unix timestamp.
171
172       --output-dir="data/"
173              Output directory for generated blocks.
174
175       --eval-interval=60s
176              How frequently to evaluate rules when backfilling if a value  is
177              not set in the recording rule files.
178
179
180
181version                            promtool,                       promtool(1)
Impressum