JMX
The Java standard through which Kafka brokers and clients publish their metrics.
Each metric lives in an MBean, a named object such as the one counting under-replicated partitions. Monitoring tools read them over a JMX port or through an exporter for Prometheus.