Skip to content

Commit 3eddb66

Browse files
authored
Merge pull request #2286 from opastorello/add-victorialogs
feat: add VictoriaLogs LXC script
2 parents da1c3b2 + b57df8b commit 3eddb66

3 files changed

Lines changed: 151 additions & 0 deletions

File tree

‎ct/victorialogs.sh‎

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#!/usr/bin/env bash
2+
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
3+
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
4+
5+
# Copyright (c) 2021-2026 community-scripts ORG
6+
# Author: Nicolas Pastorello (opastorello)
7+
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
8+
# Source: https://victoriametrics.com/products/victorialogs/
9+
10+
APP="VictoriaLogs"
11+
var_tags="${var_tags:-logging;monitoring}"
12+
var_cpu="${var_cpu:-2}"
13+
var_ram="${var_ram:-2048}"
14+
var_disk="${var_disk:-10}"
15+
var_os="${var_os:-debian}"
16+
var_version="${var_version:-13}"
17+
var_unprivileged="${var_unprivileged:-1}"
18+
var_arm64="${var_arm64:-yes}"
19+
20+
header_info "$APP"
21+
variables
22+
color
23+
catch_errors
24+
25+
function update_script() {
26+
header_info
27+
check_container_storage
28+
check_container_resources
29+
30+
if [[ ! -d /opt/victorialogs ]]; then
31+
msg_error "No ${APP} Installation Found!"
32+
exit
33+
fi
34+
35+
if check_for_gh_release "victorialogs" "VictoriaMetrics/VictoriaLogs"; then
36+
msg_info "Stopping Service"
37+
systemctl stop victorialogs
38+
msg_ok "Stopped Service"
39+
40+
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "victorialogs" "VictoriaMetrics/VictoriaLogs" "prebuild" "latest" "/opt/victorialogs" "victoria-logs-linux-$(arch_resolve amd64 arm64)-v*[0-9].tar.gz"
41+
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "vlutils" "VictoriaMetrics/VictoriaLogs" "prebuild" "latest" "/opt/vlutils" "vlutils-linux-$(arch_resolve amd64 arm64)-v*[0-9].tar.gz"
42+
43+
msg_info "Starting Service"
44+
systemctl start victorialogs
45+
msg_ok "Started Service"
46+
msg_ok "Updated successfully!"
47+
fi
48+
exit
49+
}
50+
51+
start
52+
build_container
53+
description
54+
55+
msg_ok "Completed Successfully!\n"
56+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
57+
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
58+
echo -e "${GATEWAY}${BGN}http://${IP}:9428${CL}"

‎install/victorialogs-install.sh‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2026 community-scripts ORG
4+
# Author: Nicolas Pastorello (opastorello)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
6+
# Source: https://victoriametrics.com/products/victorialogs/
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
fetch_and_deploy_gh_release "victorialogs" "VictoriaMetrics/VictoriaLogs" "prebuild" "latest" "/opt/victorialogs" "victoria-logs-linux-$(arch_resolve amd64 arm64)-v*[0-9].tar.gz"
17+
fetch_and_deploy_gh_release "vlutils" "VictoriaMetrics/VictoriaLogs" "prebuild" "latest" "/opt/vlutils" "vlutils-linux-$(arch_resolve amd64 arm64)-v*[0-9].tar.gz"
18+
19+
msg_info "Creating Service"
20+
mkdir -p /opt/victorialogs_data
21+
cat <<EOF >/etc/systemd/system/victorialogs.service
22+
[Unit]
23+
Description=VictoriaLogs Service
24+
After=network.target
25+
26+
[Service]
27+
Type=simple
28+
User=root
29+
WorkingDirectory=/opt/victorialogs
30+
ExecStart=/opt/victorialogs/victoria-logs-prod -storageDataPath=/opt/victorialogs_data -httpListenAddr=:9428
31+
Restart=on-failure
32+
RestartSec=5
33+
34+
[Install]
35+
WantedBy=multi-user.target
36+
EOF
37+
systemctl enable -q --now victorialogs
38+
msg_ok "Created Service"
39+
40+
motd_ssh
41+
customize
42+
cleanup_lxc

‎json/victorialogs.json‎

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"name": "VictoriaLogs",
3+
"slug": "victorialogs",
4+
"categories": [9],
5+
"date_created": "2026-09-17",
6+
"type": "ct",
7+
"updateable": true,
8+
"privileged": false,
9+
"architectures": [
10+
"amd64",
11+
"arm64"
12+
],
13+
"interface_port": 9428,
14+
"documentation": "https://docs.victoriametrics.com/victorialogs/",
15+
"website": "https://victoriametrics.com/products/victorialogs/",
16+
"repository": "https://github.com/VictoriaMetrics/VictoriaLogs",
17+
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/victoriametrics.webp",
18+
"description": "VictoriaLogs is a fast, cost-effective and scalable open-source log database that can efficiently handle terabytes of logs with minimal resources.",
19+
"install_methods": [
20+
{
21+
"type": "default",
22+
"script": "ct/victorialogs.sh",
23+
"config_path": "/etc/systemd/system/victorialogs.service",
24+
"resources": {
25+
"cpu": 2,
26+
"ram": 2048,
27+
"hdd": 10,
28+
"os": "Debian",
29+
"version": "13"
30+
}
31+
}
32+
],
33+
"default_credentials": {
34+
"username": null,
35+
"password": null
36+
},
37+
"notes": [
38+
{
39+
"text": "VictoriaLogs has no built-in authentication. Use a reverse proxy with authentication for production deployments.",
40+
"type": "warning"
41+
},
42+
{
43+
"text": "Data is stored in /opt/victorialogs_data and persists across updates.",
44+
"type": "info"
45+
},
46+
{
47+
"text": "vlutils (vlogscli, vlagent) are installed in /opt/vlutils.",
48+
"type": "info"
49+
}
50+
]
51+
}

0 commit comments

Comments
 (0)