Blog

Blog

/

/

jPOS Monitoring

jPOS Monitoring

jPOS Monitoring

jPOS Monitoring

jPOS Monitoring

jPOS

Grafana dashboard showing jPOS metrics
Orlando Pagano

Orlando Pagano a.k.a. Orly

Orlando Pagano a.k.a. Orly

Orlando Pagano a.k.a. Orly

Senior Developer

Senior Developer

Senior Developer

As of jPOS 3, a Docker Compose setup is included out of the box to monitor jPOS using Prometheus and Grafana.

This setup provides a ready-to-use environment to visualize metrics exposed by the jPOS metrics module, with a preconfigured dashboard and data source.

Repository

jPOS-monitoring project

Project Structure



Docker Compose Setup

compose.yaml

services:
  prometheus:
    image: prom/prometheus
    ...
    ports:
      - 9090:9090

  grafana:
    image: grafana/grafana
    ...
    ports

services:
  prometheus:
    image: prom/prometheus
    ...
    ports:
      - 9090:9090

  grafana:
    image: grafana/grafana
    ...
    ports

This Compose file defines a stack with two services: prometheus and grafana.

When deploying the stack, Docker maps each service’s default port to the host:

Note: Ensure ports 9090 and 3000 on the host are available.

You don’t need any additional infrastructure — both services run entirely via Docker containers.

Prometheus Behavior and Storage

  • Prometheus polls servers, any number of them, every 15 seconds by default. This is configurable but a good starting point.

  • It’s highly efficient, storing each metric at about 1.3 bytes per sample, roughly 11 bits.

  • Grafana queries Prometheus as its data source for visualization.

  • By default, Prometheus stores data under /prometheus inside the container. To retain metrics across restarts, mount a persistent volume — otherwise, data will be lost when the container is rebuilt or removed.

As of jPOS 3, a Docker Compose setup is included out of the box to monitor jPOS using Prometheus and Grafana.

This setup provides a ready-to-use environment to visualize metrics exposed by the jPOS metrics module, with a preconfigured dashboard and data source.

Repository

jPOS-monitoring project

Project Structure


Docker Compose Setup

compose.yaml

services:
  prometheus:
    image: prom/prometheus
    ...
    ports:
      - 9090:9090

  grafana:
    image: grafana/grafana
    ...
    ports

This Compose file defines a stack with two services: prometheus and grafana.

When deploying the stack, Docker maps each service’s default port to the host:

Note: Ensure ports 9090 and 3000 on the host are available.

You don’t need any additional infrastructure — both services run entirely via Docker containers.

Prometheus Behavior and Storage

  • Prometheus polls servers, any number of them, every 15 seconds by default. This is configurable but a good starting point.

  • It’s highly efficient, storing each metric at about 1.3 bytes per sample, roughly 11 bits.

  • Grafana queries Prometheus as its data source for visualization.

  • By default, Prometheus stores data under /prometheus inside the container. To retain metrics across restarts, mount a persistent volume — otherwise, data will be lost when the container is rebuilt or removed.

As of jPOS 3, a Docker Compose setup is included out of the box to monitor jPOS using Prometheus and Grafana.

This setup provides a ready-to-use environment to visualize metrics exposed by the jPOS metrics module, with a preconfigured dashboard and data source.

Repository

jPOS-monitoring project

Project Structure


Docker Compose Setup

compose.yaml

services:
  prometheus:
    image: prom/prometheus
    ...
    ports:
      - 9090:9090

  grafana:
    image: grafana/grafana
    ...
    ports

This Compose file defines a stack with two services: prometheus and grafana.

When deploying the stack, Docker maps each service’s default port to the host:

Note: Ensure ports 9090 and 3000 on the host are available.

You don’t need any additional infrastructure — both services run entirely via Docker containers.

Prometheus Behavior and Storage

  • Prometheus polls servers, any number of them, every 15 seconds by default. This is configurable but a good starting point.

  • It’s highly efficient, storing each metric at about 1.3 bytes per sample, roughly 11 bits.

  • Grafana queries Prometheus as its data source for visualization.

  • By default, Prometheus stores data under /prometheus inside the container. To retain metrics across restarts, mount a persistent volume — otherwise, data will be lost when the container is rebuilt or removed.

