CLI reference#

The sasquatch command line tool provides Telegraf configuration tools, line protocol utilities, and InfluxDB migration commands for administrators and operators.

sasquatch#

Sasquatch command-line interface.

Usage

sasquatch [OPTIONS] COMMAND [ARGS]...

Options

--version#

Show the version and exit.

help#

Show help for any command.

Usage

sasquatch help [OPTIONS] [TOPIC] [SUBTOPIC]

Arguments

TOPIC#

Optional argument

SUBTOPIC#

Optional argument

influxdb#

InfluxDB tools.

Usage

sasquatch influxdb [OPTIONS] COMMAND [ARGS]...

line-protocol#

Line protocol inspection and rewrite tools.

Usage

sasquatch influxdb line-protocol [OPTIONS] COMMAND [ARGS]...
convert-tag-to-field#

Convert a tag key and value into a string field.

Usage

sasquatch influxdb line-protocol convert-tag-to-field [OPTIONS] FILENAME
                                                      TAG_KEY

Options

-v, --verbose#

Show how many lines were modified.

-m, --measurement <measurement>#

Only convert the tag on this measurement.

Arguments

FILENAME#

Required argument

TAG_KEY#

Required argument

drop-field#

Drop a field key from a line protocol file.

Usage

sasquatch influxdb line-protocol drop-field [OPTIONS] FILENAME FIELD_KEY

Options

-v, --verbose#

Show how many lines were modified.

-m, --measurement <measurement>#

Only drop the field from this measurement.

Arguments

FILENAME#

Required argument

FIELD_KEY#

Required argument

drop-measurement#

Drop a measurement from a line protocol file.

Usage

sasquatch influxdb line-protocol drop-measurement [OPTIONS] FILENAME
                                                  MEASUREMENT_NAME

Options

-v, --verbose#

Show how many lines were modified.

Arguments

FILENAME#

Required argument

MEASUREMENT_NAME#

Required argument

drop-tag#

Drop a tag key from a line protocol file.

Usage

sasquatch influxdb line-protocol drop-tag [OPTIONS] FILENAME TAG_KEY

Options

-v, --verbose#

Show how many lines were modified.

-m, --measurement <measurement>#

Only drop the tag from this measurement.

Arguments

FILENAME#

Required argument

TAG_KEY#

Required argument

keep-measurements#

Drop all measurements except some from a line protocol file.

Usage

sasquatch influxdb line-protocol keep-measurements [OPTIONS] FILENAME
                                                   MEASUREMENT_NAMES...

Options

-v, --verbose#

Show how many lines were modified.

Arguments

FILENAME#

Required argument

MEASUREMENT_NAMES#

Required argument(s)

rename-field#

Rename a field key in a line protocol file.

Usage

sasquatch influxdb line-protocol rename-field [OPTIONS] FILENAME FIELD_KEY
                                              NEW_FIELD_KEY

Options

-v, --verbose#

Show how many lines were modified.

-m, --measurement <measurement>#

Only rename the field on this measurement.

Arguments

FILENAME#

Required argument

FIELD_KEY#

Required argument

NEW_FIELD_KEY#

Required argument

rename-measurement#

Rename a measurement in a line protocol file.

Usage

sasquatch influxdb line-protocol rename-measurement [OPTIONS] FILENAME
                                                    MEASUREMENT_NAME
                                                    NEW_MEASUREMENT_NAME

Options

-v, --verbose#

Show how many lines were modified.

Arguments

FILENAME#

Required argument

MEASUREMENT_NAME#

Required argument

NEW_MEASUREMENT_NAME#

Required argument

rename-tag#

Rename a tag key in a line protocol file.

Usage

sasquatch influxdb line-protocol rename-tag [OPTIONS] FILENAME TAG_KEY
                                            NEW_TAG_KEY

Options

-v, --verbose#

Show how many lines were modified.

-m, --measurement <measurement>#

Only rename the tag on this measurement.

Arguments

FILENAME#

Required argument

TAG_KEY#

Required argument

NEW_TAG_KEY#

Required argument

show-fields#

List measurements and unique field keys from a line protocol file.

Usage

sasquatch influxdb line-protocol show-fields [OPTIONS] FILENAME

Arguments

FILENAME#

Required argument

show-measurements#

List measurements with their tag keys and field keys.

Usage

sasquatch influxdb line-protocol show-measurements [OPTIONS] FILENAME

