Skip to main content

Monitor batch pipelines via API and email alerts — install and deploy on Linux servers from PyPI

Project description

inferyx-monitoring

Version: 1.0.44 · PyPI: inferyx-monitoring

Monitors batch jobs from a CSV file, queries the Inferyx API, and sends email alerts (optional Teams / Google Chat). Includes admin web UI and API — one package, one systemd service.

Alert When
failed Batch execution failed
running Still running past expected end
missed Did not start on schedule
no_data No API record (email to DevOps)

Disable browser UI only: "ui": { "enabled": false } in /etc/pipeline-monitor/auth.policy. Monitor and admin API keep running.


What's new in 1.0.44

  • Production install: one script installs from PyPI (no manual pip step required).
  • Skips user/group/directory creation if they already exist.
  • Final install and upgrade steps for production servers.

Paths

Item Path
Install directory /opt/pipeline-monitor
Python venv /opt/pipeline-monitor/.venv
Install script /opt/pipeline-monitor/.venv/share/inferyx-monitoring/install_inferyx_monitoring.sh
Upgrade script /opt/pipeline-monitor/.venv/share/inferyx-monitoring/upgrade_inferyx_monitoring.sh
Monitor config /opt/pipeline-monitor/.env
Batch CSV /opt/pipeline-monitor/batch_file.csv
OAuth policy /etc/pipeline-monitor/auth.policy
UI static files /var/www/pipeline-monitor-admin/
Nginx config /etc/nginx/sites-available/pipeline-monitor-admin
systemd service inferyx-monitoring.service
Public UI https://<host>/monitoring/admin/
Public API https://<host>/monitoring/api/

Install (new server)

Use when /opt/pipeline-monitor is not set up yet.
For an existing install, use Upgrade — do not re-run install.

Option A — One command (recommended)

Copy install_inferyx_monitoring.sh to the server (from the pip package, git repo server/ folder, or a colleague). Then run:

sudo bash install_inferyx_monitoring.sh

No prior pip install needed. The script automatically:

Step Action
1 Installs python3 / python3-venv via apt (if missing)
2 Creates user inferyx (only if user does not exist)
3 Creates /opt/pipeline-monitor and Python venv
4 pip install inferyx-monitoring from PyPI
5 Creates .env and batch_file.csv (if missing)
6 Creates auth.policy (if missing)
7 Deploys UI to /var/www/pipeline-monitor-admin/
8 Enables inferyx-monitoring.service

Pin a version: sudo bash install_inferyx_monitoring.sh --pin 1.0.44

Option B — First time when you only have PyPI (no script file yet)

Bootstrap pip to get the install script, then run it:

sudo apt update && sudo apt install -y python3 python3-venv

id inferyx &>/dev/null || sudo useradd --system --home-dir /opt/pipeline-monitor --shell /usr/sbin/nologin inferyx
sudo mkdir -p /opt/pipeline-monitor && sudo chown inferyx:inferyx /opt/pipeline-monitor
sudo -u inferyx python3 -m venv /opt/pipeline-monitor/.venv
sudo -u inferyx /opt/pipeline-monitor/.venv/bin/pip install inferyx-monitoring

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

The install script is idempotent — it skips user, venv, and existing config files.

After install — edit config (manual)

sudo -u inferyx vi /opt/pipeline-monitor/.env
sudo -u inferyx vi /opt/pipeline-monitor/batch_file.csv
sudo chmod 600 /opt/pipeline-monitor/.env
sudo vi /etc/pipeline-monitor/auth.policy

sudo cp /opt/pipeline-monitor/.venv/share/inferyx-monitoring/nginx-pipeline-monitor-admin.conf.example \
  /etc/nginx/sites-available/pipeline-monitor-admin
sudo vi /etc/nginx/sites-available/pipeline-monitor-admin
sudo ln -sf /etc/nginx/sites-available/pipeline-monitor-admin /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx
File You set
.env SMTP, API token, alert emails
batch_file.csv Batch names and schedules
auth.policy OAuth, ui.enabled
nginx site server_name, SSL certificates

Verify

sudo -u inferyx /opt/pipeline-monitor/.venv/bin/inferyx-monitoring --once --work-dir /opt/pipeline-monitor
sudo systemctl status inferyx-monitoring.service
curl -s http://127.0.0.1:8090/api/health

Upgrade (existing server)

Use when /opt/pipeline-monitor already exists.

sudo bash /opt/pipeline-monitor/.venv/share/inferyx-monitoring/upgrade_inferyx_monitoring.sh
Step Action
1 pip install --upgrade inferyx-monitoring
2 Adds missing .env keys (secrets unchanged)
3 Deploys UI to /var/www/pipeline-monitor-admin/
4 Updates systemd unit
5 Restarts inferyx-monitoring.service

Review manually (not changed by upgrade):

