Rename application to Samsara and add assessment summary, detailed tabs and local Linux inventory
This commit is contained in:
70
README.md
70
README.md
@@ -1,68 +1,60 @@
|
||||
# Server Buddy
|
||||
# Samsara
|
||||
|
||||
Desktop retirement assessment tool for Windows Server and Linux administrators. Python 3.11+, PySide6 and versioned JSON. **Local read-only Linux Mint/RHEL-based collection, Windows/Linux synthetic demos, offline JSON import and HTML/JSON reporting are available.** Remote collection and live Windows collection remain incomplete. No real enterprise infrastructure is contacted automatically.
|
||||
Source repository: [oceans2alaska/Samsara](https://git.doorstodurin.com/oceans2alaska/Samsara).
|
||||
|
||||
## Linux Mint setup
|
||||
Windows Server and Red Hat Enterprise Linux retirement assessment. Collect inventory, review dependencies and risks, and save evidence-based reports. Python 3.11+ and PySide6.
|
||||
|
||||
## Get started
|
||||
|
||||
```bash
|
||||
sudo apt update
|
||||
sudo apt install python3 python3-venv libegl1 libopengl0 libxcb-cursor0 libxkbcommon-x11-0
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
python -m pip install -r requirements.txt
|
||||
python -m server_buddy.main
|
||||
python -m samsara.main
|
||||
```
|
||||
|
||||
Run from the project root in a graphical desktop session. If Qt mentions the `xcb` cursor library, install `libxcb-cursor0`; reinstalling Python packages does not supply this system library. The launcher diagnoses this common issue before starting Qt.
|
||||
On Windows, create the environment with `py -3 -m venv .venv` and activate `.venv\Scripts\activate`. Run from the project root in a desktop session.
|
||||
|
||||
On Windows 10/11, create a virtual environment with `py -3 -m venv .venv`, activate `.venv\Scripts\activate`, install requirements and run the same module command. Windows desktop execution still needs validation. Local Linux collection is disabled on Windows; demo and inventory import remain available.
|
||||
Linux desktop compatibility includes Mint. Debian-based desktops may need `python3-venv libegl1 libopengl0 libxcb-cursor0 libxkbcommon-x11-0` installed through their package manager. If Qt reports a missing xcb cursor library, install the package providing `libxcb-cursor.so.0`.
|
||||
|
||||
## Test a real assessment on your Mint PC
|
||||
## Analyze
|
||||
|
||||
1. Close any already-open Server Buddy window and restart with `python -m server_buddy.main` to load the updated code.
|
||||
2. Open **Server Analyzer** and click **Analyze This Linux PC — read-only**. This button assesses the computer running the application, irrespective of the demo target and hostname fields. It never connects to a remote hostname.
|
||||
3. Watch the collection stages. Use **Cancel collection** if needed; cancellation retains the previous assessment. Background commands have time/output limits.
|
||||
4. Confirm the banner says **LOCAL LINUX INVENTORY**. Overview shows the actual local OS, kernel, boot time and per-check statuses. Review Services, Network Connections, Scheduled Tasks / Timers, Software, Storage, Dependencies and Risk Assessment. Tables are searchable and sortable.
|
||||
5. Open **Reports**, save an HTML report and open the saved file in a browser. JSON export is also available. Local reports are labeled as local snapshots rather than imported or synthetic data.
|
||||
1. Open **Analyze**. Leave **Assessment source → This computer** and **Operating system → Auto-detect** selected.
|
||||
2. Click **Analyze**. The app identifies the local OS, runs its available read-only collector and prepares the assessment report.
|
||||
3. The **Summary** page opens automatically with a retirement risk estimate, OS type/version, important software and enabled scheduled jobs/scripts. Higher scores mean more retirement concerns; the score is not retirement approval.
|
||||
4. Open detailed tabs for **Networking**, **Software**, **Tasks**, **Dependencies**, **Services**, **Storage**, **Roles**, **Certificates**, **Risk findings**, **Collection checks** and **System**. Tables are searchable and sortable.
|
||||
5. Click **Save HTML report**, or use **Reports** to export HTML/JSON. **History** reopens assessments from this session.
|
||||
|
||||
Alternatively select **This Linux PC — read-only** under Settings, then use **Analyze Server**. The local mode ignores the hostname field. Local collection requires no sudo, passwords or remote setup. It does not install packages, restart services, change configuration, resolve remote names or read private keys, service command lines or environment variables.
|
||||
Explicit profiles include Windows Server 2016, 2019, 2022 and 2025; RHEL 7 (legacy), 8, 9 and 10; and RHEL-compatible Linux. A local profile must match the detected OS. Auto-detect also allows local testing on other Linux distributions. Profile choices do not imply that every live collector is implemented or every release is validated.
|
||||
|
||||
The collector uses systemd, `ss`, `ip`, RPM where available and dpkg on Mint/Debian-derived hosts. Commands unavailable in containers or restricted environments are recorded as failures, with no synthetic replacement. Results describe the process's local namespace and permissions, which may differ from the whole host.
|
||||
Choose **Saved inventory file** to analyze existing JSON; the recorded OS is displayed without probing another computer. **Windows Server sample** and **RHEL sample** provide clearly labeled synthetic examples. No synthetic results are loaded into history automatically.
|
||||
|
||||
### Current local coverage and limits
|
||||
## Current availability
|
||||
|
||||
- OS distribution, kernel, boot time, interfaces and addresses.
|
||||
- Loaded system service state/startup; accounts, user services and executable details remain incomplete.
|
||||
- TCP snapshot and process attribution where visible. Direction and historical/UDP activity are unverified.
|
||||
- Loaded system timers; cron/anacron, user timers, unloaded timers and trigger configuration require review.
|
||||
- RPM/dpkg software; containers and manually installed applications are outside coverage.
|
||||
- Mount table, including remote mount references. Capacity/free space and NFS/Samba exports are not yet collected. Mounted remote filesystems are not accessed.
|
||||
- Application certificates, directory integration and workload role inference are explicitly not collected.
|
||||
Local Linux collection and offline reporting are implemented. Live Windows and remote collection are not yet available; the UI reports that limitation explicitly. Windows desktops can use saved inventories and samples, but Windows desktop execution still requires platform validation. No server is contacted automatically.
|
||||
|
||||
The heuristic score is preliminary and requires administrator review. Routine Linux services are not automatically classified as active application workloads; unclassified services contribute uncertainty. Neither missing connections nor a low score proves retirement safety.
|
||||
The Linux collector observes OS/kernel/boot information, addresses, loaded systemd services and timers (including available calendar/next-run metadata), readable system cron entries, TCP snapshots, RPM or dpkg software and mounted filesystems. Missing commands or restricted permissions produce visible failed checks. Service accounts, user crontabs/timers, anacron/periodic-script configuration, certificate locations, share exports, disk capacity/free space and directory integration remain incomplete or uncollected. Results reflect the execution process's namespace and permissions. Remote mounts are not accessed.
|
||||
|
||||
## Headless local Linux inventory
|
||||
Collection is read-only, requires no sudo and does not restart services, configure remoting, install software or read private keys, secret-bearing command lines or environment variables. Cancel stops the active collector and retains the previous assessment. Commands have time and output limits.
|
||||
|
||||
The local collector can also produce JSON without PySide6 or jsonschema (Python standard library only):
|
||||
The summary highlights name-matched server software and running application services; this is not a complete application classifier. Scheduled entries show configured work, not confirmed execution, and cron timezones are unverified. Full inventory and collection limitations remain available in the tabs and exported report.
|
||||
|
||||
Risk is a preliminary heuristic requiring administrator review. Missing connections do not prove non-use, and the tool never declares a server safe for retirement. Review exported hostnames, paths and addresses before sharing.
|
||||
|
||||
## Headless Linux inventory
|
||||
|
||||
The standard-library-only collector can export local inventory without Qt:
|
||||
|
||||
```bash
|
||||
python3 -m server_buddy.collectors.linux --output /tmp/my-local-inventory.json
|
||||
python3 -m samsara.collectors.linux --output /tmp/server-inventory.json
|
||||
```
|
||||
|
||||
Use a new output filename; the CLI will not overwrite an existing file. It reads only the local execution host and writes only the requested report file. Import the JSON in either desktop using **Import Windows / Linux inventory JSON**. This provides a manual offline workflow for future RHEL validation without GUI packages on the assessed host. Do not treat Mint testing as validation of every RHEL release.
|
||||
Use a new filename; existing files are not overwritten. Open the result using **Saved inventory file** on either desktop. Imported check assertions are not independently verified. Import validates the v1 schema, limits input to 10 MiB, removes external diagnostic details and service/task command fields, and recalculates risk.
|
||||
|
||||
## Synthetic and offline testing
|
||||
|
||||
The target selector chooses **Windows Server 2016 onward** (`demo-web-01.example.test`) or **RHEL-based Linux** (`demo-rhel-01.example.test`) synthetic fixtures. Click Analyze Server in demo mode to load the selected fixture. All fixture data and timestamps remain clearly labeled. Demo mode rejects other hostnames.
|
||||
|
||||
JSON import validates the v1 collection schema (or a report wrapper), enforces a 10 MiB input limit, recalculates risk and strips task/service command lines and external diagnostic details. Imported timestamps/check statuses are not independently verified. Review all report content before sharing; inventory names, paths and addresses may be sensitive. History is session-only and labels each record's source.
|
||||
|
||||
## Tests
|
||||
## Development
|
||||
|
||||
```bash
|
||||
python -m unittest discover -s tests -v
|
||||
```
|
||||
|
||||
Qt tests run offscreen automatically. Tests cover schema validation, source labeling, Linux service/network/package parsing, missing commands, cancellation/timeouts, local GUI workflow and report escaping. The current development environment passed all 21 tests; a real local smoke collection passed schema validation and generated HTML/JSON. In its restricted environment, systemd and interface commands failed visibly, while package, TCP and mount collection ran. GUI desktop appearance and Windows/RHEL execution still need platform validation.
|
||||
|
||||
See [implementation plan](docs/IMPLEMENTATION_PLAN.md), [platform support](docs/PLATFORMS.md) and [developer guide](docs/DEVELOPMENT.md). Future Windows collection will use existing authorized PowerShell remoting from a Windows execution host, never Windows modules on Linux. Packaging, Windows inventory and remote SSH collection remain later work.
|
||||
Qt tests run offscreen. See [platform support](docs/PLATFORMS.md), [architecture and plan](docs/IMPLEMENTATION_PLAN.md) and [developer guide](docs/DEVELOPMENT.md). Run from source; Windows packaging and production collector validation remain pending.
|
||||
|
||||
Reference in New Issue
Block a user