Open seanliu-oss opened 1 year ago
I've been trying to run an operation with parameter of type List. $>bean org.springframework.boot:name=Metrics,type=Endpoint
bean is set to org.springframework.boot:name=Metrics,type=Endpoint $>info mbean = org.springframework.boot:name=Metrics,type=Endpoint class name = org.springframework.boot.actuate.endpoint.jmx.EndpointMBean there is no attribute operations %0 - java.util.Map listNames() %1 - java.util.Map metric(java.lang.String requiredMetricName,java.util.List tag) there's no notifications $>run listNames calling operation listNames of mbean org.springframework.boot:name=Metrics,type=Endpoint with params [] operation returns: { names = ( application.ready.time, application.started.time, disk.free, disk.total, executor.active, executor.completed, executor.pool.core, executor.pool.max, executor.pool.size, executor.queue.remaining, executor.queued, hikaricp.connections, hikaricp.connections.acquire, hikaricp.connections.active, hikaricp.connections.creation, hikaricp.connections.idle, hikaricp.connections.max, hikaricp.connections.min, hikaricp.connections.pending, hikaricp.connections.timeout, hikaricp.connections.usage, jdbc.connections.max, jdbc.connections.min, jvm.buffer.count, jvm.buffer.memory.used, jvm.buffer.total.capacity, jvm.classes.loaded, jvm.classes.unloaded, jvm.gc.live.data.size, jvm.gc.max.data.size, jvm.gc.memory.allocated, jvm.gc.memory.promoted, jvm.gc.overhead, jvm.gc.pause, jvm.memory.committed, jvm.memory.max, jvm.memory.usage.after.gc, jvm.memory.used, jvm.threads.daemon, jvm.threads.live, jvm.threads.peak, jvm.threads.states, logback.events, mongodb.driver.pool.checkedout, mongodb.driver.pool.size, mongodb.driver.pool.waitqueuesize, process.cpu.usage, process.files.max, process.files.open, process.start.time, process.uptime, rabbitmq.acknowledged, rabbitmq.acknowledged_published, rabbitmq.channels, rabbitmq.connections, rabbitmq.consumed, rabbitmq.failed_to_publish, rabbitmq.not_acknowledged_published, rabbitmq.published, rabbitmq.rejected, rabbitmq.unrouted_published, spring.data.repository.invocations, system.cpu.count, system.cpu.usage, system.load.average.1m, tomcat.sessions.active.current, tomcat.sessions.active.max, tomcat.sessions.alive.max, tomcat.sessions.created, tomcat.sessions.expired, tomcat.sessions.rejected ); }
$>info
%0 - java.util.Map listNames() %1 - java.util.Map metric(java.lang.String requiredMetricName,java.util.List tag)
$>run listNames
{ names = ( application.ready.time, application.started.time, disk.free, disk.total, executor.active, executor.completed, executor.pool.core, executor.pool.max, executor.pool.size, executor.queue.remaining, executor.queued, hikaricp.connections, hikaricp.connections.acquire, hikaricp.connections.active, hikaricp.connections.creation, hikaricp.connections.idle, hikaricp.connections.max, hikaricp.connections.min, hikaricp.connections.pending, hikaricp.connections.timeout, hikaricp.connections.usage, jdbc.connections.max, jdbc.connections.min, jvm.buffer.count, jvm.buffer.memory.used, jvm.buffer.total.capacity, jvm.classes.loaded, jvm.classes.unloaded, jvm.gc.live.data.size, jvm.gc.max.data.size, jvm.gc.memory.allocated, jvm.gc.memory.promoted, jvm.gc.overhead, jvm.gc.pause, jvm.memory.committed, jvm.memory.max, jvm.memory.usage.after.gc, jvm.memory.used, jvm.threads.daemon, jvm.threads.live, jvm.threads.peak, jvm.threads.states, logback.events, mongodb.driver.pool.checkedout, mongodb.driver.pool.size, mongodb.driver.pool.waitqueuesize, process.cpu.usage, process.files.max, process.files.open, process.start.time, process.uptime, rabbitmq.acknowledged, rabbitmq.acknowledged_published, rabbitmq.channels, rabbitmq.connections, rabbitmq.consumed, rabbitmq.failed_to_publish, rabbitmq.not_acknowledged_published, rabbitmq.published, rabbitmq.rejected, rabbitmq.unrouted_published, spring.data.repository.invocations, system.cpu.count, system.cpu.usage, system.load.average.1m, tomcat.sessions.active.current, tomcat.sessions.active.max, tomcat.sessions.alive.max, tomcat.sessions.created, tomcat.sessions.expired, tomcat.sessions.rejected ); }
I've tried following and none of them works: $>run metric application.ready.time \[\]
$>run metric application.ready.time []
$>run metric application.ready.time
$>run metric application.ready.time {}
$>run metric application.ready.time \{\}
How do I invoke the operation?
I've been trying to run an operation with parameter of type List. $>bean org.springframework.boot:name=Metrics,type=Endpoint
I've tried following and none of them works: $>run metric application.ready.time \[\]
ConversionException: Default conversion to List failed.
$>run metric application.ready.time []
ConversionException: Default conversion to List failed.
$>run metric application.ready.time
IllegalArgumentException: Operation metric with 1 parameters doesn't exist in bean org.springframework.boot:name=Metrics,type=Endpoint
$>run metric application.ready.time {}
ConversionException: Default conversion to List failed.
$>run metric application.ready.time \{\}
ConversionException: Default conversion to List failed.
How do I invoke the operation?