Deploying the Stack

To start the monitoring stack:

$ cd <jPOS-monitoring-root>/dockerfiles/jPOS-monitoring
$ docker compose up -d
[+] Running 4/4
 ✔ Network jpos-monitoring_dashboard-network  Created
 ✔ Volume "jpos-monitoring_prom_data"

$ cd <jPOS-monitoring-root>/dockerfiles/jPOS-monitoring
$ docker compose up -d
[+] Running 4/4
 ✔ Network jpos-monitoring_dashboard-network  Created
 ✔ Volume "jpos-monitoring_prom_data"

Additionally, the just tool is included as an optional helper to simplify command execution.

Requirement: just (Installation guide)

To start the monitoring stack using the just tool:

$ just
$ just

Expected Result

Confirm that both containers are running and ports are correctly mapped:

docker ps
CONTAINER ID   IMAGE             COMMAND                  STATUS       PORTS                    NAMES
dbdec637814f   prom/prometheus   "/bin/prometheus --c…"   Up 8 mins    0.0.0.0:9090->9090/tcp   prometheus
79f667cb7dc2   grafana/grafana   "/run.sh"                Up 8 mins    0

docker ps
CONTAINER ID   IMAGE             COMMAND                  STATUS       PORTS                    NAMES
dbdec637814f   prom/prometheus   "/bin/prometheus --c…"   Up 8 mins    0.0.0.0:9090->9090/tcp   prometheus
79f667cb7dc2   grafana/grafana   "/run.sh"                Up 8 mins    0

Stopping the Stack

To stop and remove the containers:

$ docker compose down  # Use -v to remove volumes
$ docker compose down  # Use -v to remove volumes

To stop using the just tool:

$ just
$ just

To stop and remove the containers using the just tool:

$ just
$ just

jPOS Metrics Integration

At the jPOS level, you only need to expose the metrics endpoint using the -mp option:

$ q2 -mp 18583
$ q2 -mp 18583

You can use any port, but 18583 is the conventional default in jPOS for metrics.

To verify it’s working:

$ curl
$ curl

This confirms the embedded jPOS metrics server is accessible.

Alternative: Configure in cfg/default.yml

Port 18583 is the default port used by the jPOS metrics server, but that’s just an arbitrary value and can be configured in cfg/default.yml or as a parameter to the bin/q2 script.

If you configure using cfg/default.yml, you need to add something like this:

q2:
  args

q2:
  args

This keeps the port definition centralized and consistent across environments.

Deploying the Stack

To start the monitoring stack:

$ cd <jPOS-monitoring-root>/dockerfiles/jPOS-monitoring
$ docker compose up -d
[+] Running 4/4
 ✔ Network jpos-monitoring_dashboard-network  Created
 ✔ Volume "jpos-monitoring_prom_data"

Additionally, the just tool is included as an optional helper to simplify command execution.

Requirement: just (Installation guide)

To start the monitoring stack using the just tool:

$ just

Expected Result

Confirm that both containers are running and ports are correctly mapped:

docker ps
CONTAINER ID   IMAGE             COMMAND                  STATUS       PORTS                    NAMES
dbdec637814f   prom/prometheus   "/bin/prometheus --c…"   Up 8 mins    0.0.0.0:9090->9090/tcp   prometheus
79f667cb7dc2   grafana/grafana   "/run.sh"                Up 8 mins    0

Stopping the Stack

To stop and remove the containers:

$ docker compose down  # Use -v to remove volumes

To stop using the just tool:

$ just

To stop and remove the containers using the just tool:

$ just

jPOS Metrics Integration

At the jPOS level, you only need to expose the metrics endpoint using the -mp option:

$ q2 -mp 18583

You can use any port, but 18583 is the conventional default in jPOS for metrics.

To verify it’s working:

$ curl

This confirms the embedded jPOS metrics server is accessible.

Alternative: Configure in cfg/default.yml

Port 18583 is the default port used by the jPOS metrics server, but that’s just an arbitrary value and can be configured in cfg/default.yml or as a parameter to the bin/q2 script.

If you configure using cfg/default.yml, you need to add something like this:

q2:
  args

