tutorial

Monitoring Alfresco Content Services with Vigilmon

Alfresco is enterprise content management at scale — but a stale Solr index means broken search, and a full content store means failed document uploads. Here's how to monitor every layer of Alfresco with Vigilmon: repository, Share UI, Solr, PostgreSQL, ActiveMQ, and storage.

Alfresco Content Services (ACS) is one of the leading open source Enterprise Content Management platforms, used by regulated industries worldwide for document management, records management, and content collaboration. With its multi-tier architecture — a Java repository, a separate Share web UI, Solr search, PostgreSQL, ActiveMQ, and the Transform Service — each layer is a potential point of failure that can degrade the system in different ways: a stale Solr index causes search to return outdated results, a full content store silently fails document uploads, and an ActiveMQ failure halts document transformation. Vigilmon gives you continuous monitoring across every tier of your Alfresco deployment.

What You'll Set Up

  • HTTP health monitor for the Alfresco Repository REST API
  • HTTP health monitor for Alfresco Share
  • Solr search index sync health check
  • PostgreSQL connectivity monitor
  • Content store disk space monitor
  • ActiveMQ health check
  • Alfresco Transform Service (ATS) health check
  • Document upload success rate heartbeat
  • License expiry alert (Enterprise)

Prerequisites

  • Alfresco Content Services 6.x or 7.x deployed (Community or Enterprise)
  • Apache Solr running as Alfresco Search Services (ASS)
  • PostgreSQL as the Alfresco database
  • ActiveMQ running for the Transform Service
  • A free Vigilmon account
  • SSH access to the Alfresco server

Step 1: Monitor the Alfresco Repository

The Alfresco Repository (alfresco.war) provides the core content services. Its REST API exposes a health-checkable endpoint at the nodes API:

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. Enter the Alfresco REST API health URL:
    https://alfresco.yourdomain.com/alfresco/api/-default-/public/alfresco/versions/1/nodes/-root-
    
  4. Add an Authorization header with a service account credential:
    Authorization: Basic base64(admin:your_password)
    
  5. Set Check interval to 1 minute.
  6. Set Expected HTTP status to 200.
  7. Click Save.

A 200 response from the nodes API confirms the repository JVM, Spring context, and database connectivity are all operational. A 503 or timeout indicates the repository is down or starting up.

For a lighter-weight check, use the actuator-style status endpoint if your deployment exposes it:

https://alfresco.yourdomain.com/alfresco/s/api/server

This endpoint returns server version and status without requiring authentication.


Step 2: Monitor Alfresco Share

Alfresco Share (share.war) is the collaboration web UI that end users interact with for document management, sites, and workflow. Share is deployed as a separate webapp and communicates with the repository via REST API.

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter the Share URL: https://alfresco.yourdomain.com/share
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 1 minute.
  5. Enable Monitor SSL certificate with a 21 day alert threshold.
  6. Click Save.

Share availability is independent of repository availability — Share can be down while the repository is healthy (e.g., Tomcat issue with the share.war deployment). Monitoring them separately catches this split-brain scenario.


Step 3: Solr Search Index Health

Alfresco uses Apache Solr (via Alfresco Search Services) for full-text search. Solr synchronizes with the Alfresco repository by polling for new/changed nodes. If Solr falls behind, users see stale or missing search results — a silent, UX-degrading failure.

Create a probe script that checks the Solr index lag:

#!/bin/bash
# /usr/local/bin/check-alfresco-solr.sh
ALFRESCO_HOST="localhost"
ALFRESCO_PORT=8080
SOLR_HOST="localhost"
SOLR_PORT=8983
ADMIN_USER="admin"
ADMIN_PASS="your_admin_password"
MAX_LAG_SECONDS=600   # 10 minutes
VIGILMON_HEARTBEAT="https://vigilmon.online/heartbeat/YOUR_SOLR_HEARTBEAT_ID"

# Get Alfresco repository transaction count
REPO_TX=$(curl -s -u "$ADMIN_USER:$ADMIN_PASS" \
  "http://$ALFRESCO_HOST:$ALFRESCO_PORT/alfresco/service/api/solr/transactions?minTxnId=0&maxResults=1" \
  2>/dev/null | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('maxTxnId', 0))" 2>/dev/null)

# Get Solr last indexed transaction
SOLR_TX=$(curl -s \
  "http://$SOLR_HOST:$SOLR_PORT/solr/alfresco/admin/summary?wt=json" \
  2>/dev/null | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('Summary',{}).get('TX Indexer',{}).get('Last Indexed',0))" 2>/dev/null)

if [ -z "$REPO_TX" ] || [ -z "$SOLR_TX" ]; then
    echo "Could not retrieve Solr/repo transaction IDs at $(date)" >> /var/log/alfresco-monitor.log
    exit 1
fi

LAG=$((REPO_TX - SOLR_TX))

