dev; nagios

This commit is contained in:
MickLesk
2026-04-25 22:37:05 +02:00
parent 753dcdf00b
commit a271005a69
4 changed files with 135 additions and 0 deletions

2
.gitignore vendored
View File

@@ -13,3 +13,5 @@ vm/debian-13-vm.sh
vm/vm-manager.sh vm/vm-manager.sh
vm/vm-manager.sh vm/vm-manager.sh
vm/debian-13-vm.sh vm/debian-13-vm.sh
stars.json
stars.txt

53
ct/nagios.sh Normal file
View File

@@ -0,0 +1,53 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: GitHub Copilot (GPT-5.3-Codex)
# License: MIT | https://github.com/community-scripts/ProxmoxVED/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 /etc/nagios4/nagios.cfg ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Updating Nagios Packages"
$STD apt update
$STD apt install -y --only-upgrade nagios4 nagios-plugins-contrib apache2
msg_ok "Updated Nagios Packages"
msg_info "Restarting Services"
systemctl restart nagios4
systemctl restart apache2
msg_ok "Restarted Services"
msg_ok "Updated successfully!"
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}/nagios4${CL}"

36
install/nagios-install.sh Normal file
View File

@@ -0,0 +1,36 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: GitHub Copilot (GPT-5.3-Codex)
# License: MIT | https://github.com/community-scripts/ProxmoxVED/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 \
apache2-utils \
nagios4 \
nagios-plugins-contrib
msg_ok "Installed Dependencies"
msg_info "Configuring Web Authentication"
htpasswd -bc /etc/nagios4/htpasswd.users nagiosadmin nagiosadmin
chown root:www-data /etc/nagios4/htpasswd.users
chmod 640 /etc/nagios4/htpasswd.users
msg_ok "Configured Web Authentication"
msg_info "Starting Services"
systemctl enable -q --now nagios4
systemctl enable -q --now apache2
msg_ok "Started Services"
motd_ssh
customize
cleanup_lxc

44
json/nagios.json Normal file
View File

@@ -0,0 +1,44 @@
{
"name": "Nagios Core",
"slug": "nagios",
"categories": [
9
],
"date_created": "2026-04-25",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 80,
"documentation": "https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/4/en/quickstart.html",
"website": "https://www.nagios.org/projects/nagios-core/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/nagios.webp",
"description": "Nagios Core is an open-source monitoring platform for hosts, services, and network infrastructure with a classic web interface.",
"install_methods": [
{
"type": "default",
"script": "ct/nagios.sh",
"config_path": "/etc/nagios4/nagios.cfg",
"resources": {
"cpu": 2,
"ram": 2048,
"hdd": 20,
"os": "Debian",
"version": "13"
}
}
],
"default_credentials": {
"username": "nagiosadmin",
"password": "nagiosadmin"
},
"notes": [
{
"text": "After first login, change the default web password in /etc/nagios4/htpasswd.users.",
"type": "warning"
},
{
"text": "Web UI path is /nagios4 on port 80.",
"type": "info"
}
]
}