tutorial

Monitoring ADempiere ERP with Vigilmon

ADempiere is a community-driven open source Java ERP used widely in Latin America, Germany, and Southeast Asia. Here's how to monitor its Java application server, PostgreSQL database, WebUI, JVM health, workflow engine, and accounting processes with Vigilmon.

ADempiere is one of the most widely deployed open source ERP platforms in the world — a Java-based system covering accounting, sales, purchasing, inventory, manufacturing, HR, and CRM, with a particularly strong presence in Latin America, Germany, and Southeast Asia. When you self-host ADempiere, you're running a multi-component Java stack: the ADempiere Java server (the ERP engine), JBoss/Wildfly (the application server), a ZK-based or modern web frontend, and PostgreSQL as the data store. A crash in any of these components can take down invoicing, accounting period processing, or financial reporting for your entire organization. Vigilmon gives you continuous monitoring across every layer of the ADempiere stack.

What You'll Set Up

  • HTTP uptime monitor for the ADempiere WebUI (ZK or modern frontend)
  • JBoss/Wildfly application server health check
  • PostgreSQL database connectivity and query latency monitor
  • JVM heap memory utilization monitor via cron heartbeat
  • Active user session count anomaly alert
  • Workflow engine stall detection
  • Accounting period close job health
  • JasperReport generation success monitor
  • PostgreSQL backup age alert
  • ADempiere version currency check

Prerequisites

  • ADempiere instance running on JBoss/Wildfly or standalone server
  • PostgreSQL database accessible (default port 5432)
  • WebUI accessible via HTTP/HTTPS (ZK WebUI typically port 8080)
  • A free Vigilmon account

Step 1: Monitor the ADempiere WebUI

The WebUI is the primary interface your users interact with. Whether you're running the classic ZK-based WebUI or a modern Vue.js/React community frontend, an uptime monitor catches crashes immediately.

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. Enter the WebUI URL: https://adempiere.yourdomain.com/webui/ (or http://your-server-ip:8080/webui/).
  4. Set Check interval to 1 minute.
  5. Set Expected HTTP status to 200.
  6. Under Keyword check, enter ADempiere to verify the login page loads and isn't returning a generic error page.
  7. Enable Monitor SSL certificate and set the expiry alert to 21 days.
  8. Click Save.

If you're running a modern React/Vue frontend, use its root URL and check for a keyword from the page title or app shell:

https://adempiere.yourdomain.com
Keyword: ADempiere

Step 2: Monitor the JBoss/Wildfly Application Server

ADempiere runs on JBoss/Wildfly as the application server container. Wildfly exposes a management console (typically port 9990) and a health endpoint you can probe directly.

  1. Click Add MonitorHTTP / HTTPS.
  2. URL: http://your-server-ip:9990/health (Wildfly management API health endpoint).
  3. Check interval: 1 minute
  4. Expected HTTP status: 200
  5. Under Keyword check, enter UP to confirm Wildfly reports healthy status.
  6. Click Save.

If the Wildfly management port is not exposed publicly, use a custom health script exposed via a lightweight HTTP endpoint on the server:

#!/bin/bash
# /opt/adempiere/health-check.sh
# Run via simple Python HTTP server or netcat in a cron job
STATUS=$(systemctl is-active wildfly)
if [ "$STATUS" = "active" ]; then
  echo "UP"
  exit 0
else
  echo "DOWN"
  exit 1
fi

Step 3: Monitor PostgreSQL Database Health

PostgreSQL holds all ADempiere ERP data — accounting entries, sales orders, invoices, inventory records, and financial periods. A database failure is a full system outage.

Add a TCP monitor to verify PostgreSQL is accepting connections:

  1. Click Add MonitorTCP Port.
  2. Host: your-server-ip (or localhost if Vigilmon agent is local).
  3. Port: 5432
  4. Check interval: 1 minute
  5. Click Save.

For a deeper health check, create a PostgreSQL monitoring query script that Vigilmon can probe via heartbeat:

-- Run this periodically to verify DB health
-- Alert if query latency exceeds 500ms
SELECT count(*) FROM ad_session WHERE isactive = 'Y';

Add a cron heartbeat in Vigilmon (see Step 5) to capture the result of a wrapper script that runs this check and pings Vigilmon on success.


