A powerful command-line tool for querying VictoriaLogs (you'll love it)
Query VictoriaLogs using TOML configuration files and output results directly to your terminal.
- Simple and intuitive command-line interface
- Flexible query combinations and filtering options
- Support for large-scale time range queries (handle days of log data with ease)
- TOML-based configuration with multiple config file support (session-like functionality)
- Terminal output that works seamlessly with Unix tools like
grep,awk, and redirection (>) - Real-time log monitoring with tail mode (
vtool query -t)
Ensure you have Go environment installed on your system.
Option 1: Install via go install
go install github.com/VictoriaMetrics-Community/victorialogs-tool@latest && mv $GOPATH/bin/victorialogs-tool $GOPATH/bin/vtoolOption 2: Build from source
git clone https://github.com/VictoriaMetrics-Community/victorialogs-tool.git
cd victorialogs-tool
make build$ ./vtool --help
A wonderful query tool for Victorialogs
Usage:
vtool [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
currcfg Get the absolute path of the current configuration file.
help Help about any command
query query logs from victoriametrics
setcfg Set up the configuration file for query logs
Flags:
-h, --help help for vtool
-t, --toggle Help message for toggle
Use "vtool [command] --help" for more information about a command.- Set up your configuration file using
vtool setcfg
vtool setcfg path/to/your/config.tomlThis command creates a vtool.json file in your home directory to store the configuration file path.
- Run queries with
vtool query
vtool queryTip: Use vtool currcfg to check the absolute path of your current configuration file.
Reference configuration: https://github.com/VictoriaMetrics-Community/victorialogs-tool/blob/master/cfgs/example.toml
Contributions are welcome! Please feel free to submit pull requests.
This project is licensed under the MIT License.