File You review
.env SMTP, API token
auth.policy OAuth, ui.enabled
nginx SSL, server_name
sudo systemctl status inferyx-monitoring.service
sudo journalctl -u inferyx-monitoring.service -n 50
curl -s http://127.0.0.1:8090/api/health

Configuration

.env (/opt/pipeline-monitor/.env)

Required:

Property Description
PIPELINE_SMTP_HOST SMTP server
PIPELINE_SMTP_PORT SMTP port (e.g. 587)
PIPELINE_SMTP_USERNAME SMTP username
PIPELINE_SMTP_PASSWORD SMTP password
PIPELINE_FROM_NAME Sender name
PIPELINE_MAIL_TO Alert recipients (comma-separated)
PIPELINE_API_BASE_URL Inferyx API URL (no name= in URL)
PIPELINE_API_TOKEN API token
PIPELINE_API_TOKEN_HEADER Header name (token or Authorization)
PIPELINE_DEVOPS_EMAIL no_data alert recipient

Common optional:

Property Default Description
PIPELINE_CHECK_MODE schedule_windows schedule_windows or full_window
PIPELINE_CHECK_WINDOW_MINUTES 10 API poll window (minutes)
PIPELINE_TEAMS_ENABLED false Teams webhook alerts
PIPELINE_TEAMS_WEBHOOK_URL (empty) Teams webhook URL
PIPELINE_GCHAT_ENABLED false Google Chat alerts
PIPELINE_GCHAT_WEBHOOK_URL (empty) Google Chat webhook URL

Missing keys are added on service start. Secrets are never overwritten.

auth.policy (/etc/pipeline-monitor/auth.policy)

JSON file. Not updated by install/upgrade scripts.

Property Example Description
ui.enabled true false = disable browser UI only
ui.public_base_url https://monitor.example.com Public URL
ui.ui_base_path /monitoring/admin/ UI path
auth.google.client_id ...apps.googleusercontent.com OAuth client ID
auth.google.client_secret_path /etc/pipeline-monitor/google_client_secret Secret file
auth.google.redirect_uri https://<host>/monitoring/api/auth/callback/google OAuth redirect
auth.google.allowed_domains ["example.com"] Allowed domains

Google client secret:

echo 'YOUR_CLIENT_SECRET' | sudo tee /etc/pipeline-monitor/google_client_secret
sudo chmod 600 /etc/pipeline-monitor/google_client_secret

Disable browser UI:

"ui": { "enabled": false }

Then: sudo systemctl restart inferyx-monitoring.service

Nginx

Template: /opt/pipeline-monitor/.venv/share/inferyx-monitoring/nginx-pipeline-monitor-admin.conf.example

Live: /etc/nginx/sites-available/pipeline-monitor-admin

Reload after edits: sudo nginx -t && sudo systemctl reload nginx

Batch CSV (/opt/pipeline-monitor/batch_file.csv)

Name,Frequency,ExpectedStartTime,AvgExecutionTime,ExpectedDayOfMonth,Status
daily_report,Daily,9:00:00,"10 mins",,Active
monthly_close,Monthly,6:00:00,"45 mins",1,Active
Column Values
Name Batch name in Inferyx API
Frequency Daily, Weekly, Monthly, Once
ExpectedStartTime HH:MM:SS (24-hour)
AvgExecutionTime e.g. "10 mins"
ExpectedDayOfMonth Day 1–31 (monthly only)
Status Active or Suspended

Only Active rows are monitored.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inferyx_monitoring-1.0.44.tar.gz (169.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inferyx_monitoring-1.0.44-py3-none-any.whl (181.2 kB view details)

Uploaded Python 3

File details

Details for the file inferyx_monitoring-1.0.44.tar.gz.

File metadata

  • Download URL: inferyx_monitoring-1.0.44.tar.gz
  • Upload date:
  • Size: 169.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for inferyx_monitoring-1.0.44.tar.gz
Algorithm Hash digest
SHA256 29f13c874376ae23c0d85fc73c1d1c76a6eb1e0afa97d2860932b6a2aecf4960
MD5 5ddb8926c65827d6b2b0d325955c0357
BLAKE2b-256 6d79637e7913579c0cc741bc832c9d1d8c2a10bec7903c01c0e08606b2fc6d49

See more details on using hashes here.

File details

Details for the file inferyx_monitoring-1.0.44-py3-none-any.whl.

File metadata

File hashes

Hashes for inferyx_monitoring-1.0.44-py3-none-any.whl
Algorithm Hash digest
SHA256 59b7dc72b1b51ba50b5a17e922a9b9ee65b57a78c72e85b320b6aa1f0b1c3545
MD5 3397995dce8629324b8954089ce48506
BLAKE2b-256 681055138872816c6ce93d74493f4e0693fbfc1fa8e8e0d25341054a9a0cae06

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page