Step 4: Monitor the ADempiere Java Server Process

The ADempiere Java server (the ERP engine) can fail independently of JBoss/Wildfly crashing. Use a cron heartbeat so the server pings Vigilmon every minute to prove it's running:

  1. In Vigilmon, click Add MonitorCron / Heartbeat.
  2. Name: ADempiere Java Server Heartbeat
  3. Set Expected interval to 2 minutes.
  4. Copy the generated heartbeat URL.

Add this to your ADempiere server's cron health script:

#!/bin/bash
# /opt/adempiere/scripts/vigilmon-heartbeat.sh

# Check ADempiere Java server process
if pgrep -f "org.adempiere" > /dev/null 2>&1; then
  curl -fsS --retry 3 "https://vigilmon.online/api/push/YOUR_HEARTBEAT_TOKEN" > /dev/null
fi
* * * * * /opt/adempiere/scripts/vigilmon-heartbeat.sh

If the ADempiere process dies, the heartbeat stops, and Vigilmon alerts you within 2 minutes.


Step 5: Monitor JVM Heap Memory

ADempiere is a Java ERP with a substantial memory footprint. JVM heap exhaustion causes OutOfMemoryError exceptions that corrupt in-flight transactions. Monitor heap usage with a heartbeat script:

  1. Create another Cron / Heartbeat monitor named ADempiere JVM Heap Health with a 5-minute interval.
  2. Copy the heartbeat URL.

Script:

#!/bin/bash
# /opt/adempiere/scripts/jvm-heap-check.sh

# Get heap usage via jstat (requires JDK on PATH)
ADEMPIERE_PID=$(pgrep -f "org.adempiere" | head -1)
if [ -z "$ADEMPIERE_PID" ]; then
  echo "ADempiere not running"
  exit 1
fi

HEAP_USED=$(jstat -gc "$ADEMPIERE_PID" | awk 'NR==2 {used=$3+$4+$6+$8; total=$5+$7+$9; printf "%.0f", (used/total)*100}')

if [ "$HEAP_USED" -lt 85 ]; then
  curl -fsS --retry 3 "https://vigilmon.online/api/push/YOUR_JVM_HEAP_TOKEN" > /dev/null
else
  echo "Heap at ${HEAP_USED}% — alert threshold exceeded, not pinging heartbeat"
fi
*/5 * * * * /opt/adempiere/scripts/jvm-heap-check.sh

When heap exceeds 85%, the heartbeat goes silent and Vigilmon fires an alert.


Step 6: Monitor Active User Sessions

Unusually low or high session counts can indicate a login failure (too low) or a session leak/DoS (too high). Query the ADempiere session table:

-- Returns count of active ERP sessions
SELECT COUNT(*) AS active_sessions
FROM ad_session
WHERE isactive = 'Y'
  AND created > NOW() - INTERVAL '8 hours';

Wrap this in a heartbeat script that only pings Vigilmon when the session count is within the expected range for your organization (e.g., between 0 and 200 for a normal business day):

#!/bin/bash
SESSION_COUNT=$(psql -U adempiere -d adempiere -t -c \
  "SELECT COUNT(*) FROM ad_session WHERE isactive = 'Y' AND created > NOW() - INTERVAL '8 hours';" | tr -d ' ')

if [ "$SESSION_COUNT" -le 200 ]; then
  curl -fsS "https://vigilmon.online/api/push/YOUR_SESSION_TOKEN"
fi

Step 7: Monitor the Workflow Engine

ADempiere's workflow engine automates business processes — order approval flows, payment workflows, and period-close sequences. Stalled workflows block business operations silently.

-- Stalled workflow detection: workflows running > 2 hours without completion
SELECT COUNT(*) AS stalled_workflows
FROM ad_wf_process
WHERE wfstate NOT IN ('CC', 'XE')  -- not completed or terminated
  AND created < NOW() - INTERVAL '2 hours';

Add a heartbeat script that pings Vigilmon only when stalled workflow count is zero (or within an acceptable threshold). If your organization has workflows that legitimately run for hours, adjust the interval to match your SLA.


Step 8: Monitor Accounting Period Close Jobs

