Metadata-Version: 2.4
Name: inferyx-monitoring
Version: 1.0.50
Summary: Monitor batch pipelines via API and email alerts — install and deploy on Linux servers from PyPI
Author-email: Inferyx DevOps <devops@inferyx.com>
License: Copyright (c) 2026 Inferyx. All rights reserved.
        
        Proprietary software. Unauthorized copying, distribution, or use is prohibited
        unless agreed in writing with Inferyx.
        
        For open-source release, replace this file with your chosen license (e.g. MIT, Apache-2.0)
        before publishing to public PyPI.
        
Keywords: batch,monitoring,pipeline,email,inferyx
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: System Administrators
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas>=2.0.0
Requires-Dist: requests>=2.31.0
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: fastapi>=0.110.0
Requires-Dist: python-multipart>=0.0.9
Requires-Dist: uvicorn[standard]>=0.27.0
Requires-Dist: pydantic>=2.0.0
Provides-Extra: admin
Provides-Extra: dev
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: check-manifest; extra == "dev"
Dynamic: license-file

# inferyx-monitoring

**Version:** 1.0.50 · **PyPI:** [inferyx-monitoring](https://pypi.org/project/inferyx-monitoring/)

Batch monitor + admin UI. One package, one service, **one install directory** (`/opt/pipeline-monitor`).

---

## User URL (browser only)

| Environment | Open in browser |
|-------------|-----------------|
| Local | http://localhost/monitoring/admin/ |
| Production | https://\<your-host\>/monitoring/admin/ |

The UI calls `/monitoring/api/` automatically via nginx — users do not open the API URL.

---

## Commands

| Step | Command |
|------|---------|
| **Install** (new server) | `sudo bash release/install.sh` |
| **Upgrade** (existing) | `sudo bash release/upgrade.sh` |
| **Build** (maintainer) | `./scripts/release.sh` |
| **Publish** (maintainer) | `./scripts/release.sh --publish` |
| **Test locally** (WSL) | `sudo bash scripts/test-local.sh all` |

After pip install: `/opt/pipeline-monitor/.venv/share/inferyx-monitoring/install.sh`

Docs: [docs/BUILD.md](docs/BUILD.md) (maintainers) · [docs/CHANGELOG.md](docs/CHANGELOG.md) (PyPI)

---

## Project layout

```
Monitor/
├── docs/              BUILD.md, CHANGELOG.md (only docs in repo)
├── development/       Local dev templates + gitignored secrets
├── release/           install.sh, upgrade.sh, nginx/auth templates (in wheel)
├── scripts/           release.sh, build-ui.sh, test-local.sh
├── admin-ui/          Angular source (build → admin_static in wheel)
└── inferyx_pipeline_monitor/
    └── data/          .env.example, batch_file.csv.example
```

---

## Install (`/opt/pipeline-monitor`)

```
/opt/pipeline-monitor/
├── .venv/
├── .env
├── batch_file.csv
├── auth.policy
├── www/                 Admin UI (nginx → /monitoring/admin/)
├── secrets/
└── logs/monitor.log
```

```bash
sudo bash release/install.sh
# Pin: sudo bash release/install.sh --pin 1.0.50
```

Edit config, then nginx:

```bash
sudo -u inferyx vi /opt/pipeline-monitor/.env
sudo vi /opt/pipeline-monitor/auth.policy
sudo cp /opt/pipeline-monitor/.venv/share/inferyx-monitoring/nginx.conf.example \
  /etc/nginx/sites-available/pipeline-monitor
sudo rm -f /etc/nginx/sites-enabled/default   # local: avoid 404 from default site
sudo ln -sf /etc/nginx/sites-available/pipeline-monitor /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx
```

### Service control

```bash
sudo inferyx-monitoring status
sudo inferyx-monitoring restart
sudo inferyx-monitoring-ctl logs
```

Server checks (not for end users):

```bash
curl -s http://127.0.0.1:8090/api/health
sudo systemctl status inferyx-monitoring.service
```

---

## Upgrade

```bash
sudo bash /opt/pipeline-monitor/.venv/share/inferyx-monitoring/upgrade.sh
```

---

## Configuration

- **`.env`** — template: `inferyx_pipeline_monitor/data/.env.example`
- **`auth.policy`** — template: `release/auth.policy.example` (Google SSO, UI URL)
- **Nginx** — template: `release/nginx.conf.example` (disable `sites-enabled/default` on local test)

---

## Troubleshooting

| Symptom | Fix |
|---------|-----|
| nginx 404 on `/monitoring/admin/` | Remove `sites-enabled/default`; use `nginx.conf.example` (no broken `try_files` + `alias`) |
| Admin UI "Unavailable" | `curl http://127.0.0.1:8090/api/ui/status`; check nginx `/monitoring/api/` |
| Service restart loop | `journalctl -u inferyx-monitoring -n 50` — fill `.env` secrets |
| Logs | `tail -f /opt/pipeline-monitor/logs/monitor.log` |

---

## What's new in 1.0.50

- Service control: `inferyx-monitoring start|restart|status|logs`
- Batch CSV upload/download in Admin UI
- Fixed nginx example for `/monitoring/admin/` (alias + SPA fallback)
- Install scripts in `release/` (PyPI wheel)
