dot CMS
Log Monitoring

Ship site-aware dotCMS logs and content lifecycle events to Grafana Loki so teams can search, monitor, and alert on issues across multi-site deployments.

What it does

The Log Monitoring plugin gives dotCMS teams a practical observability layer for multi-site environments. It captures dotCMS log output, adds site and user context when a request is tied to a host, and forwards events to Grafana Loki for storage, search, dashboards, and alerts.

In addition to normal Log4j2 output, the plugin listens for content lifecycle activity such as publish, unpublish, archive, unarchive, and delete events. Those structured content events are resolved back to the content's site, which makes it easier to separate operational noise from content activity and troubleshoot the right digital property.

Events are held in an in-memory buffer and shipped on a configurable schedule. If Loki is unavailable, the plugin re-queues drained events and retries on the next cycle. Background jobs and other non-request logs are still captured, but are tagged as system because no site request context is available.

Use Cases

  • Multi-site troubleshooting - Filter logs by site hostname in Grafana so support and operations teams can isolate errors affecting one brand, region, or customer site.

  • Content operations auditing - Track publish, unpublish, archive, unarchive, and delete events alongside application logs for clearer operational history.

  • Grafana alerting - Build Loki-backed alerts for error spikes, repeated workflow failures, or site-specific issues without relying on flat server log files.

  • Centralized log retention - Forward dotCMS events to Loki or Grafana Cloud for searchable retention outside the application server.

Key capabilities

  • Site-aware Log4j2 event capture for HTTP request logs

  • Structured content lifecycle events for publish, unpublish, archive, unarchive, and delete actions

  • Thread-safe in-memory event buffer with retry behavior if Loki is unavailable

  • Configurable Loki push URL, credentials, and shipping interval through dotCMS Apps

  • Grafana-compatible labels for app and site, enabling LogQL filtering and dashboards

How to set it up

You need dotCMS Evergreen, Java 11 or higher, Maven 3.x if building from source, and a Grafana Loki endpoint. Grafana Cloud Loki works with a Loki push URL, numeric org ID, and API key.

  1. Clone the repository and run mvn package to build plugin-log-monitoring-1.0.0.jar.

  2. In dotCMS, go to System > Dynamic Plugins and upload the plugin JAR. The plugin loads without a server restart.

  3. Open System > Apps > Log Monitoring and configure the Loki Push URL, optional username or Grafana Cloud Org ID, optional API key or password, and shipping interval.

  4. After the next shipping cycle, confirm dotCMS logs report a successful Loki shipment and query Grafana Explore with {app="dotcms"}.

Read the full setup guide

Explore dotCMS for your organization

image

dotCMS Named a Major Player

In the IDC MarketScape: Worldwide AI-Enabled Headless CMS 2025 Vendor Assessment

image

Explore an interactive tour

See how dotCMS empowers technical and content teams at compliance-led organizations.

image

Schedule a custom demo

Schedule a custom demo with one of our experts and discover the capabilities of dotCMS for your business.