IT monitoring means the continuous monitoring of servers, networks, applications, and interfaces. Measured values are collected and compared with expected values, and deviations are reported. In many companies, a system for this is already in use. For a company's own applications, APIs, and integration flows, the task therefore lies elsewhere. Only the application itself knows what happens inside it, and it has to tell the monitoring system.
01 Application monitoring and what IT monitoring software needs from the application
IT monitoring software ingests what it is offered. From the application's perspective, that is first of all two endpoints. A health endpoint reports whether the service is running and can accept requests. A metrics endpoint supplies figures such as calls, response times, and errors in a format that the monitoring system scrapes. In Spring Boot applications, the Actuator provides such endpoints over HTTP or JMX, and Micrometer passes the metrics to widely used monitoring systems, including Prometheus. Values that a JVM offers through JMX are output as Prometheus metrics by the JMX Exporter. Added to this are business metrics that only the process itself knows. In a migration project for a photo agency, for example, more than eight Mule services report every process step to monitoring.
A monitoring system sees only what the application provides.
02 The difference between IT monitoring and observability
Monitoring checks known questions, for example whether the service is running and whether a value is within the expected range. Observability goes further. The OpenTelemetry project describes it as the ability to understand a system from the outside without knowing its inner workings, and names as a prerequisite that the application code emits signals such as traces, metrics, and logs. Both approaches therefore require an instrumented application. OpenTelemetry is one way to get there. The open source framework can be used to generate and export these signals. For Java applications, there is an agent that captures telemetry from widely used libraries and frameworks without changes to the code. The OpenTelemetry Collector receives telemetry data, processes it, and passes it on to a target system such as a monitoring or log system. Read more on the Observability Integration page.
03 Logs and traces, from the single entry to the transaction
Logs show what happened in a single step. So that a log management system can analyze them, the application writes them in structured form, for example as JSON, and forwards them through an appender to the central system. Log4j 2 comes with templates for this, including one for GELF, the format that Graylog accepts. When a transaction passes through several services, the trace context connects the entries. It is passed along with every call, in OpenTelemetry by default through the W3C Trace Context headers. Our articles on centralized log management, on log management with Graylog, and on logging with Log4j2 in Mule describe the setup. For each application, we record three things.
- State · which endpoint reports whether the service is running and ready.
- Metrics · which technical and business metrics the monitoring system scrapes.
- Traceability · which fields a log entry carries and how a transaction is followed across systems.