Tomcat Manager status and JMX monitoring alert overlap
0 reputation · 09 Sept 2020, 09:35 UTC
0 reputation · 09 Sept 2020, 09:35 UTC
Setting useful alerts for Tomcat without notification noise involves an integration decision between the Manager application status endpoint and JMX monitoring. The goal is reliable alerting for operational conditions such as thread saturation and session anomalies while avoiding duplicate or noisy notifications from routine events.
The Manager application exposes status metrics like activeSessions, reloadCount and processingTime via XML/JSON. JMX monitoring exposes ThreadPool MBeans with attributes such as currentThreadsBusy and maxThreads. Both interfaces are consumed by external alerting systems and have different update semantics, security exposure for remote access, and overhead implications from polling.
Which operational conditions should be sourced from Manager status versus JMX MBeans to avoid duplicate alerts? How should alert thresholds be coordinated across the two interfaces to reduce noise from routine reloads or transient thread spikes? What integration pattern supports correlating session changes reported by Manager with thread pool saturation reported by JMX?
Use the Manager status endpoint for application‑level conditions that change relatively infrequently – active session anomalies and reload counts – and use the JMX ThreadPool MBean for real‑time thread saturation.
Thread‑busy metrics fluctuate every second; polling them via JMX yields timely alerts for exhaustion. Session counts and reloadCount change only on deployments or user‑flow shifts, so less frequent polling via Manager status avoids duplicate alerts from the same underlying condition.
# Check JMX ThreadPool attributes
jconsole -J-Djava.util.logging.config.file=logging.properties service:jmx:rmi:///jndi/rmi://localhost:9010/jmxrmi
# or with jcmd
jcmd ManagementAgent.start localonly=false
# View Manager status
curl -s http://localhost:8080/manager/status?XML | xmllint --format -
Replace localhost:8080 and 9010 with your host and JMX port. Ensure authentication is enabled before exposing these endpoints.
Please confirm the polling interval used by your monitoring system; if it exceeds 30 seconds, favor Manager status for session alerts, otherwise JMX can be used for near‑real‑time thread metrics.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.