From 76c4eb071536d05a8115848ee596b23ff4ea35a2 Mon Sep 17 00:00:00 2001 From: "push-app-to-main[bot]" <203845782+push-app-to-main[bot]@users.noreply.github.com> Date: Fri, 13 Nov 2026 07:46:14 +0000 Subject: [PATCH] Add nightingale (ct) --- ct/nightingale.sh | 56 ++++++++++++ install/nightingale-install.sh | 151 +++++++++++++++++++++++++++++++++ 2 files changed, 207 insertions(+) create mode 100644 ct/nightingale.sh create mode 100644 install/nightingale-install.sh diff --git a/ct/nightingale.sh b/ct/nightingale.sh new file mode 100644 index 000000000..8de14e873 --- /dev/null +++ b/ct/nightingale.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash +_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func" +source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func") +# Copyright (c) 2021-2026 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/ccfos/nightingale + +APP="Nightingale" +var_tags="${var_tags:-monitoring;alerting}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-10}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_arm64="${var_arm64:-yes}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -d /opt/nightingale ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + if check_for_gh_release "nightingale" "ccfos/nightingale"; then + msg_info "Stopping Nightingale" + systemctl stop nightingale + msg_ok "Stopped Nightingale" + + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "nightingale" "ccfos/nightingale" "prebuild" "latest" "/opt/nightingale" "n9e-v*-linux-$(arch_resolve).tar.gz" + + msg_info "Starting Nightingale" + systemctl start nightingale + msg_ok "Started Nightingale" + 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 "${GATEWAY}${BGN}http://${IP}:17000${CL}" diff --git a/install/nightingale-install.sh b/install/nightingale-install.sh new file mode 100644 index 000000000..30a2d8d79 --- /dev/null +++ b/install/nightingale-install.sh @@ -0,0 +1,151 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/ccfos/nightingale + +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 redis-server +msg_ok "Installed Dependencies" + +setup_mariadb +MARIADB_DB_NAME="nightingale" MARIADB_DB_USER="nightingale" setup_mariadb_db + +fetch_and_deploy_gh_release "nightingale" "ccfos/nightingale" "prebuild" "latest" "/opt/nightingale" "n9e-v*-linux-$(arch_resolve).tar.gz" + +msg_info "Configuring Nightingale" +mkdir -p /opt/nightingale_data +cat </opt/nightingale_data/config.toml +[Global] +RunMode = "release" + +[Log] +Dir = "/opt/nightingale_data/logs" +Level = "INFO" +Output = "stdout" + +[HTTP] +Host = "0.0.0.0" +Port = 17000 +CertFile = "" +KeyFile = "" +PrintAccessLog = false +PProf = false +ExposeMetrics = true +ShutdownTimeout = 30 +MaxContentLength = 67108864 +ReadTimeout = 20 +WriteTimeout = 40 +IdleTimeout = 120 + +[HTTP.ShowCaptcha] +Enable = false + +[HTTP.APIForAgent] +Enable = true + +[HTTP.APIForService] +Enable = false + +[HTTP.JWTAuth] +AccessExpired = 1500 +RefreshExpired = 10080 +RedisKeyPrefix = "/jwt/" + +[HTTP.ProxyAuth] +Enable = false +HeaderUserNameKey = "X-User-Name" +DefaultRoles = ["Standard"] + +[HTTP.TokenAuth] +Enable = true + +[HTTP.RSA] +OpenRSA = false + +[DB] +DBType = "mysql" +DSN = "nightingale:${MARIADB_DB_PASS}@tcp(127.0.0.1:3306)/nightingale?charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&loc=Local&allowNativePasswords=true" +Debug = false +MaxLifetime = 7200 +MaxOpenConns = 150 +MaxIdleConns = 50 + +[Redis] +Address = "127.0.0.1:6379" +RedisType = "standalone" + +[Alert] +[Alert.Heartbeat] +IP = "" +Interval = 1000 +EngineName = "default" + +[Alert.EvalLog] +MaxDiskGB = 1 + +[Center] +MetricsYamlFile = "/opt/nightingale/etc/metrics.yaml" +I18NHeaderKey = "X-Language" + +[Center.AnonymousAccess] +PromQuerier = false +AlertDetail = true + +[EmbeddedTSDB] +Enable = true +Dir = "/opt/nightingale_data/tsdb" +RetentionDuration = "15d" +MaxBytes = "4GiB" +OutOfOrderTimeWindow = "10m" +QueryTimeout = "1m" +QueryMaxSamples = 50000000 +LookbackDelta = "5m" +BasicAuthUser = "" +BasicAuthPass = "" + +[Pushgw] +LabelRewrite = true +ForceUseServerTS = true + +[Ibex] +Enable = true +RPCListen = "0.0.0.0:20090" +EOF +chmod 600 /opt/nightingale_data/config.toml +msg_ok "Configured Nightingale" + +msg_info "Creating Service" +# integrations/, agents/ and the AI skill cache resolve against the working directory, so it stays the release dir +cat </etc/systemd/system/nightingale.service +[Unit] +Description=Nightingale +After=network.target mariadb.service redis-server.service +Requires=mariadb.service redis-server.service + +[Service] +Type=simple +User=root +WorkingDirectory=/opt/nightingale +ExecStart=/opt/nightingale/n9e --configs /opt/nightingale_data +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now nightingale +msg_ok "Created Service" + +motd_ssh +customize +cleanup_lxc