mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-30 13:55:05 +02:00
Compare commits
13 Commits
checkmk
...
add-script
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc3284130d | ||
|
|
1a14055121 | ||
|
|
04d95b4aee | ||
|
|
f62b3b0494 | ||
|
|
f10eef8243 | ||
|
|
50b2256b1d | ||
|
|
1bcc12af82 | ||
|
|
721667eaf3 | ||
|
|
e9ae1bfde1 | ||
|
|
84a3138e7e | ||
|
|
e79d37b032 | ||
|
|
a47a425214 | ||
|
|
6c96d992d6 |
12
CHANGELOG.md
12
CHANGELOG.md
@@ -452,10 +452,22 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- GrayLog: MongoDB update to 8.2.x [@tremor021](https://github.com/tremor021) ([#14114](https://github.com/community-scripts/ProxmoxVE/pull/14114))
|
||||
- Graylog: Better information in the log file [@tremor021](https://github.com/tremor021) ([#14110](https://github.com/community-scripts/ProxmoxVE/pull/14110))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Refactor: checkMK [@MickLesk](https://github.com/MickLesk) ([#14105](https://github.com/community-scripts/ProxmoxVE/pull/14105))
|
||||
- PatchMon: Unpin release [@tremor021](https://github.com/tremor021) ([#14097](https://github.com/community-scripts/ProxmoxVE/pull/14097))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- core: add guidance when storage lacks rootdir support [@MickLesk](https://github.com/MickLesk) ([#14108](https://github.com/community-scripts/ProxmoxVE/pull/14108))
|
||||
|
||||
## 2026-04-28
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
@@ -37,7 +37,7 @@ function update_script() {
|
||||
CURRENT_VERSION=$(apt list --installed 2>/dev/null | grep graylog-server | grep -oP '\d+\.\d+\.\d+')
|
||||
|
||||
if dpkg --compare-versions "$CURRENT_VERSION" lt "6.3"; then
|
||||
MONGO_VERSION="8.0" setup_mongodb
|
||||
MONGO_VERSION="8.2" setup_mongodb
|
||||
|
||||
msg_info "Updating Graylog"
|
||||
$STD apt update
|
||||
|
||||
6
ct/headers/nagios
Normal file
6
ct/headers/nagios
Normal file
@@ -0,0 +1,6 @@
|
||||
_ __ _
|
||||
/ | / /___ _____ _(_)___ _____
|
||||
/ |/ / __ `/ __ `/ / __ \/ ___/
|
||||
/ /| / /_/ / /_/ / / /_/ (__ )
|
||||
/_/ |_/\__,_/\__, /_/\____/____/
|
||||
/____/
|
||||
107
ct/nagios.sh
Normal file
107
ct/nagios.sh
Normal file
@@ -0,0 +1,107 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: CanbiZ (MickLesk)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/NagiosEnterprises/nagioscore
|
||||
|
||||
APP="Nagios"
|
||||
var_tags="${var_tags:-monitoring;alerts;infrastructure}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-20}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -f /usr/local/nagios/etc/nagios.cfg ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
local core_update=0
|
||||
local plugins_update=0
|
||||
|
||||
if check_for_gh_release "nagios" "NagiosEnterprises/nagioscore"; then
|
||||
core_update=1
|
||||
fi
|
||||
|
||||
if check_for_gh_release "nagios-plugins" "nagios-plugins/nagios-plugins"; then
|
||||
plugins_update=1
|
||||
fi
|
||||
|
||||
if [[ "$core_update" == "1" || "$plugins_update" == "1" ]]; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop nagios
|
||||
systemctl stop apache2
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
msg_info "Backing up Configuration"
|
||||
cp -a /usr/local/nagios/etc /opt/nagios-etc-backup
|
||||
msg_ok "Backed up Configuration"
|
||||
|
||||
if [[ "$core_update" == "1" ]]; then
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "nagios" "NagiosEnterprises/nagioscore" "tarball"
|
||||
|
||||
msg_info "Building Nagios Core"
|
||||
cd /opt/nagios
|
||||
$STD ./configure --with-httpd-conf=/etc/apache2/sites-enabled
|
||||
$STD make all
|
||||
$STD make install-groups-users
|
||||
usermod -a -G nagios www-data
|
||||
$STD make install
|
||||
$STD make install-daemoninit
|
||||
$STD make install-commandmode
|
||||
$STD make install-config
|
||||
$STD make install-webconf
|
||||
a2enmod rewrite >/dev/null 2>&1
|
||||
a2enmod cgi >/dev/null 2>&1
|
||||
msg_ok "Built Nagios Core"
|
||||
fi
|
||||
|
||||
if [[ "$plugins_update" == "1" ]]; then
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "nagios-plugins" "nagios-plugins/nagios-plugins" "tarball"
|
||||
|
||||
msg_info "Building Nagios Plugins"
|
||||
cd /opt/nagios-plugins
|
||||
$STD ./tools/setup
|
||||
$STD ./configure
|
||||
$STD make
|
||||
$STD make install
|
||||
msg_ok "Built Nagios Plugins"
|
||||
fi
|
||||
|
||||
msg_info "Restoring Configuration"
|
||||
rm -rf /usr/local/nagios/etc
|
||||
cp -a /opt/nagios-etc-backup /usr/local/nagios/etc
|
||||
rm -rf /opt/nagios-etc-backup
|
||||
msg_ok "Restored Configuration"
|
||||
|
||||
msg_info "Starting Services"
|
||||
systemctl start apache2
|
||||
systemctl start nagios
|
||||
msg_ok "Started Services"
|
||||
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}/nagios${CL}"
|
||||
@@ -13,7 +13,7 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
MONGO_VERSION="8.0" setup_mongodb
|
||||
MONGO_VERSION="8.2" setup_mongodb
|
||||
|
||||
msg_info "Setup Graylog Data Node"
|
||||
PASSWORD_SECRET=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c16)
|
||||
@@ -38,6 +38,8 @@ sed -i "s/password_secret =/password_secret = $PASSWORD_SECRET/g" /etc/graylog/s
|
||||
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
|
||||
sleep 5
|
||||
sed -i "s/0\.0\.0\.0:9000/$LOCAL_IP:9000/g" /var/log/graylog-server/server.log
|
||||
msg_ok "Setup ${APPLICATION}"
|
||||
|
||||
motd_ssh
|
||||
|
||||
80
install/nagios-install.sh
Normal file
80
install/nagios-install.sh
Normal file
@@ -0,0 +1,80 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: CanbiZ (MickLesk)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/NagiosEnterprises/nagioscore
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
autoconf \
|
||||
automake \
|
||||
build-essential \
|
||||
bc \
|
||||
dc \
|
||||
gawk \
|
||||
gperf \
|
||||
gettext \
|
||||
libc6 \
|
||||
libgd-dev \
|
||||
libmcrypt-dev \
|
||||
libnet-snmp-perl \
|
||||
libssl-dev \
|
||||
php \
|
||||
apache2 \
|
||||
snmp \
|
||||
unzip \
|
||||
wget
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
fetch_and_deploy_gh_release "nagios" "NagiosEnterprises/nagioscore" "tarball"
|
||||
|
||||
msg_info "Building Nagios Core"
|
||||
cd /opt/nagios
|
||||
$STD ./configure --with-httpd-conf=/etc/apache2/sites-enabled
|
||||
$STD make all
|
||||
$STD make install-groups-users
|
||||
usermod -a -G nagios www-data
|
||||
$STD make install
|
||||
$STD make install-daemoninit
|
||||
$STD make install-commandmode
|
||||
$STD make install-config
|
||||
$STD make install-webconf
|
||||
a2enmod rewrite >/dev/null 2>&1
|
||||
a2enmod cgi >/dev/null 2>&1
|
||||
msg_ok "Built Nagios Core"
|
||||
|
||||
fetch_and_deploy_gh_release "nagios-plugins" "nagios-plugins/nagios-plugins" "tarball"
|
||||
|
||||
msg_info "Building Nagios Plugins"
|
||||
cd /opt/nagios-plugins
|
||||
$STD ./tools/setup
|
||||
$STD ./configure
|
||||
$STD make
|
||||
$STD make install
|
||||
msg_ok "Built Nagios Plugins"
|
||||
|
||||
msg_info "Configuring Web Authentication"
|
||||
htpasswd -bc /usr/local/nagios/etc/htpasswd.users nagiosadmin nagiosadmin
|
||||
chown root:www-data /usr/local/nagios/etc/htpasswd.users
|
||||
chmod 640 /usr/local/nagios/etc/htpasswd.users
|
||||
msg_ok "Configured Web Authentication"
|
||||
|
||||
msg_info "Starting Services"
|
||||
systemctl enable -q --now apache2
|
||||
systemctl enable -q --now nagios
|
||||
systemctl restart apache2
|
||||
systemctl restart nagios
|
||||
msg_ok "Started Services"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -5678,6 +5678,10 @@ create_lxc_container() {
|
||||
|
||||
if ! pvesm status -content rootdir 2>/dev/null | awk 'NR>1{print $1}' | grep -qx "$CONTAINER_STORAGE"; then
|
||||
msg_error "Storage '$CONTAINER_STORAGE' ($STORAGE_TYPE) does not support 'rootdir' content."
|
||||
msg_custom "💡" "${YW}" "Enable 'Disk image' (rootdir) for storage '${CONTAINER_STORAGE}' in:"
|
||||
msg_custom " " "${YW}" "Datacenter → Storage → ${CONTAINER_STORAGE} → Edit → Content"
|
||||
msg_custom "📖" "${YW}" "See: https://pve.proxmox.com/wiki/Storage"
|
||||
msg_custom "🔗" "${YW}" "Help: https://github.com/community-scripts/ProxmoxVE/discussions"
|
||||
exit 213
|
||||
fi
|
||||
msg_ok "Storage '$CONTAINER_STORAGE' ($STORAGE_TYPE) validated"
|
||||
|
||||
Reference in New Issue
Block a user