jaredandClaude Opus 5 63a4544302
Lint / Shell (shellcheck) (push) Successful in 6s
feat: stop installing the NUT client on new Proxmox nodes
The rack moved from a USB-attached APC on monitor-02 to a UniFi UPS 2U Pro,
a network device running its own NUT server. Cluster nodes no longer run
NUT at all, so this section installed a client that could never connect.

Two reasons it is gone rather than repointed:

  - The UPS allow-lists NUT client IPs and caps at ~3, and requires
    credentials. Only monitor-02 is allow-listed, and it cannot relay:
    dummy-ups repeater mode on NUT 2.8.1 (Debian trixie) cannot
    authenticate upstream, as `authconf` is 2.8.6+.

  - The per-node upsmon was harmful anyway. Its only action was
    SHUTDOWNCMD "/sbin/poweroff", which skips the graceful VM/LXC
    shutdown and the Ceph protective flags that ups-shutdown.sh sets.

Replaced with a startup banner making the real requirement explicit: a new
node is only covered once it is added to the NODES array in ups-shutdown.sh.
That dependency was previously implicit and easy to miss.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-08 19:49:09 -04:00

Fresh Start Installation Script 🚀

Lint

A powerful bash script for automating Proxmox installations with monitoring tools and system health checks.

Features

  • 📦 Installs essential system packages
  • 📊 Sets up Prometheus Node Exporter (v1.8.2)
  • 🔍 Configures system health monitoring daemon (hwmon)
  • Performs initial dry-run test of monitoring systems

📋 Prerequisites

  • Debian-based system (Proxmox)
  • Root/sudo access
  • Internet connectivity

🛠️ Installation

Execute these commands as root:

chmod +x freshStart.sh
./freshStart.sh

or if you want to run instantly without downloading (recommended)

curl -s http://10.10.10.63:3000/LotusGuild/freshStartScript/raw/branch/main/freshStart.sh | bash

📦 Components Installed

System Packages

  • python3-pip
  • smartmontools
  • iperf3
  • python3-psutil
  • python3-requests
  • lm-sensors
  • neofetch
  • rsync

Prometheus Node Exporter

Installed as a systemd service Runs on default port 9100 Configured to start on boot

Hardware Monitoring Daemon (hwmon)

Installed as a systemd service and timer Performs regular system health checks every 15 minutes Creates tickets for detected issues NEW: API key configuration via /etc/hwmonDaemon/.env

⚙️ Configuration

hwmonDaemon API Key Setup

The script will prompt you for an API key during installation. You can:

Option 1: Enter during installation

Enter API key (or press Enter to skip): d8f356a06bd5612eca9c5ff948b592a56020cc61937764461458372c9ef30931

Option 2: Configure later Edit the configuration file:

nano /etc/hwmonDaemon/.env

Add your API key:

TICKET_API_KEY=your_actual_api_key_here
TICKET_API_URL=http://10.10.10.45/create_ticket_api.php

The .env file is created with restricted permissions (chmod 600) for security.

🔍 Verification

Verify service status after installation:

systemctl status node_exporter
systemctl status hwmon.timer

Test hwmonDaemon with dry-run:

/usr/bin/env python3 -c "import urllib.request; exec(urllib.request.urlopen('http://10.10.10.63:3000/LotusGuild/hwmonDaemon/raw/branch/main/hwmonDaemon.py').read().decode('utf-8'))" --dry-run

Check if API key is loaded:

cat /etc/hwmonDaemon/.env
journalctl -u hwmon.service | grep "TICKET_API_KEY"

🌐 Network Requirements

Service Purpose
GitHub Node Exporter download
10.10.10.63:3000 hwmon daemon files (Gitea)
10.10.10.45 Ticket API access

📁 File Locations

File/Directory Purpose
/etc/hwmonDaemon/.env API key configuration
/var/log/hwmonDaemon/ hwmon log files
/etc/systemd/system/hwmon.service hwmon systemd service
/etc/systemd/system/hwmon.timer hwmon systemd timer
/usr/local/bin/node_exporter Node Exporter binary

🔧 Troubleshooting

hwmonDaemon not creating tickets

Check if API key is configured:

cat /etc/hwmonDaemon/.env

Check logs for authentication errors:

journalctl -u hwmon.service -n 50

Update API key after installation

Edit the configuration file:

nano /etc/hwmonDaemon/.env

No service restart needed - changes take effect on next run.

CI

Workflow Purpose Triggers
lint.yml shellcheck on all .sh files Every push and PR

Branch protection is enabled on main — the lint check must pass before any PR can merge.

S
Description
A bash script for automating Proxmox installations with Prometheus Node Exporter and system health monitoring tools.
Readme
102 KiB
Languages
Shell 100%