Arguments

FILENAME#

Required argument

show-tags#

List measurements and unique tag keys from a line protocol file.

Usage

sasquatch influxdb line-protocol show-tags [OPTIONS] FILENAME

Arguments

FILENAME#

Required argument

list-stale-measurements#

List all measurements that haven’t recieved data in a while.

Usage

sasquatch influxdb list-stale-measurements [OPTIONS]

Options

--host <host>#

Required InfluxDB host name.

--port <port>#
Default:

8086

--path <path>#
Default:

''

--username <username>#

Required InfluxDB username.

--password <password>#

Required InfluxDB password.

--database <database>#

Required Database to look in.

--retention-policy <retention_policy>#

Retention policy to query. None to query all retention policies.

--since <since>#

A measurement is stale if it has seen no data in this much time.

--log-level <log_level>#
Default:

'warning'

Options:

debug | info | warning | error | critical

--timeout <timeout>#

The time (in seconds)to wait for a response from InfluxDB for anyrequest. If this is None, then no timeout gets set on the connection. Note that this only sets a timeout on the client side, a query might continue running on the server even if this timeout is exceeded. Similarly, if the server is configured with a lower query timeout than this, the server will send an error response if that timeout is exceeded.

--ssl <ssl>#
Default:

False

migrate#

Migration workflow commands for InfluxDB backups.

Usage

sasquatch influxdb migrate [OPTIONS] COMMAND [ARGS]...
discover#

Discover TSM files for a migration run.

Usage

sasquatch influxdb migrate discover [OPTIONS]

Options

--backup-dir <backup_dir>#

Required

--database <database>#

Required

--retention <retention>#

Required

--run-dir <run_dir>#

Required New migration run directory to create.

--shard <shards>#

Shard ID to include. Repeat for multiple shards.

--all-shards#

Use all shards from the backup manifest that match the database and retention.

export#

Export discovered TSM files to line protocol.

Usage

sasquatch influxdb migrate export [OPTIONS]

Options

--run-dir <run_dir>#

Required Migration run directory containing migration-manifest.json.

--force#

Re-export files already marked exported in the manifest.

--verify#

Verify exported LP files do not contain multiline records.

import#

Import transformed line protocol files into InfluxDB.

Usage

sasquatch influxdb migrate import [OPTIONS]

Options

--run-dir <run_dir>#

Required Migration run directory containing migration-manifest.json.

--host <host>#

Required InfluxDB host name.

--port <port>#
Default:

8086

--username <username>#

InfluxDB username.

--password <password>#

InfluxDB password.

--target-database <target_database>#

Destination database for the import. Defaults to the source database recorded in the manifest.

--target-retention <target_retention>#

Destination retention policy for the import. Defaults to the source retention recorded in the manifest.

--precision <precision>#
Default:

'ns'

Options:

h | m | s | ms | u | ns

--pps <pps>#
Default:

0

--compressed#
--ssl#

Use HTTPS for the import request.

--unsafe-ssl#

Disable SSL certificate verification.

--force#

Re-import files already marked imported in the manifest.

status#

Report migration progress for a single run directory.

Usage

sasquatch influxdb migrate status [OPTIONS]

Options

--run-dir <run_dir>#

Required Migration run directory containing migration-manifest.json.

transform#

Transform exported line protocol files in place.

Usage

sasquatch influxdb migrate transform [OPTIONS]

Options

--run-dir <run_dir>#

Required Migration run directory containing migration-manifest.json.

--plan <plan>#

Required YAML file describing ordered transform operations.

--force#

Reapply the transform plan to files already marked transformed.

telegraf#

Telegraf configuration tools.

Usage

sasquatch telegraf [OPTIONS] COMMAND [ARGS]...

update-topic-config#

Discover Kafka topics and update a Telegraf input configuration.

Usage

sasquatch telegraf update-topic-config [OPTIONS]

Options

--bootstrap-server <bootstrap_server>#

Required

--username <username>#
Default:

'telegraf'

--include-prefixes-file <include_prefixes_file>#

Required

--exclude-prefixes-file <exclude_prefixes_file>#

Required

--input-template <input_template>#

Required

--output-config <output_config>#

Required

--ready-file <ready_file>#

Required

--request-timeout <request_timeout>#
Default:

15.0

--refresh-interval <refresh_interval>#
Default:

'30s'

--watch#

This page was last modified on .