Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run operation with List parameter #108

Open
seanliu-oss opened this issue Apr 5, 2023 · 0 comments
Open

Can't run operation with List parameter #108

seanliu-oss opened this issue Apr 5, 2023 · 0 comments

Comments

@seanliu-oss
Copy link

seanliu-oss commented Apr 5, 2023

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 );
}

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant