Docker compose environment for VictoriaLogs includes VictoriaLogs components, Alertmanager and Grafana.
For starting the docker-compose environment ensure that you have docker installed and running, and that you have access to the Internet. All commands should be executed from the root directory of the VictoriaLogs repo.
- Metrics:
- Logs:
- Common
- Alerts
- Troubleshooting
vmagent is used for scraping and pushing time series to VictoriaMetrics instance. It accepts Prometheus-compatible configuration with listed targets for scraping:
- scraping VictoriaLogs single-node services;
- scraping VictoriaLogs cluster services;
Web interface link is http://localhost:8429/.
To spin-up single-node VictoriaLogs run the following command:
make docker-vl-single-up
VictoriaLogs is available at http://localhost:9428.
In addition to VictoriaLogs server, the docker compose contains the following components:
- vector service for collecting docker logs and sending them to VictoriaLogs;
- VictoriaMetrics single-node to collect metrics from all the components;
- Grafana is configured with VictoriaLogs datasource.
- vmauth proxies
selectqueries to VictoriaLogs; - vmalert is configured to query
VictoriaLogs single-node, and send alerts state and recording rules results toVictoriaMetrics single-node; - alertmanager is configured to receive notifications from
vmalert.
Grafana is available at http://localhost:3000.
Use admin username and admin password for logging in into Grafana.
To access VictoriaLogs UI use link http://localhost:8427/select/vmui/.
Please, also see how to monitor VictoriaLogs installations.
To shutdown environment execute the following command:
make docker-vl-single-down
See troubleshooting in case if issues.
To spin-up VictoriaLogs cluster run the following command:
make docker-vl-cluster-up
VictoriaLogs cluster environment consists of vlinsert, vlstorage and vlselect components.
vlinsert and vlselect are available through vmauth at http://localhost:8427.
For example, vector pushes logs via http://localhost:8427/insert/elasticsearch/ path,
and Grafana queries http://localhost:8427 for datasource queries.
In addition to VictoriaLogs cluster, the docker compose contains the following components:
- vector service for collecting docker logs and sending them to
vlinsert; - Grafana is configured with VictoriaLogs datasource and pointing to
vmauth. - VictoriaMetrics single-node to collect metrics from all the components;
vlinsertfo sending the ingested logs tovlstorage;vlselectfor queryingvlstorage;- vmauth balances incoming read and write requests among
vlselects andvlinserts; - vmalert is configured to query
vlselects, and send alerts state and recording rules results toVictoriaMetrics single-node; - alertmanager is configured to receive notifications from
vmalert.
Grafana is available at http://localhost:3000.
Use admin username and admin password for logging in into Grafana.
To access VictoriaLogs UI use link http://localhost:8427/select/vmui/.
Please, also see how to monitor VictoriaLogs installations.
To shutdown environment execute the following command:
make docker-vl-cluster-down
See troubleshooting in case if issues.
Please see more examples on integration of VictoriaLogs with other log shippers below:
- filebeat
- fluentbit
- logstash
- promtail
- vector
- datadog-agent
- journald
- opentelemetry-collector
- telegraf
- fluentd
- datadog-serverless
vmauth acts as a load balancer
to spread the load across vlselect nodes. Grafana and vmalert use vmauth for read queries.
vmauth routes read queries to VictoriaLogs depending on requested path.
See vmauth config for VictoriaLogs single-server and
for VictoriaLogs cluster.
vmalert evaluates these alerting rules. It queries VictoriaLogs and sends alerts to AlertManager. It also stores alerting state to VictoriaMetrics.
vmalert is available at http://localhost:8880/.
AlertManager accepts notifications from vmalert and fires alerts.
All notifications are blackholed according to alertmanager.yml config.
AlertManager is available at http://localhost:9093/.
Grafana is available at http://localhost:3000.
Default credentials:
- login:
admin - password:
admin
Grafana is provisioned with default dashboards and datasources.
See below a list of recommended alerting rules for VictoriaLogs components for running in production. Some alerting rules thresholds are just recommendations and could require an adjustment. The list of alerting rules is the following:
- alerts-health.yml: shared alerting rules for tracking the health of VictoriaLogs components;
- alerts-vlogs.yml:
VictoriaLogs-specific alerting rules for VictoriaLogs installations. Load this together with
alerts-health.yml; - alerts-vlagent.yml:
alerting rules related to vlagent. Load this together with
alerts-health.yml.
Please, also see how to monitor VictoriaLogs installations.
This environment has the following requirements:
- installed docker compose;
- access to the Internet for downloading docker images;
- All commands should be executed from the root directory of the VictoriaLogs repo.
Containers are started in --detach mode, meaning they run in the background. As a result, you won't see their logs or exit status directly in the terminal.
If something isn’t working as expected, try the following troubleshooting steps:
- Run from the correct directory. Make sure you're running the command from the root of the VictoriaLogs repository.
- Check container status. Run
docker ps -ato list all containers and their status. Healthy and running containers should haveSTATUSset toUp. - View container logs. To inspect logs for a specific container, get its container ID from step p2 and run:
docker logs -f <containerID>. - Read the logs carefully and follow any suggested actions.
- Check for port conflicts. Some containers (e.g., Grafana) expose HTTP ports. If a port (like
:3000) is already in use, the container may fail to start. Stop the conflicting process or change the exposed port in the Docker Compose file. - Shut down the deployment. To tear down the environment, run:
make <environment>-down(i.e.make docker-vl-single-down). Note, this command also removes all attached volumes, so all the temporary created data will be removed too (i.e. Grafana dashboards or collected metrics).