.TH promtool 1 promtool, version 2.45.4+ds (branch: debian/sid, revision: 2.45.4+ds-2) build user: team+pkg-go@tracker.debian.org build date: 20240331-15:56:05 go version: go1.22.1 platform: linux/amd64 tags: unknown "" .SH "NAME" promtool - Tooling for the Prometheus monitoring system .SH "SYNOPSIS" .TP \fBpromtool [] [ ...]\fR .SH "DESCRIPTION" Tooling for the Prometheus monitoring system. .SH "OPTIONS" .TP \fB-h, --help\fR Show context-sensitive help (also try --help-long and --help-man). .TP \fB--version\fR Show application version. .TP \fB--enable-feature=\fR Comma separated feature names to enable (only PromQL related and no-default-scrape-port). See https://prometheus.io/docs/prometheus/latest/feature_flags/ for the options and more details. .SH "COMMANDS" .SS \fBhelp [...]\fR .PP Show help. .SS \fBcheck service-discovery [] \fR .PP Perform service discovery for the given job name and report the results, including relabeling. .TP \fB--timeout=30s\fR The time to wait for discovery results. .SS \fBcheck config [] ...\fR .PP Check if the config files are valid or not. .TP \fB--syntax-only\fR Only check the config file syntax, ignoring file and content validation referenced in the config .TP \fB--lint="duplicate-rules"\fR Linting checks to apply to the rules specified in the config. Available options are: all, duplicate-rules, none. Use --lint=none to disable linting .TP \fB--lint-fatal\fR Make lint errors exit with exit code 3. .TP \fB--agent\fR Check config file for Prometheus in Agent mode. .SS \fBcheck web-config ...\fR .PP Check if the web config files are valid or not. .SS \fBcheck healthy []\fR .PP Check if the Prometheus server is healthy. .TP \fB--http.config.file=\fR HTTP client configuration file for promtool to connect to Prometheus. .TP \fB--url=http://localhost:9090\fR The URL for the Prometheus server. .SS \fBcheck ready []\fR .PP Check if the Prometheus server is ready. .TP \fB--http.config.file=\fR HTTP client configuration file for promtool to connect to Prometheus. .TP \fB--url=http://localhost:9090\fR The URL for the Prometheus server. .SS \fBcheck rules [] ...\fR .PP Check if the rule files are valid or not. .TP \fB--lint="duplicate-rules"\fR Linting checks to apply. Available options are: all, duplicate-rules, none. Use --lint=none to disable linting .TP \fB--lint-fatal\fR Make lint errors exit with exit code 3. .SS \fBcheck metrics\fR .PP Pass Prometheus metrics over stdin to lint them for consistency and correctness. examples: $ cat metrics.prom | promtool check metrics $ curl -s http://localhost:9090/metrics | promtool check metrics .SS \fBquery instant [] \fR .PP Run instant query. .TP \fB--time=TIME\fR Query evaluation time (RFC3339 or Unix timestamp). .SS \fBquery range [] \fR .PP Run range query. .TP \fB--header=HEADER\fR Extra headers to send to server. .TP \fB--start=START\fR Query range start time (RFC3339 or Unix timestamp). .TP \fB--end=END\fR Query range end time (RFC3339 or Unix timestamp). .TP \fB--step=STEP\fR Query step size (duration). .SS \fBquery series --match=MATCH [] \fR .PP Run series query. .TP \fB--match=MATCH\fR Series selector. Can be specified multiple times. .TP \fB--start=START\fR Start time (RFC3339 or Unix timestamp). .TP \fB--end=END\fR End time (RFC3339 or Unix timestamp). .SS \fBquery labels [] \fR .PP Run labels query. .TP \fB--start=START\fR Start time (RFC3339 or Unix timestamp). .TP \fB--end=END\fR End time (RFC3339 or Unix timestamp). .TP \fB--match=MATCH\fR Series selector. Can be specified multiple times. .SS \fBdebug pprof \fR .PP Fetch profiling debug information. .SS \fBdebug metrics \fR .PP Fetch metrics debug information. .SS \fBdebug all \fR .PP Fetch all debug information. .SS \fBtest rules ...\fR .PP Unit tests for rules. .SS \fBtsdb bench write [] []\fR .PP Run a write performance benchmark. .TP \fB--out="benchout"\fR Set the output path. .TP \fB--metrics=10000\fR Number of metrics to read. .TP \fB--scrapes=3000\fR Number of scrapes to simulate. .SS \fBtsdb analyze [] [] []\fR .PP Analyze churn, label pair cardinality and compaction efficiency. .TP \fB--limit=20\fR How many items to show in each list. .TP \fB--extended\fR Run extended analysis. .SS \fBtsdb list [] []\fR .PP List tsdb blocks. .TP \fB-r, --human-readable\fR Print human readable values. .SS \fBtsdb dump [] []\fR .PP Dump samples from a TSDB. .TP \fB--min-time=-9223372036854775808\fR Minimum timestamp to dump. .TP \fB--max-time=9223372036854775807\fR Maximum timestamp to dump. .TP \fB--match="{__name__=~'(?s:.*)'}"\fR Series selector. .SS \fBtsdb create-blocks-from openmetrics []\fR .PP Import samples from OpenMetrics input and produce TSDB blocks. Please refer to the storage docs for more details. .SS \fBtsdb create-blocks-from rules --start=START [] ...\fR .PP Create blocks of data for new recording rules. .TP \fB--http.config.file=\fR HTTP client configuration file for promtool to connect to Prometheus. .TP \fB--url=http://localhost:9090\fR The URL for the Prometheus API with the data where the rule will be backfilled from. .TP \fB--start=START\fR The time to start backfilling the new rule from. Must be a RFC3339 formatted date or Unix timestamp. Required. .TP \fB--end=END\fR If an end time is provided, all recording rules in the rule files provided will be backfilled to the end time. Default will backfill up to 3 hours ago. Must be a RFC3339 formatted date or Unix timestamp. .TP \fB--output-dir="data/"\fR Output directory for generated blocks. .TP \fB--eval-interval=60s\fR How frequently to evaluate rules when backfilling if a value is not set in the recording rule files.