Cloee Docs
Paymenter ExtensionsProxmox Auto Stock

Installation

1. Install the extension\

  1. Install the extension
    In the admin panel open /admin/extensions/extension?tab=installable upload the Proxmox Auto Stock and install/enable it.
    The bundled migrations run automatically.

  2. Configure global defaults in Admin → Extensions → Auto Stock:

    SettingDescription
    Enable scheduled auto stock runsTurns on the Laravel scheduled job.
    Schedule intervalHow frequently the scheduler should recalc stock (5 min – 24 hr).
    Enable automation by default for new locationsIf on, newly created locations start with automation enabled.
    Default RAM/CPU/Disk reserve %Safety buffers applied when a location has no custom reserves.
    Default minimum stock per productFloor value for automation (0 disables).
    Capacity factorWhich resource determines remaining capacity (all, ram, cpu, disk).
  3. Create/verify Proxmox locations and nodes
    Ensure each location has at least one node with memory, CPU, and disk limits set (0 means unlimited).

  4. Enable automation per location
    Navigate to Admin → Extensions → Proxmox Auto Stock.
    Each location card shows an “Enable Automation” toggle, reserve percentages, and capacity metrics.

  5. Set location reserves (optional)
    Adjust RAM/CPU/Disk reserve percentages, then click Save Reserves.


How Automation Works

  1. The scheduler (or a manual trigger) calls proxmox:auto-stock.
  2. For each enabled location the service:
    • Collects node totals and existing usage.
    • Applies reserves and the selected capacity factor.
    • Calculates how many additional services can be provisioned for each product.
    • Updates products.stock and logs the change in ext_proxmox_auto_stock_logs.

If a product is marked as manually overridden in the settings it is skipped unless you pass --force.


Running Jobs Manually

From the Dashboard

  • Run Now / Demo Run (per location) – buttons on each card.
  • Run Now (All Locations) / Demo Run (All Locations) – global buttons at the top of the page.

Demo runs preview adjustments without changing stock.

Using Artisan

php artisan proxmox:auto-stock {location_id?} \
  [--dry] \
  [--force] \
  [--trigger=manual]
  • location_id – optional; omit to run against every location.
  • --dry – preview without writing to the database.
  • --force – process even if automation is disabled or a product is manually overridden.
  • --trigger – text that appears in the log (defaults to manual).

Scheduled runs execute the same command with --trigger=scheduled.


Monitoring & Logs

  • Recent runs list – bottom of the dashboard shows the last 25 entries with per-product changes.

  • Database table – query ext_proxmox_auto_stock_logs for historical data:

    mysql -u root -p paymenter \
      -e 'SELECT `trigger`, status, message, created_at FROM ext_proxmox_auto_stock_logs ORDER BY created_at DESC LIMIT 20;'
  • Snapshots – each successful run stores capacity data in ext_proxmox_auto_stock_snapshots.


Troubleshooting

SymptomFix
Dashboard says “Scheduler disabled. Runs occur on demand only.”Enable the scheduler in extension settings or verify the cron entry.
No scheduled entries in the logEnsure locations are enabled and cron is executing schedule:run. Lower the interval to 1 minute for quick verification.
Artisan command “namespace not defined”Update to the latest version of the extension (command registration added).
Job fails with “There are no commands defined in the app namespace.”Remove or reintroduce legacy scheduled commands (e.g., app:fetch-emails) before the scheduler reaches Auto Stock.
Stock does not changeThe capacity factor/reserve combination may leave zero available headroom. Adjust reserves, change the capacity factor, or review product resource requirements.

Tips

  • Use Demo Run after adjusting reserves to understand the impact before committing changes.
  • For large environments consider enabling notifications or webhooks based on the auto stock log table.
  • Keep Proxmox node limits accurate—set realistic memory, CPU, and disk values so capacity calculations are meaningful.

On this page