Skip to content

feat(nats): enable the NATS monitoring HTTP endpoint in the embedded NATS server - #3296

Open
pbleser-oc wants to merge 1 commit into
opencloud-eu:mainfrom
pbleser-oc:chore/#3294-add-nats-monitoring-endpoint
Open

feat(nats): enable the NATS monitoring HTTP endpoint in the embedded NATS server#3296
pbleser-oc wants to merge 1 commit into
opencloud-eu:mainfrom
pbleser-oc:chore/#3294-add-nats-monitoring-endpoint

Conversation

@pbleser-oc

@pbleser-oc pbleser-oc commented Aug 12, 2026

Copy link
Copy Markdown
Member

Description

Add configuration options to enable the NATS server HTTP monitoring endpoint:

  • NATS_MONITORING_ENABLED (defaults to false)
  • NATS_MONITORING_HTTP_HOST (defaults to 127.0.0.1)
  • NATS_MONITORING_HTTP_PORT (defaults to 8222)
  • NATS_MONITORING_ENABLE_TLS (defaults to false)

Note that, by default, if no configuration changes are made, it does not change the current behaviour: no NATS server monitoring endpoint is enabled nor made available. It requires explicitly enabling it by configuration or environment variable.

Related Issue

Motivation and Context

See #3294

How Has This Been Tested?

  • start opencloud with NATS_MONITORING_ENABLED set to true
  • run nats-top on the same host

To test the Prometheus metrics exporter:

  • start opencloud with NATS_MONITORING_ENABLED set to true and NATS_MONITORING_HTTP_HOST set to 0.0.0.0
  • start a container of prometheus-nats-exporter as follows:
docker run \
  --add-host host.docker.internal=host-gateway \
  -p 7777:7777 \
  natsio/prometheus-nats-exporter:latest \
  -D -p 7777 \
  -accountz -accstatz -connz_detailed -gatewayz -healthz -leafz -routez -varz \
  http://host.docker.internal:8222
  • check the list of metrics exported by the exporter:
curl -sSLf http://localhost:7777/metrics | grep ^gnatsd_

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation added

@codacy-production

codacy-production Bot commented Aug 12, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

🟢 Coverage 0.00% diff coverage · -0.01% coverage variation

Metric Results
Coverage variation -0.01% coverage variation (-1.00%)
Diff coverage 0.00% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (6f5f993) 84041 19349 23.02%
Head commit (cfdb115) 84072 (+31) 19351 (+2) 23.02% (-0.01%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#3296) 36 0 0.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

…NATS server

 * add configuration options to enable the NATS server HTTP monitoring
   endpoint:
   - NATS_MONITORING_ENABLED (defaults to false)
   - NATS_MONITORING_HTTP_HOST (defaults to 127.0.0.1)
   - NATS_MONITORING_HTTP_PORT (defaults to 8222)
   - NATS_MONITORING_ENABLE_TLS (defaults to false)

Fixes opencloud-eu#3294
@pbleser-oc
pbleser-oc force-pushed the chore/#3294-add-nats-monitoring-endpoint branch from 966ee24 to cfdb115 Compare August 12, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Enable the NATS monitoring HTTP endpoint in the embedded NATS server

1 participant