Files
ProxmoxVE/install/graylog-install.sh
T

48 lines
1.6 KiB
Bash
Raw Normal View History

2025-02-12 20:05:42 +01:00
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
2025-02-12 20:05:42 +01:00
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://graylog.org/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
2025-02-12 20:05:42 +01:00
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
2026-04-29 23:55:11 +02:00
MONGO_VERSION="8.2" setup_mongodb
2025-02-12 20:05:42 +01:00
msg_info "Setup Graylog Data Node"
2026-10-03 08:19:10 +02:00
PASSWORD_SECRET=$(random_password 16)
2025-11-06 20:42:35 +01:00
curl -fsSL "https://packages.graylog2.org/repo/packages/graylog-7.0-repository_latest.deb" -o "graylog-7.0-repository_latest.deb"
$STD dpkg -i graylog-7.0-repository_latest.deb
apt_update_safe
$STD apt install graylog-datanode -y
2025-02-12 20:05:42 +01:00
sed -i "s/password_secret =/password_secret = $PASSWORD_SECRET/g" /etc/graylog/datanode/datanode.conf
systemctl enable -q --now graylog-datanode
msg_ok "Setup Graylog Data Node"
msg_info "Setup ${APPLICATION}"
$STD apt install graylog-server
2026-10-03 08:19:10 +02:00
ROOT_PASSWORD=$(random_password 16)
cat <<EOF >~/graylog.creds
${APPLICATION} Credentials
Admin User: admin
Admin Password: ${ROOT_PASSWORD}
EOF
2025-02-12 20:05:42 +01:00
ROOT_PASSWORD=$(echo -n $ROOT_PASSWORD | shasum -a 256 | awk '{print $1}')
sed -i "s/password_secret =/password_secret = $PASSWORD_SECRET/g" /etc/graylog/server/server.conf
sed -i "s/root_password_sha2 =/root_password_sha2 = $ROOT_PASSWORD/g" /etc/graylog/server/server.conf
sed -i 's/#http_bind_address = 127.0.0.1.*/http_bind_address = 0.0.0.0:9000/g' /etc/graylog/server/server.conf
systemctl enable -q --now graylog-server
2026-04-29 22:27:27 +02:00
sleep 5
sed -i "s/0\.0\.0\.0:9000/$LOCAL_IP:9000/g" /var/log/graylog-server/server.log
2025-02-12 20:05:42 +01:00
msg_ok "Setup ${APPLICATION}"
motd_ssh
customize
2025-11-06 20:42:35 +01:00
cleanup_lxc