if [ "$LAG" -gt 100 ]; then
    echo "Solr index lag: $LAG transactions behind repository" >> /var/log/alfresco-monitor.log
    exit 1
fi

curl -s "$VIGILMON_HEARTBEAT" > /dev/null
chmod +x /usr/local/bin/check-alfresco-solr.sh
echo "*/5 * * * * root /usr/local/bin/check-alfresco-solr.sh" > /etc/cron.d/alfresco-solr

Set the Vigilmon heartbeat interval to 8 minutes.


Step 4: Monitor PostgreSQL

All Alfresco node metadata, ACLs, audit logs, and workflow process data live in PostgreSQL. A database failure makes the repository unavailable.

Add a TCP port monitor:

  1. Click Add MonitorTCP Port.
  2. Enter 127.0.0.1 (or your database server IP) and set Port to 5432.
  3. Set Check interval to 1 minute.
  4. Click Save.

For a deeper query latency check:

#!/bin/bash
# /usr/local/bin/check-alfresco-db.sh
DB_USER="alfresco"
DB_NAME="alfresco"
PGPASSWORD="your_db_password"
MAX_LATENCY_MS=1000
VIGILMON_HEARTBEAT="https://vigilmon.online/heartbeat/YOUR_DB_HEARTBEAT_ID"

START=$(date +%s%3N)
RESULT=$(psql -U "$DB_USER" -d "$DB_NAME" \
  -c "SELECT count(*) FROM alf_node WHERE type_qname_id IS NOT NULL LIMIT 1;" \
  -t -q 2>/dev/null)
END=$(date +%s%3N)
LATENCY=$((END - START))

if [ -z "$RESULT" ] || [ "$LATENCY" -gt "$MAX_LATENCY_MS" ]; then
    echo "Alfresco DB check failed: ${LATENCY}ms" >> /var/log/alfresco-monitor.log
    exit 1
fi

curl -s "$VIGILMON_HEARTBEAT" > /dev/null
echo "* * * * * root /usr/local/bin/check-alfresco-db.sh" > /etc/cron.d/alfresco-db

Step 5: Content Store Disk Space

Alfresco stores all document binaries in a content store — by default on the local filesystem at /opt/alfresco/alf_data/contentstore. When this fills up, document uploads fail with an opaque error.

#!/bin/bash
# /usr/local/bin/check-alfresco-contentstore.sh
CONTENT_STORE_PATH="/opt/alfresco/alf_data/contentstore"
ALERT_THRESHOLD=80
VIGILMON_HEARTBEAT="https://vigilmon.online/heartbeat/YOUR_CONTENTSTORE_HEARTBEAT_ID"

USAGE=$(df "$CONTENT_STORE_PATH" | awk 'NR==2 {print $5}' | tr -d '%')

if [ "${USAGE:-0}" -gt "$ALERT_THRESHOLD" ]; then
    echo "Content store disk at ${USAGE}% — exceeds ${ALERT_THRESHOLD}% threshold" >> /var/log/alfresco-monitor.log
    exit 1
fi

curl -s "$VIGILMON_HEARTBEAT" > /dev/null
echo "*/10 * * * * root /usr/local/bin/check-alfresco-contentstore.sh" > /etc/cron.d/alfresco-contentstore

Set the Vigilmon heartbeat interval to 15 minutes.


Step 6: ActiveMQ Health

The Alfresco Transform Service (ATS) communicates with Alfresco via ActiveMQ. If ActiveMQ goes down, document transformation stops — users can upload documents but previews and PDF conversions fail to generate.

Add a TCP port monitor for ActiveMQ:

  1. Click Add MonitorTCP Port.
  2. Set Port to 61616 (ActiveMQ default broker port).
  3. Set Check interval to 1 minute.
  4. Click Save.

Also monitor the ActiveMQ web console for deeper health:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter: http://activemq.yourdomain.com:8161/admin/
  3. Set Expected HTTP status to 200.
  4. Click Save.

Step 7: Alfresco Transform Service Health

ATS converts documents to PDF, extracts metadata via Apache Tika, and generates image thumbnails. If ATS is down, document processing silently stalls.

If you run ATS as a Docker container or separate service with a health endpoint:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter the ATS health URL: http://transform-core-aio:8090/actuator/health
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 2 minutes.
  5. Click Save.

For ATS deployed via Docker Compose, the service hostname is typically transform-core-aio or transform-service. Adjust to match your deployment.


Step 8: Document Upload Success Rate

Monitor that document ingestion is actually working end-to-end, not just that the API is responsive:

#!/bin/bash
# /usr/local/bin/check-alfresco-upload.sh
ALFRESCO_HOST="localhost"
ALFRESCO_PORT=8080
ADMIN_USER="admin"
ADMIN_PASS="your_admin_password"
VIGILMON_HEARTBEAT="https://vigilmon.online/heartbeat/YOUR_UPLOAD_HEARTBEAT_ID"

