Skip to content

Monitoring glossary

What is log aggregation?

Log aggregation collects logs from every server, container and service into one place where you can search, filter and alert on them together.

3 min read10 sectionsUpdated

On this page

Key points

  • Containers and autoscaling make local logs disappear: aggregation keeps them.
  • Structured JSON logs are far easier to search and parse than free text.
  • Add the trace ID so logs and traces link.
  • Control volume at the source: levels, sampling and retention.

Why aggregate logs

On one server, tail -f and grep work. With ten instances behind a load balancer, a request's logs could be on any of them. With containers, a crashed pod's logs disappear when it is replaced. Aggregation streams logs off every host as they are written, so you can search one place by service, level, time or field, including logs from instances that no longer exist.

The pipeline

StageWhat happensExamples
EmitYour app writes structured log linesJSON to stdout
CollectAn agent or library ships themFluent Bit, Vector, OpenTelemetry Collector, direct HTTP
ProcessParse, enrich, drop, redactAdd service and environment; remove secrets
Store and indexMake them searchableA log management backend
UseSearch, live tail, alert, link to tracesError spikes, specific order IDs

Structured logs make aggregation work

json
{"ts":"2026-10-23T09:14:02.114Z","level":"error","service":"checkout","env":"production","trace_id":"4bf92f3577b34da6a3ce929d0e0e4736","msg":"payment declined","order_id":"ord_8812","reason":"insufficient_funds"}

Every field is searchable without regular expressions: level:error service:checkout reason:insufficient_funds. See structured logging best practices and log levels.

Keeping it affordable

  • Log at the right level: debug off in production unless you are investigating.
  • Drop noise at the source: health-check access logs, repetitive success messages.
  • Set retention by need: see log retention policy.
  • Cap daily volume so one misbehaving service cannot flood the system.

VitalRix log management takes logs over a simple HTTP API with an API key, offers search and live tail, links each line to its trace when it carries the trace ID, and lets you cap daily log volume in usage controls.

Sending a log line over HTTP

For small setups, serverless functions or scripts, sending logs directly over HTTP is simplest. With VitalRix, a key with the Log ingestion preset can post one entry or a batch of up to 1,000:

bash
curl -X POST "$VITALRIX_API/api/v1/logs" \
  -H "x-api-key: $VITALRIX_KEY" \
  -H "content-type: application/json" \
  -d '{"level":"error","message":"payment failed","service":"checkout"}'

Searches you will run every week

  • All errors from one service in the last hour, grouped by message.
  • Every line for one order, user or request ID.
  • Every line for one trace ID, to read a slow request's story.
  • The first occurrence of a new error message after a deploy.

If any of these is slow or awkward today, the fix is usually structure: a consistent service field, IDs as fields rather than inside the message, and the trace ID on every line.

Frequently asked questions

Is log aggregation the same as log management?

Aggregation is the collecting part. Log management adds search, retention, alerting, access control and analysis on top.

Should I send logs directly from the app or through an agent?

An agent (or Collector) decouples your app from the backend: it buffers during outages and can redact and enrich. Direct HTTP is simpler for small setups and serverless.

  • Best log management tools: How to choose a log management tool in 2026: search, retention, cost control and trace links, well-known options compared, and which fits which team.
  • What is log optimization?: Log optimization explained: finding the noisiest log sources, levels and sampling, structured fields, dropping duplicates, retention tiers.
  • Elasticsearch vs Grafana Loki: Elasticsearch (ELK) vs Grafana Loki for logs: full-text indexing against label-based storage, cost, query speed, operations effort and when each fits.
  • All features: Every VitalRix product in one place: uptime monitoring, APM, logs, real user monitoring, alerts, on-call, SLOs, dashboards, notebooks and more.
  • Security and access control: Control who can see and change what with roles, custom roles and scoped API keys, and review every sensitive change in a searchable audit log with CSV export.
  • What is AI incident response?: How AI helps during incidents: gathering evidence, summarizing what changed, drafting updates and postmortems, plus the guardrails that keep it trustworthy.

Watch your own site and services with VitalRix

Uptime checks, APM, logs, real-user monitoring, alerts and status pages in one place. Every product has a free tier and no credit card is needed.