jaredandClaude Opus 5.5 a11e4daaaa
Lint / Shell (shellcheck) (push) Successful in 13s
feat: raise kernel keyring quota on new PVE nodes
Root inside every unprivileged LXC maps to one host user (uid 100000),
so all containers on a node share one keyring quota. Docker in the Gitea
runner (CT 119) exhausted the 20 KB default, and CI failed with "unable
to create session key: disk quota exceeded". Write
/etc/sysctl.d/99-keyrings.conf (maxkeys 20000, maxbytes 2000000) on PVE
nodes. Already applied by hand to all six current nodes; this covers
new and rebuilt ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 23:38:26 -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)
  • 🔑 Raises the kernel keyring quota on PVE nodes (/etc/sysctl.d/99-keyrings.conf) so Docker in unprivileged LXC, like the Gitea CI runner, can keep starting containers
  • ✅ 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 https://code.lotusguild.org/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('https://code.lotusguild.org/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 MIT
119 KiB
Languages
Shell 100%