# Create a small test file and upload it to Alfresco
TEST_FILE=$(mktemp /tmp/alfresco-probe-XXXXXX.txt)
echo "Vigilmon probe $(date)" > "$TEST_FILE"

UPLOAD_RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" \
  -u "$ADMIN_USER:$ADMIN_PASS" \
  -X POST \
  -F "filedata=@$TEST_FILE;type=text/plain" \
  -F "name=vigilmon-probe.txt" \
  -F "nodeType=cm:content" \
  "http://$ALFRESCO_HOST:$ALFRESCO_PORT/alfresco/api/-default-/public/alfresco/versions/1/nodes/-my-/children")

rm -f "$TEST_FILE"

if [ "$UPLOAD_RESPONSE" != "201" ]; then
    echo "Document upload probe failed: HTTP $UPLOAD_RESPONSE at $(date)" >> /var/log/alfresco-monitor.log
    exit 1
fi

curl -s "$VIGILMON_HEARTBEAT" > /dev/null
chmod +x /usr/local/bin/check-alfresco-upload.sh
echo "*/10 * * * * root /usr/local/bin/check-alfresco-upload.sh" > /etc/cron.d/alfresco-upload

Set the Vigilmon heartbeat to 15 minutes. This probe catches issues that the repository API health check misses — like a broken content store write path.


Step 9: License Validity (Enterprise Only)

Alfresco Enterprise editions require a valid license. An expired license disables enterprise features or locks users out. Set up an expiry alert:

#!/bin/bash
# /usr/local/bin/check-alfresco-license.sh
ALFRESCO_HOST="localhost"
ALFRESCO_PORT=8080
ADMIN_USER="admin"
ADMIN_PASS="your_admin_password"
WARN_DAYS=30
VIGILMON_HEARTBEAT="https://vigilmon.online/heartbeat/YOUR_LICENSE_HEARTBEAT_ID"

LICENSE_INFO=$(curl -s -u "$ADMIN_USER:$ADMIN_PASS" \
  "http://$ALFRESCO_HOST:$ALFRESCO_PORT/alfresco/service/enterprise/admin/admin-license.json" \
  2>/dev/null)

EXPIRY=$(echo "$LICENSE_INFO" | python3 -c \
  "import sys,json; d=json.load(sys.stdin); print(d.get('validUntil',''))" 2>/dev/null)

if [ -z "$EXPIRY" ]; then
    # No license info — community edition or API unavailable
    curl -s "$VIGILMON_HEARTBEAT" > /dev/null
    exit 0
fi

EXPIRY_TS=$(date -d "$EXPIRY" +%s 2>/dev/null)
NOW_TS=$(date +%s)
DAYS_LEFT=$(( (EXPIRY_TS - NOW_TS) / 86400 ))

if [ "$DAYS_LEFT" -lt "$WARN_DAYS" ]; then
    echo "Alfresco license expires in ${DAYS_LEFT} days ($EXPIRY)" >> /var/log/alfresco-monitor.log
    exit 1
fi

curl -s "$VIGILMON_HEARTBEAT" > /dev/null
echo "0 6 * * * root /usr/local/bin/check-alfresco-license.sh" > /etc/cron.d/alfresco-license

Step 10: Configure Alert Channels

  1. In Vigilmon, go to Alert Channels and configure email, Slack, or webhook destinations.
  2. For repository and Share HTTP monitors, set Consecutive failures before alert to 2 — Tomcat restarts take 30–60 seconds.
  3. For the PostgreSQL TCP monitor, set Consecutive failures before alert to 1 — a closed database port is immediately critical.
  4. For Solr and disk heartbeats, use 3 minutes grace periods to absorb temporary lag spikes.
  5. Create a Status Page in Vigilmon grouping all Alfresco monitors for your operations team.

Summary

| Monitor | Target | What It Catches | |---|---|---| | HTTP uptime | Alfresco Repository API | Repository JVM, database connectivity | | HTTP uptime | Alfresco Share URL | Share webapp crash | | Cron heartbeat | Solr index lag script | Stale search results | | TCP port | PostgreSQL :5432 | Database down | | Cron heartbeat | DB query latency script | Slow queries, DB degradation | | Cron heartbeat | Content store disk script | Upload failures from full disk | | TCP port | ActiveMQ :61616 | Transform queue failure | | HTTP uptime | ATS health endpoint | Document conversion failure | | Cron heartbeat | Upload probe script | End-to-end content ingestion failure | | Cron heartbeat | License expiry script | Enterprise license expiry | | SSL certificate | Alfresco HTTPS domain | Expired TLS certificate |

Alfresco's strength — a rich, multi-tier architecture supporting everything from records management to real-time collaboration — is also its monitoring challenge. With Vigilmon watching every tier from the repository API to the content store disk, you catch the quiet failures (stale search, failed transformations, filling storage) before they escalate into helpdesk tickets and data loss incidents.

Monitor your app with Vigilmon

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

Start free →