jmx

Tomcat Thread Monitoring Mbeans Description

十年热恋 提交于 2019-12-22 12:54:26
问题 In thread related Mbeans of Tomcat I see under Catalina.ThreadPool. there are different attributes viz. maxThreads, currentThreadCount, currentThreadsBusy etc. So, where can I get the description of these Mbean attributes, what each of these attribute is indicating, I need to include this in my monitoring automation code, Which will provide the Thread utilization stats. also possible I would like to see the Source code, where can I get it? When I see the Mbean class name (through jconsole) it

Read cassandra matrics using JMX in Java

那年仲夏 提交于 2019-12-22 11:33:36
问题 How can i produce live metrics of Cassandra in Java using JMX/Metrics? I want to run cassandra JMX command to collect cassandra matrices.Examples will be much appreciated. 回答1: All Cassandra's metrics exposed via JMX are documented in official documentation. And because it uses the Metrics library, you may not need to use JMX to capture metrics - see the note at the end of the referenced page for more information (and conf/metrics-reporter-config-sample.yaml example file from Cassandra's

How to integrate JMX with Spring?

偶尔善良 提交于 2019-12-22 10:35:03
问题 I have simple class about JMX: Interface HelloMBean: public interface HelloMBean { public void sayHello(); public String getName(); public void setName(String name); public String conCat(String s1, String s2); } Class Hello implements from interface HelloMBean: import javax.management.AttributeChangeNotification; import javax.management.Notification; import javax.management.NotificationBroadcasterSupport; public class Hello extends NotificationBroadcasterSupport implements HelloMBean {

RMI and JMX Socket Factories

醉酒当歌 提交于 2019-12-22 09:34:58
问题 I'm trying to start an embedded JMX server in my java app. I want to use the same port for the RMI Registry and for the actual RMI traffic (or JMX traffic if you like). Apparently this is possible since the RMI Registry is merely a Remote Object itself. The added difficulty is that I need to use Socket Factories because I need to bind to a specific NIC. I start off by: int registryPort = 3012; int jmxPort = 3012; // use the same port and here's my server socket factory. Pretty straight

RMI and JMX Socket Factories

旧巷老猫 提交于 2019-12-22 09:33:15
问题 I'm trying to start an embedded JMX server in my java app. I want to use the same port for the RMI Registry and for the actual RMI traffic (or JMX traffic if you like). Apparently this is possible since the RMI Registry is merely a Remote Object itself. The added difficulty is that I need to use Socket Factories because I need to bind to a specific NIC. I start off by: int registryPort = 3012; int jmxPort = 3012; // use the same port and here's my server socket factory. Pretty straight

Spring: Cannot connect to a JMX Server using RMI from behind a firewall

怎甘沉沦 提交于 2019-12-22 08:58:03
问题 My Spring application is running on a machine that is behind a NAT firewall (pfSense). The machine's internal IP is a.b.c.d , and the NAT IP is w.x.y.z The Spring configuration's serviceUrl is set to my internal IP ( a.b.c.d ) on port 1100 , and when I start the application, I provide the following switches: -Dcom.sun.management.jmxremote -Djava.rmi.server.hostname=w.x.y.z -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote

Why am I getting the error “connection refused” with JMX

让人想犯罪 __ 提交于 2019-12-22 05:52:43
问题 I am unable to connect to JMX object. Here is how I create a JMX object: public static void main(String... args) { MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); try { ObjectName name = new ObjectName("org.javasimon.jmx.example:type=Simon"); if (mbs.isRegistered(name)) { mbs.unregisterMBean(name); } SimonManagerMXBean simonManagerMXBean = new SimonManagerMXBeanImpl(SimonManager.manager()); mbs.registerMBean(simonManagerMXBean, name); System.out.println("SimonManagerMXBean

How to detect if a Java System property has changed?

落爺英雄遲暮 提交于 2019-12-22 05:13:12
问题 I would like to know when a System property is changed. I have an application, in an application server, that somehow is changing a system property ( System.setProperty() I think). I was taking a look and I have found different approaches: JPDA? Observer & Observable? Property change listener? JMX? Any suggestions? Thanks in advance. 回答1: You can replace the system Properties with your own custom subclass. MyProperties newProps = new MyProperties(System.getProperties()); System.setProperties

jmx/jstatd access to remote machine through an ssh tunnel

夙愿已清 提交于 2019-12-22 01:58:34
问题 I'd like to use visualvm app through an ssh tunnel (to an EC2 machine) using jmx OR jstatd. How do I do this? Here is a list of what has been tried (and failed): (BTW: if visual vm is not appropriate, how do I find memory leaks on a remote machine?) jstatd: attempt: I set up the jstatd server on the EC2 machine (app was already running on it) Then I set up a tunnel mapping local port 3333 to remote port 1099 In VisualVM I tried to connect using jstatd on port 3333 ... none of the processes on

Kafka Producer Metrics

跟風遠走 提交于 2019-12-22 01:30:37
问题 I am running a Kafka producer in a local machine using my Intellij IDE & the producer will be producing a million records. While doing so, I want to capture the producer metrics in the below way: I am aware about JMX port for kafka & I did try setting the Kafka JMX port to 9999. But I am not sure if we can get the metrics using JConsole or JVisualVM in the above way that I am expecting. Can any one suggest any idea as to how can this be achieved? 回答1: In addition of JMX, the official Kafka