Skip to content
myosicam.us

Operational Monitoring

MyOsicam provides three overlapping monitoring signals that together give you a complete view of your fleet’s operational state: agent heartbeats (is the agent reachable?), resource readings (is the OScam process healthy?), and install health checks (is OScam responding?).

Agent heartbeat and online/offline status

Every registered agent sends a heartbeat to the panel on a regular interval. The panel uses heartbeat recency to derive a live online/offline/unknown status for each agent:

StatusMeaning
Online (green)The agent sent a heartbeat within the configured staleness window (default: 60 seconds).
Offline (red)No heartbeat has been received within the staleness window.
Unknown (grey)The agent registered but has never sent a heartbeat.

Status is computed at read time from the agents.last_seen timestamp — there is no stored status flag, so the badge always reflects the most recent information the panel has.

Adjusting the staleness threshold

The staleness window defaults to 60 seconds and is configurable via the AGENT_HEARTBEAT_THRESHOLD_SECONDS environment variable in config/.env:

config/.env
AGENT_HEARTBEAT_THRESHOLD_SECONDS=60

After changing this value, restart PHP-FPM:

Restart PHP-FPM to apply the new threshold
sudo systemctl restart php8.3-fpm

Auto-refresh on the Agents list

The Agents list page in the panel refreshes status badges every 30 seconds via AJAX — matching the agent heartbeat interval — so you see transitions from Online to Offline within one cycle without a full page reload.

Resource readings

The panel collects CPU usage, RAM consumption, and disk usage from each managed server via the local agent. Readings are stored as timestamped snapshots in the resource_readings table.

MetricSourceUnit
CPU usage/proc/{pid}/stat (OScam process)Percentage (%)
RAM consumption/proc/{pid}/status (OScam process)Megabytes (MB)
Disk usageOScam instance base directoryMegabytes (MB)

Collection schedule

Resource data is collected automatically by the oscam-resource scheduled job. The default collection interval is every 5 minutes. You can view and adjust the schedule in the panel’s SettingsJobs area.

Data retention

Resource readings are retained for at least 30 days. The panel’s audit-retention cron job prunes older snapshots automatically. Check the Logs section of your panel for retention-related cron log entries if you need to confirm the active retention window.

Viewing resource readings

  1. Log in to the panel.
  2. In the left sidebar, click OSCam Installs.
  3. The installs table shows the most recent CPU %, Memory MB, and Disk MB inline for each running install.
  4. Open an individual install’s detail view to see a resource history section with readings over the past 24 hours.

Install health checks

The panel runs an oscam-health scheduled job that checks the reachability of each OScam install’s WebIF endpoint. Results are reflected in the install’s health status column on the OSCam Installs list.

The health check is separate from the resource monitoring job:

JobWhat it checksDefault schedule
oscam-healthWebIF HTTP reachabilityHourly
oscam-resourceCPU / RAM consumption / disk metricsEvery 5 minutes

You can trigger either job manually from the SettingsJobs area of the panel without waiting for the next scheduled run.

What to watch for

Agent offline unexpectedly

An agent transitioning to Offline when you did not manually stop it usually means:

  • The agent process crashed. Check the systemd journal on the server:
    Terminal window
    journalctl -u myosicam-agent -n 50
  • The VPS was rebooted and the agent did not start automatically. The agent service is configured with Restart=always — if it did not come back, check the service status:
    Terminal window
    systemctl status myosicam-agent
  • Outbound HTTPS connectivity from the server to the panel URL is broken (firewall, DNS).

Sustained high CPU or RAM readings

A CPU reading near 100% on a single-core VPS, or a steadily climbing RAM reading, may indicate:

  • An unusual card-sharing load or a large number of simultaneous connections.
  • A runaway OScam process.

Check your OScam logs for excessive connection attempts. If the install is no longer needed, see Removing an OScam Install.

Resource readings stop appearing

If the install list shows no resource data for an install that was previously reporting:

  • Confirm the agent is Online (green badge on the Agents list).
  • Confirm the oscam-resource job is not disabled in SettingsJobs.
  • Check the cron log for collection errors: Logs → filter by oscam-resource.