{"id":28796181,"url":"https://github.com/bocaletto-luca/py-server-gen","last_synced_at":"2026-03-15T18:37:29.535Z","repository":{"id":298847499,"uuid":"1001319299","full_name":"bocaletto-luca/py-server-gen","owner":"bocaletto-luca","description":"Python Persistent Server Reporter Author: Bocaletto Luca Python Persistent Server Reporter è un’applicazione cross-platform che:  Raccoglie metriche di sistema (IP, MAC, hostname, OS, CPU, memoria, disco, utenti) Invia report via SMTP a intervalli configurabili Gira in background come Windows Service o systemd daemon Si riavvia automaticamente in c","archived":false,"fork":false,"pushed_at":"2025-07-06T00:34:40.000Z","size":40,"stargazers_count":8,"open_issues_count":0,"forks_count":4,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-07-06T01:30:20.736Z","etag":null,"topics":["background","background-jobs","background-service","bocaletto-luca","generator","linux","open-source","py-server-gen","python","server","server-background","server-generator","windows","yaml"],"latest_commit_sha":null,"homepage":"https://bocaletto-luca.github.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bocaletto-luca.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-13T07:19:12.000Z","updated_at":"2025-07-06T00:34:43.000Z","dependencies_parsed_at":"2025-06-13T08:30:53.219Z","dependency_job_id":"98ca18d0-d94c-4c99-abff-ee6bbbedb0f4","html_url":"https://github.com/bocaletto-luca/py-server-gen","commit_stats":null,"previous_names":["bocaletto-luca/py-server-gen"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bocaletto-luca/py-server-gen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bocaletto-luca%2Fpy-server-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bocaletto-luca%2Fpy-server-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bocaletto-luca%2Fpy-server-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bocaletto-luca%2Fpy-server-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bocaletto-luca","download_url":"https://codeload.github.com/bocaletto-luca/py-server-gen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bocaletto-luca%2Fpy-server-gen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30549240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-15T15:03:43.933Z","status":"ssl_error","status_checked_at":"2026-03-15T15:03:37.630Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["background","background-jobs","background-service","bocaletto-luca","generator","linux","open-source","py-server-gen","python","server","server-background","server-generator","windows","yaml"],"created_at":"2025-06-18T03:11:26.864Z","updated_at":"2026-03-15T18:37:29.528Z","avatar_url":"https://github.com/bocaletto-luca.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Persistent Server Reporter\n#### Author: Bocaletto Luca\n\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue?style=for-the-badge\u0026logo=gnu)](LICENSE) [![Language: Python](https://img.shields.io/badge/Language-Python-blue?style=for-the-badge\u0026logo=python)](https://www.python.org/) [![Linux-Compatible](https://img.shields.io/badge/Linux-Compatible-blue?style=for-the-badge\u0026logo=linux)](https://www.kernel.org/) [![Status: Complete](https://img.shields.io/badge/Status-Complete-brightgreen?style=for-the-badge)](https://github.com/bocaletto-luca/Directory-Monitor)\n\n**Python Persistent Server Reporter** è un’applicazione cross-platform che:\n\n1. Raccoglie metriche di sistema (IP, MAC, hostname, OS, CPU, memoria, disco, utenti)  \n2. Invia report via SMTP a intervalli configurabili  \n3. Gira in background come **Windows Service** o **systemd daemon**  \n4. Si riavvia automaticamente in caso di crash o kill  \n5. Auto-parte all’avvio del sistema  \n\n---\n\n## 📋 Prerequisiti\n\n- Python 3.7+  \n- pip (o venv)  \n- Su **Windows**: privilegi di amministratore per installare il servizio  \n- Su **Linux**: `systemd` e permessi `sudo`  \n\n---\n\n## 📥 Installazione\n\n```bash\ngit clone https://github.com/youruser/python-reporter.git\ncd python-reporter\npip install -r requirements.txt\n```\n\n---\n\n## ⚙️ Configurazione\n\nModifica `config.yaml` secondo le tue esigenze:\n\n```yaml\nschedule: \"@every 30m\"      # oppure cron \"0 8 * * *\"\nsmtp:\n  host: \"smtp.example.com\"\n  port: 587\n  username: \"alert@example.com\"\n  password: \"supersecret\"\n  sender:   \"alert@example.com\"\n  recipients:\n    - \"admin1@example.com\"\n    - \"admin2@example.com\"\nlog:\n  path: \"server.log\"\n  level: \"INFO\"\n```\n\n---\n\n## ▶️ Esecuzione Manuale\n\n```bash\npython main.py\n```\n\n- Il processo rimane in foreground  \n- CTRL+C per terminare\n\n---\n\n## ⚙️ Installazione come Servizio\n\n### Windows\n\n1. Installa il servizio:\n   ```powershell\n   python windows_service.py install\n   ```\n2. Configura recovery policy:\n   ```powershell\n   sc.exe failure PyServerReport reset= 0 actions= restart/5000\n   ```\n3. Avvia:\n   ```powershell\n   python windows_service.py start\n   ```\n4. Stop \u0026 rimozione:\n   ```powershell\n   python windows_service.py stop\n   python windows_service.py remove\n   ```\n\n### Linux (systemd)\n\n1. Copia file:\n   ```bash\n   sudo mkdir -p /opt/server-report\n   sudo cp main.py config.yaml /opt/server-report/\n   sudo cp linux_server.service /etc/systemd/system/python-server-report.service\n   ```\n2. Abilita \u0026 avvia:\n   ```bash\n   sudo systemctl daemon-reload\n   sudo systemctl enable python-server-report\n   sudo systemctl start python-server-report\n   ```\n3. Status \u0026 log:\n   ```bash\n   sudo systemctl status python-server-report\n   journalctl -u python-server-report -f\n   ```\n\n---\n\n## 📦 Packaging\n\n### PyInstaller (Windows)\n\n```bash\npip install pyinstaller\npyinstaller --onefile app.py service.py\n# quindi:\ndist/service.exe install\n```\n\n### Docker\n\n1. Costruisci immagine:\n   ```bash\n   docker build -t py-server-reporter .\n   ```\n2. Esegui:\n   ```bash\n   docker run -d \\\n     -v $(pwd)/config.yaml:/app/config.yaml:ro \\\n     --name py-server-report \\\n     py-server-reporter\n   ```\n\n---\n\n## 🐞 Troubleshooting\n\n- **Email failures**: controlla credenziali e port forwarding SMTP  \n- **Svc non parte**: verifica che `service.py` punti al corretto interprete Python  \n- **systemd non parte**: usa `journalctl -xe` per debug  \n\n---\n\n## 🤝 Contribuire\n\n1. Fork del progetto  \n2. Branch feature: `git checkout -b feat/my-feature`  \n3. Commit e PR  \n\n---\n\n## 📄 Licenza\n\nGPL License – vedi [LICENSE](LICENSE)  \n\n---\n\n**Autore:** Bocaletto Luca (@bocaletto-luca)  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbocaletto-luca%2Fpy-server-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbocaletto-luca%2Fpy-server-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbocaletto-luca%2Fpy-server-gen/lists"}