Version 1.3.1 – this repository contains the latest updates, including automatic theme detection and front-end refactors.
Audit Server generates periodic JSON reports describing the state of a host and exposes them through a static web viewer. The solution is composed of three parts:
generate-audit-json.sh– Bash script that collects metrics (CPU, memory, disks, services and Docker containers) and stores them as timestamped JSON files.audits/– static HTML, CSS and JavaScript viewer that loads and renders those JSON files in a browser.docker-compose.yamlandnginx.conf– optional container setup to serve the viewer with Nginx.
The viewer automatically matches the system's light or dark theme.
The front‑end code is written as ES modules and bundled with esbuild. Development
dependencies such as esbuild, eslint and prettier are listed in package.json.
The audit script relies on a handful of system utilities:
bc, jq, curl, lm-sensors, sysstat (for mpstat), ss, awk, sed and grep
Docker is optional; if it is available, container statistics are included in the report. Node.js is required only when rebuilding the front‑end bundle.
-
Clone the repository:
git clone https://github.com/your-org/audit-server.git cd audit-server -
Install the required packages listed above using your distribution’s package manager.
-
Generate a first report:
./generate-audit-json.sh
Reports are written to
audits/archivesnext to the script. SetBASE_DIRto use a different directory:BASE_DIR=/path/to/audits ./generate-audit-json.sh
For more detailed installation steps, see docs/INSTALLATION.md.
The repository includes a minimal Nginx setup. After creating at least one report, serve the viewer with Docker Compose:
docker compose up -dAUDIT_DIR in .env must point to the directory containing audits and nginx.conf. Traefik labels in the
compose file route requests to the container; adjust them to match your environment.
Run the test suite to verify that the audit generator produces a valid JSON file:
./tests/run.shIf you modify the JavaScript modules under audits/scripts, rebuild the bundled viewer and run the linters:
npm install
npm run build # bundle front-end scripts
npm run lint # run ESLint
npm run format # format sources with Prettier- docs/USAGE.md – operating the audit script and viewer
- docs/DEPLOYMENT.md – Docker/Nginx deployment guide
- docs/REPORT_STRUCTURE.md – JSON report reference
This project is released under the MIT License. See LICENSE for details.