toomanyopenfiles / jmxmon Goto Github PK
View Code? Open in Web Editor NEW基于open-falcon的jmx监控插件
License: Apache License 2.0
基于open-falcon的jmx监控插件
License: Apache License 2.0
2017-12-27 12:19:05,687 [main] INFO [com.stephan.tof.jmxmon.Config] - init config
2017-12-27 12:19:05,815 [main] INFO [com.stephan.tof.jmxmon.Config] - /home/wwh/open-falcon/wwh/jmxmon/jmxmon-v0.0.2/./jmxmon.jvm.context.json is not exist
2017-12-27 12:19:05,815 [main] INFO [com.stephan.tof.jmxmon.Config] - init config ok
显示:jmxmon.jvm.context.json is not exist
The java process was started with imx user and password, which resulted in jmx monitor error with authentication error, is there any parameter in property file indicating for authentication use?
thanks in advance
端口必须从小到大写
2016-12-19 15:31:34,134 [pool-1-thread-1] ERROR [com.stephan.tof.jmxmon.JMXMonitor] - error during JRMP connection establishment; nested exception is:
java.io.EOFException
java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.io.EOFException
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:304)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:341)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at com.stephan.tof.jmxmon.jmxutil.ProxyClient.checkSslConfig(ProxyClient.java:274)
at com.stephan.tof.jmxmon.jmxutil.ProxyClient.(ProxyClient.java:167)
at com.stephan.tof.jmxmon.jmxutil.ProxyClient.getProxyClient(ProxyClient.java:518)
at com.stephan.tof.jmxmon.JMXMonitor.runTask(JMXMonitor.java:58)
at com.stephan.tof.jmxmon.JMXMonitor.access$0(JMXMonitor.java:50)
at com.stephan.tof.jmxmon.JMXMonitor$1.run(JMXMonitor.java:41)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:267)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:246)
... 16 more
一台机器有多个Java进程,除了端口,怎么给tag区分
log4j.properties中做配置: log4j.rootLogger=ERROR, Console (想改成error级别,否则输出信息太多;建议上报信息在debug下才输出)
但是在日志文件中还有info信息输出,这个能否确认下?
谢谢
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< com.stephan.tof:jmxmon >-----------------------
[INFO] Building jmxmon 0.0.2
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.490 s
[INFO] Finished at: 2019-08-07T19:47:22+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.4: Could not transfer artifact org.apache.maven.plugins:maven-install-plugin:pom:2.4 from/to nexus-public (http://maven.aliyun.com/nexus/content/groups/public): Cannot access http://maven.aliyun.com/nexus/content/groups/public with type default using the available connector factories: BasicRepositoryConnectorFactory: Cannot access http://maven.aliyun.com/nexus/content/groups/public using the registered transporter factories: WagonTransporterFactory: java.util.NoSuchElementException
[ERROR] role: org.apache.maven.wagon.Wagon
[ERROR] roleHint: http
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
请问thread.active.count是只包含NEW和RUNNABLE这两种状态吗?
另外就是这个thread.peak.count(峰值线程数)没明白是什么时间的峰值?
mvn assembly:single
这个问题如何处理
[WARNING] Cannot include project artifact: com.stephan.tof:jmxmon:jar:0.0.2; it doesn't have an associated file or directory.
没有找到启动脚本,是不是忘记传了?
2017-03-20 16:01:57,241 [main] INFO [com.stephan.tof.jmxmon.Config] - init config
2017-03-20 16:01:57,370 [main] INFO [com.stephan.tof.jmxmon.Config] - /usr/local/falcon-agent/jmxmon/./jmxmon.jvm.context.json is not exist
2017-03-20 16:01:57,370 [main] INFO [com.stephan.tof.jmxmon.Config] - init config ok
2017-03-20 16:01:58,262 [pool-1-thread-1] ERROR [com.stephan.tof.jmxmon.JMXMonitor] - non-JRMP server at remote endpoint
java.rmi.ConnectIOException: non-JRMP server at remote endpoint
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:248)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:342)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at com.stephan.tof.jmxmon.jmxutil.ProxyClient.checkSslConfig(ProxyClient.java:274)
at com.stephan.tof.jmxmon.jmxutil.ProxyClient.(ProxyClient.java:167)
at com.stephan.tof.jmxmon.jmxutil.ProxyClient.getProxyClient(ProxyClient.java:518)
at com.stephan.tof.jmxmon.JMXMonitor.runTask(JMXMonitor.java:58)
at com.stephan.tof.jmxmon.JMXMonitor.access$0(JMXMonitor.java:50)
at com.stephan.tof.jmxmon.JMXMonitor$1.run(JMXMonitor.java:41)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
这大概什么原因?
这个插件有个Bug,就是当jvm使用G1的垃圾收集器的时候,吐出的指标带有空格,导致open-falcon 识别不了,比如这个指标:"metric":"g1 young generation.gc.avg.time",里面有空格
下面是JVM采用G1的时候,jmx吐出的指标详情 :
content=[{"metric":"g1 young generation.gc.avg.time","endpoint":"UAT-HADOOP-13","timestamp":1565224431,"step":60,"value":0.0,"counterType":"GAUGE","tags":"jmxport=9998"},{"metric":"g1 young generation.gc.count","endpoint":"UAT-HADOOP-13","timestamp":1565224431,"step":60,"value":0.0,"counterType":"GAUGE","tags":"jmxport=9998"},{"metric":"g1 old generation.gc.avg.time","endpoint":"UAT-HADOOP-13","timestamp":1565224431,"step":60,"value":0.0,"counterType":"GAUGE","tags":"jmxport=9998"},{"metric":"g1 old generation.gc.count","endpoint":"UAT-HADOOP-13","timestamp":1565224431,"step":60,"value":-1.0,"counterType":"GAUGE","tags":"jmxport=9998"},{"metric":"gc.throughput","endpoint":"UAT-HADOOP-13","timestamp":1565224431,"step":60,"value":99.99,"counterType":"GAUGE","tags":"jmxport=9998"},{"metric":"old.gen.mem.used","endpoint":"UAT-HADOOP-13","timestamp":1565224431,"step":60,"value":3.53209116E9,"counterType":"GAUGE","tags":"jmxport=9998"},{"metric":"old.gen.mem.ratio","endpoint":"UAT-HADOOP-13","timestamp":1565224431,"step":60,"value":10.28,"counterType":"GAUGE","tags":"jmxport=9998"},{"metric":"new.gen.promotion","endpoint":"UAT-HADOOP-13","timestamp":1565224431,"step":60,"value":0.0,"counterType":"GAUGE","tags":"jmxport=9998"},{"metric":"new.gen.avg.promotion","endpoint":"UAT-HADOOP-13","timestamp":1565224431,"step":60,"value":0.0,"counterType":"GAUGE","tags":"jmxport=9998"},{"metric":"thread.active.count","endpoint":"UAT-HADOOP-13","timestamp":1565224431,"step":60,"value":219.0,"counterType":"GAUGE","tags":"jmxport=9998"},{"metric":"thread.peak.count","endpoint":"UAT-HADOOP-13","timestamp":1565224431,"step":60,"value":349.0,"counterType":"GAUGE","tags":"jmxport=9998"}]
conf.properties
workDir=./
jmx.ports=8099
agent.posturl=http://localhost:1988/v1/push
this program always print this logs,can not get data?
30 15:04:56,502 [pool-1-thread-1] ERROR [com.stephan.tof.jmxmon.JMXMonitor] - Connection refused to host: localhost; nested exception is:
java.net.ConnectException: 拒绝连接
java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: 拒绝连接
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:342)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at com.stephan.tof.jmxmon.jmxutil.ProxyClient.checkSslConfig(ProxyClient.java:274)
at com.stephan.tof.jmxmon.jmxutil.ProxyClient.(ProxyClient.java:167)
at com.stephan.tof.jmxmon.jmxutil.ProxyClient.getProxyClient(ProxyClient.java:518)
at com.stephan.tof.jmxmon.JMXMonitor.runTask(JMXMonitor.java:58)
at com.stephan.tof.jmxmon.JMXMonitor.access$0(JMXMonitor.java:50)
at com.stephan.tof.jmxmon.JMXMonitor$1.run(JMXMonitor.java:41)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
jmxmon.jvm.context.json这个文件的用途是啥?可以添加监控项吗
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.