It is recommended to read README and Key Concepts before you start working with VictoriaLogs.
How to install and run VictoriaLogs #
The following options are available:
- To run pre-built binaries
- To run Docker image
- To run in Kubernetes with Helm charts
- To build VictoriaLogs from source code
Pre-built binaries #
Pre-built binaries for VictoriaLogs are available at the releases
page.
Just download the archive for the needed operating system and architecture, unpack it, and run victoria-logs-prod from it.
For example, the following commands download VictoriaLogs archive for Linux/amd64, unpack and run it:
curl -L -O https://github.com/VictoriaMetrics/VictoriaLogs/releases/download/v1.38.0/victoria-logs-linux-amd64-v1.38.0.tar.gz
tar xzf victoria-logs-linux-amd64-v1.38.0.tar.gz
./victoria-logs-prod -storageDataPath=victoria-logs-data
VictoriaLogs is ready for
data ingestion
and
querying
at the TCP port 9428 now!
It has no external dependencies, so it can run in various environments without additional setup or configuration.
VictoriaLogs automatically adapts to the available CPU and RAM resources. It also automatically sets up and creates
the needed indexes during
data ingestion
.
See also:
Docker image #
You can run VictoriaLogs in a Docker container. It is the easiest way to start using VictoriaLogs. Here is the command to run VictoriaLogs in a Docker container:
docker run --rm -it -p 9428:9428 -v ./victoria-logs-data:/victoria-logs-data \
docker.io/victoriametrics/victoria-logs:v1.38.0 -storageDataPath=victoria-logs-data
See also:
Helm charts #
You can run VictoriaLogs in a Kubernetes environment with VictoriaLogs single or cluster Helm charts.
See also victoria-logs-collector Helm chart for collecting logs from all the Kubernetes containers and sending them to VictoriaLogs.
Building from source code #
Follow these steps to build VictoriaLogs from source code:
Check out the VictoriaLogs source code:
git clone https://github.com/VictoriaMetrics/VictoriaLogs cd VictoriaLogsCheck out a specific commit if needed:
git checkout <commit-hash-here>Build VictoriaLogs (requires Go to be installed on your computer. See how to install Go ):
make victoria-logsRun the built binary:
bin/victoria-logs -storageDataPath=victoria-logs-data
VictoriaLogs is ready for
data ingestion
and
querying
at the TCP port 9428 now!
It has no external dependencies, so it can run in various environments without additional setup or configuration.
VictoriaLogs automatically adapts to the available CPU and RAM resources. It also automatically sets up and creates
the needed indexes during
data ingestion
.
An alternative approach is to build VictoriaLogs inside a Docker builder container. This approach doesn’t require Go to be installed, but it does require Docker on your computer. See how to install Docker :
make victoria-logs-prod
This will build the victoria-logs-prod executable inside the bin folder.
See also:
How to configure VictoriaLogs #
VictoriaLogs is configured via command-line flags. All command-line flags have sane defaults, so there is generally no need to tune them. VictoriaLogs runs smoothly in most environments without additional configuration.
Pass -help to VictoriaLogs in order to see the list of supported command-line flags with their description and default values:
/path/to/victoria-logs -help
VictoriaLogs stores ingested data in the victoria-logs-data directory by default. The directory can be changed
via -storageDataPath command-line flag. See
Storage
for details.
By default, VictoriaLogs stores
log entries
with timestamps
in the time range [now-7d, now] and drops logs outside this time range
(i.e., a retention of 7 days). See
Retention
for details on controlling retention
for
ingested
logs.
We recommend setting up monitoring of VictoriaLogs according to Monitoring .
See also:
Docker demos #
Docker Compose demos for the single-node and cluster versions of VictoriaLogs that include log collection, monitoring, alerting, and Grafana are available here .
Docker Compose demos that integrate VictoriaLogs and various log collectors:
You can use the VictoriaLogs single or cluster Helm charts to run the Vector demo in Kubernetes.