Documentation
¶
Overview ¶
Package cli implements the `collect` command and its subcommands.
The per-collector subcommands (http, postgres, mysql, mssql, redis) run a single collector and print its native result JSON to stdout. This lets a collector run inside a Pod using the troubleshoot image — e.g. as a runPod collector — so the check executes from within the cluster instead of from wherever the CLI happens to be invoked.
Index ¶
Constants ¶
const ( // FormatJSON is intended for CLI output. FormatJSON = "json" // FormatRaw is intended for consumption by a remote collector. Output is a // string of quoted JSON. FormatRaw = "raw" )
Variables ¶
This section is empty.
Functions ¶
func ClickhouseCmd ¶ added in v0.131.0
ClickhouseCmd runs the clickhouse collector against a single database and prints the native result JSON ({"isConnected":..,"version":..,"error":..}).
func HTTPCmd ¶ added in v0.131.0
HTTPCmd runs the http collector against a single endpoint and prints the native result JSON ({"response":{"status":...}} or {"error":{...}}).
func InitAndExecute ¶
func InitAndExecute()
func MssqlCmd ¶ added in v0.131.0
MssqlCmd runs the mssql collector against a single database and prints the native result JSON ({"isConnected":..,"version":..,"error":..}).
Unlike the other database collectors, the mssql collector does not honor a separate TLS field — TLS is configured through the connection URI query parameters (e.g. encrypt=true) — so this subcommand only takes --uri.
func MysqlCmd ¶ added in v0.131.0
MysqlCmd runs the mysql collector against a single database and prints the native result JSON ({"isConnected":..,"version":..,"variables":..,"error":..}).
func PostgresCmd ¶ added in v0.131.0
PostgresCmd runs the postgres collector against a single database and prints the native result JSON ({"isConnected":..,"version":..,"error":..}).
Types ¶
This section is empty.