What is DockStats?

DockStats is a lightweight monitoring platform for developers running Docker in production. It lets you collect logs and system metrics from all containers across all hosts with a single agent. Just run our agent on your server — everything is automatically gathered and sent to your centralized DockStats dashboard.

Available Features

Roadmap (Coming Soon)

Architecture

DockStats Hub

The central system that receives and displays all collected metrics and logs. It acts as your unified interface for observability across your entire infrastructure.

DockStats Agent

A lightweight collector you run on each of your Docker hosts. It automatically detects all containers, gathers logs and system metrics, and securely sends the data to the DockStats Hub.

How It Works

1. Log in to DockStats

Go to DockStats App and log in to your account.

2. Create a Host

In the hosts, create a new Host — this represents one of your servers.

3. Copy Docker Compose File

After creating the host, find it in the table and click on “View” in the Docker Compose column. Copy the provided docker-compose.yaml configuration.

4. Deploy on Your Server

On your server, create a file named docker-compose.yaml and paste the configuration inside. Then run:

docker compose up -d

That's it! The agent will automatically collect logs and metrics and send them to DockStats.

Structured Logs & Metadata Mapping

DockStats Hub supports structured logs — for example, JSON-formatted logs. If your logs include the following keys:

level, time, env, app, msg

Everything will be parsed and displayed automatically. Popular loggers like Go's slog already use these keys by default.

If Logs Have Similar Keys (Field Mapping with CONVERTER)

If your logs use different field names (for example, application instead of app, or environment instead of env), you can remap them using the CONVERTER environment variable.

Add this to your docker-compose.yaml:

dockstats-agent:
  environment:
    - CONVERTER="application:app,environment:env"

This will map application to app and environment to env, ensuring your metadata is displayed correctly. Without this, app and env will default to unknown.

If Logs Are Missing Metadata (Injecting Fields with INJECTOR)

If you're running third-party containers (like Redis or NGINX) that don't emit structured logs or don't include fields like env or app, use the INJECTOR environment variable to manually assign metadata based on the container name.

Use the following format:

INJECTOR="container-name:{app:my-app,env:prod},container-name2:{app:my-app2,env:dev}"

Example inside your docker-compose.yaml (under the DockStats agent service):

dockstats-agent:
  environment:
    - INJECTOR="redis-container:{app:redis-app,env:prod},nginx-container:{app:web,env:prod}"

In this example, logs from the redis-container will be labeled as redis-app with environment prod, and nginx-container will appear as web in prod.

Try It Out