This keeps the port definition centralized and consistent across environments.

Deploying the Stack

To start the monitoring stack:

$ cd <jPOS-monitoring-root>/dockerfiles/jPOS-monitoring
$ docker compose up -d
[+] Running 4/4
 ✔ Network jpos-monitoring_dashboard-network  Created
 ✔ Volume "jpos-monitoring_prom_data"

Additionally, the just tool is included as an optional helper to simplify command execution.

Requirement: just (Installation guide)

To start the monitoring stack using the just tool:

$ just

Expected Result

Confirm that both containers are running and ports are correctly mapped:

docker ps
CONTAINER ID   IMAGE             COMMAND                  STATUS       PORTS                    NAMES
dbdec637814f   prom/prometheus   "/bin/prometheus --c…"   Up 8 mins    0.0.0.0:9090->9090/tcp   prometheus
79f667cb7dc2   grafana/grafana   "/run.sh"                Up 8 mins    0

Stopping the Stack

To stop and remove the containers:

$ docker compose down  # Use -v to remove volumes

To stop using the just tool:

$ just

To stop and remove the containers using the just tool:

$ just

jPOS Metrics Integration

At the jPOS level, you only need to expose the metrics endpoint using the -mp option:

$ q2 -mp 18583

You can use any port, but 18583 is the conventional default in jPOS for metrics.

To verify it’s working:

$ curl

This confirms the embedded jPOS metrics server is accessible.

Alternative: Configure in cfg/default.yml

Port 18583 is the default port used by the jPOS metrics server, but that’s just an arbitrary value and can be configured in cfg/default.yml or as a parameter to the bin/q2 script.

If you configure using cfg/default.yml, you need to add something like this:

q2:
  args

This keeps the port definition centralized and consistent across environments.

Share this post

icon
icon
icon

Related articles

Related articles

Upgrade your payment infrastructure today

Upgrade your payment infrastructure today

Connect with our experts to explore how jPOS can revolutionize your transaction processing capabilities.

Connect with our experts to explore how jPOS can revolutionize your transaction processing capabilities.

Join our live webinar:

Get started with jPOS

A practical session for new and experienced developers, covering core concepts, latest updates, and real-world examples.

Transparent, flexible,

and community-driven technology.

Our open-source approach gives teams full visibility and control over the codebase, making it easier to adapt, extend, and integrate jPOS across complex payment environments.

Contact

+1 (561) 922-6344

info@transactility.com

P.O. Box 880195

Boca Raton, FL 33488-0195, U.S.A.

© 2026 Transactility, Inc. All rights reserved.

Stay updated on new features and releases

Join our live webinar:

Get started with jPOS

A practical session for new and experienced developers, covering core concepts, latest updates, and real-world examples.

Transparent, flexible,

and community-driven technology.

Our open-source approach gives teams full visibility and control over the codebase, making it easier to adapt, extend, and integrate jPOS across complex payment environments.

Contact

+1 (561) 922-6344

info@transactility.com

P.O. Box 880195

Boca Raton, FL 33488-0195, U.S.A.

© 2026 Transactility, Inc. All rights reserved.

Stay updated on new features and releases

Join our live webinar:

Get started with jPOS

A practical session for new and experienced developers, covering core concepts, latest updates, and real-world examples.

Transparent, flexible,

and community-driven technology.

Our open-source approach gives teams full visibility and control over the codebase, making it easier to adapt, extend, and integrate jPOS across complex payment environments.

Contact

+1 (561) 922-6344

info@transactility.com

P.O. Box 880195

Boca Raton, FL 33488-0195, U.S.A.

© 2026 Transactility, Inc. All rights reserved.

Stay updated on new features and releases

Join our live webinar:

Get started with jPOS

A practical session for new and experienced developers, covering core concepts, latest updates, and real-world examples.

Transparent, flexible,

and community-driven technology.

Our open-source approach gives teams full visibility and control over the codebase, making it easier to adapt, extend, and integrate jPOS across complex payment environments.

Contact

+1 (561) 922-6344

info@transactility.com

P.O. Box 880195

Boca Raton, FL 33488-0195, U.S.A.

© 2026 Transactility, Inc. All rights reserved.

Stay updated on new features and releases