This runbook covers production deployment and first-response checks for node-metrics-agent.
The agent registers metrics as JMX MBeans. It does not expose an HTTP scrape endpoint by itself. For Prometheus, run the Prometheus JMX exporter in the same JVM or use another JMX-to-Prometheus bridge.
- Build or download the shaded JAR.
- Prepare
node-metrics.yml. - Add the JVM option:
-javaagent:/opt/pletor/node-metrics-agent-0.8.0-all.jar=/opt/pletor/node-metrics.yml- For Prometheus scraping, also attach the Prometheus JMX exporter Java agent:
-javaagent:/opt/jmx-exporter/jmx_prometheus_javaagent.jar=9404:/opt/jmx-exporter/pletor-node-metrics.ymlUse src/main/resources/jmx_exporter_rules_example.yml as the starting exporter configuration.
It maps JMX attributes to pletor_* Prometheus metrics.
- Restart the JVM.
- Check startup logs for:
[node-metrics-agent] started
Agent startup is fail-open. If initialization fails, the host application continues without agent metrics.
Confirm these MBeans exist:
co.pletor.node:type=CpuMetricsco.pletor.node:type=MemMetricsco.pletor.cgroup:type=MemMetricsco.pletor.proc:type=FdMetricsco.pletor.node:type=IoRatesco.pletor.node:type=OsInfoMetricsco.pletor.node:type=OsRuntimeMetricsco.pletor.agent:type=TelemetryModeco.pletor.agent:type=Observabilityco.pletor.node:type=FsMetrics,path=<configured path>
TelemetryMode.Mode should normally be NORMAL.
If the JMX exporter is attached, confirm the scrape endpoint responds:
curl -s http://localhost:9404/metrics | grep '^pletor_' | headThe agent watches the active config file and also polls as a fallback.
- watch debounce:
500 ms - fallback polling base interval:
1 s - reload failure backoff: exponential, capped at
60 s
If reload fails, the previous working configuration remains active.
- telemetry mode is not
NORMALfor a sustained period pletor_agent_observability_droppedcountincreases above baselinepletor_agent_observability_queuefillratio >= 0.80pletor_agent_observability_maxtaskstalenessmsrises for a sustained period- filesystem usable bytes drops below service thresholds
- FD usage approaches max FD limit
- cgroup memory usage/limit ratio stays above
0.90
Queue pressure:
- Check
QueueFillRatio,DroppedCount,EndToEndLatencyMillis, andMaxTaskStalenessMs. DEGRADEDdrops low-priority filesystem refresh first.BYPASSdrops all refresh work until pressure falls.
Filesystem MBeans:
- Missing paths are logged but do not crash the agent.
- Paths on the same partition are deduplicated.
fsmetrics_max_partitionscaps unique filesystem partitions.
Cgroup metrics:
MemoryLimitBytes = -1means unlimited or unavailable.CgroupVersionisv1,v2, ornone.
Rollback:
- Remove the
-javaagentJVM option. - Restart the JVM.
- Keep the last known-good config and JAR for redeployment.