ADempiere's period-close process locks accounting periods and generates period-end reports. A missed period close causes accounting inconsistencies.

-- Verify the current period is closed if it's past month-end
SELECT p.name, p.periodstatus
FROM c_period p
JOIN c_year y ON p.c_year_id = y.c_year_id
WHERE y.fiscalyear = EXTRACT(YEAR FROM NOW())
ORDER BY p.startdate DESC
LIMIT 1;

Set up a monthly scheduled check: add a Vigilmon heartbeat with a 25-hour expected interval, triggered by your month-end close automation script after it successfully completes the period close.


Step 9: Monitor JasperReport Generation

ADempiere uses JasperReports for financial reports — balance sheets, P&L statements, aged receivables. Report failures during period close can block your finance team.

Create a synthetic report health check that generates a lightweight test report via the ADempiere API:

#!/bin/bash
# /opt/adempiere/scripts/report-health-check.sh

START_TIME=$(date +%s)

# Attempt to generate a lightweight test report
RESULT=$(curl -sf --max-time 60 \
  -H "Authorization: Bearer $ADEMPIERE_API_TOKEN" \
  "http://localhost:8080/api/v1/reports/test" \
  -o /dev/null -w "%{http_code}")

END_TIME=$(date +%s)
DURATION=$((END_TIME - START_TIME))

if [ "$RESULT" = "200" ] && [ "$DURATION" -lt 60 ]; then
  curl -fsS "https://vigilmon.online/api/push/YOUR_REPORT_TOKEN"
fi

Step 10: Monitor Database Backup Age

Your ADempiere PostgreSQL database holds financial records that must be recoverable. Alert if the backup is more than 25 hours old:

#!/bin/bash
# /opt/adempiere/scripts/backup-age-check.sh

BACKUP_DIR="/var/backups/adempiere"
LATEST_BACKUP=$(ls -t "$BACKUP_DIR"/*.dump 2>/dev/null | head -1)

if [ -z "$LATEST_BACKUP" ]; then
  echo "No backup found"
  exit 1
fi

BACKUP_AGE_HOURS=$(( ($(date +%s) - $(stat -c %Y "$LATEST_BACKUP")) / 3600 ))

if [ "$BACKUP_AGE_HOURS" -lt 25 ]; then
  curl -fsS "https://vigilmon.online/api/push/YOUR_BACKUP_TOKEN"
fi

Run this check hourly:

0 * * * * /opt/adempiere/scripts/backup-age-check.sh

Step 11: Configure Alerting

With monitors in place, configure alert escalation in Vigilmon:

  1. Go to Alert ChannelsAdd Channel.
  2. Add your primary channel (email, Slack, PagerDuty, or webhook).
  3. For the WebUI and JBoss/Wildfly monitors, set escalation to immediate — these are user-facing outages.
  4. For JVM heap and PostgreSQL monitors, set 2-failure confirmation before alerting to avoid transient spikes.
  5. For workflow stall and period close monitors, route to a finance operations channel — these are business process issues that require accounting team attention, not just DevOps.

Recommended alert thresholds:

| Monitor | Threshold | Channel | |---|---|---| | WebUI HTTP | Any failure | Primary on-call | | JBoss/Wildfly | Any failure | Primary on-call | | PostgreSQL TCP | Any failure | Primary on-call | | JVM Heap >85% | Heartbeat miss | DevOps | | Stalled Workflows >0 | Heartbeat miss | Finance Ops | | Backup age >25h | Heartbeat miss | DevOps | | JasperReport timeout | Heartbeat miss | Finance Ops |


Conclusion

ADempiere's multi-component Java architecture means multiple independent failure modes — the JVM can OOM, the workflow engine can stall, PostgreSQL can fill its disk, and JasperReports can time out under load, all while the HTTP health check still returns 200. The monitoring setup above covers every critical layer: user-facing availability (WebUI, JBoss), infrastructure health (PostgreSQL, JVM heap), business process integrity (workflows, period close, report generation), and data durability (backup age).

With Vigilmon running across all ten monitors, you'll know within minutes when anything in your ADempiere stack needs attention — before your finance team discovers it themselves.

Monitor your app with Vigilmon

Free plan — 5 monitors, no credit card required. Up and running in 60 seconds.

Start free →