精华内容
参与话题
问答
  • jmxtrans

    2018-03-02 15:32:00
    jmxtrans more tomcat.json { "servers" : [ { "port" : "12345", "host" : "129.0.1.229", "queries" : [ { "obj" : "java.lang:type=Memory", "attr" : [ "HeapMemoryUsage","NonHeapMemoryUs...

    jmxtrans

    more tomcat.json
     {
      "servers" : [ {
        "port" : "12345",
        "host" : "129.0.1.229",
        "queries" : [ {
        "obj" : "java.lang:type=Memory",
        "attr" : [ "HeapMemoryUsage","NonHeapMemoryUsage" ],
        "resultAlias":"jvmMemory",
        "outputWriters" : [ {
            "@class" : "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
            "url" : "http://129.0.2.29:8886/",
            "username" : "root",
            "password" : "root",
            "database" : "jmxdb"
          } ]
        }  
         ]
      } ]
    }

    转载于:https://www.cnblogs.com/SZLLQ2000/p/8493519.html

    展开全文
  • Jmxtrans

    2016-05-03 19:44:00
    为什么80%的码农都做不了架构师?>>> ...

            监控jvm虚拟机有很多很多种方法,最为常见的一种就是通过jmx来获取jvm运行时的各种数据,目前也有很多开源的工具,各大主流监控工具基本都支持jmx监控。但是感觉在客户端配置起来比较麻烦,比如zabbix、nagios这些监控系统,需要你自己写脚本获取jvm数据,然后再上报给监控服务端。今天我尝试的是一种不需要我自己写脚本的方法,那就是jmxtrans。

            jmxtrans是什么呢?看这里,我也就不废话了。各种版本的jmxtrans,官方提供了很多打包好的安装包,有rpm、deb、tar等等。因为rpm依赖的是jdk1.8,而生产环境是jdk1.7,所以我使用tar包的方式来安装jmxtrans。

            下载jmxtrans-254:here

            实验环境:CentOS release 6.5 

                           java version "1.7.0_67"

            部署目录:/opt/programs/jmxtrans_254


    解压:

    cd /opt/programs/jmxtrans_254
    tar zxvf jmxtrans-254-dist.tar.gz


    查看目录结构:

    tree -L 3 jmxtrans_254
     

        总共四个目录:bin里面是启动脚本,test.json是我编排的配置文件,doc是样例编排文件,lib里面是jmxtrans.sh启动的时候需要引用的jar文件,tools里面是两个文件转换工具。


    下面看看test.json文件的内容:

    {
      "servers": [
        {
          "numQueryThreads": "2",
          "host": "10.203.50.34", 
          "port": "9080", 
          "queries": [ 
            {
              "outputWriters": [ 
                {
                  "@class": "com.googlecode.jmxtrans.model.output.StdOutWriter" 
                }
              ],
              "obj": "java.lang:type=OperatingSystem", 
              "attr": [ 
                "SystemLoadAverage",
                "AvailableProcessors",
                "TotalPhysicalMemorySize",
                "FreePhysicalMemorySize",
                "TotalSwapSpaceSize",
                "FreeSwapSpaceSize",
                "OpenFileDescriptorCount",
                "MaxFileDescriptorCount"
              ]
            },
            {
              "outputWriters": [
                {
                  "@class": "com.googlecode.jmxtrans.model.output.StdOutWriter"
                }
              ],
              "resultAlias": "heap",
              "obj": "java.lang:type=Memory",
              "attr": [
                "HeapMemoryUsage",
                "NonHeapMemoryUsage"
              ]
            },
            {
              "outputWriters": [
                {
                  "@class": "com.googlecode.jmxtrans.model.output.StdOutWriter"
                }
              ],
              "resultAlias": "cmsoldgen",
              "obj": "java.lang:name=CMS Old Gen,type=MemoryPool",
              "attr": [
                "Usage"
              ]
            },
            {
              "outputWriters": [
                {
                  "@class": "com.googlecode.jmxtrans.model.output.StdOutWriter"
                }
              ],
              "resultAlias": "gc",
              "obj": "java.lang:type=GarbageCollector,name=*",
              "attr": [
                "CollectionCount",
                "CollectionTime"
              ]
            },
            {
              "outputWriters": [
                {
                  "@class": "com.googlecode.jmxtrans.model.output.StdOutWriter",
                  "settings": {}
                }
              ],
              "resultAlias": "memorypool",
              "obj": "java.lang:type=MemoryPool,name=*",
              "attr": [
                "Usage"
              ]
            },
            {
              "outputWriters": [
                {
                  "@class": "com.googlecode.jmxtrans.model.output.StdOutWriter"
                }
              ],
              "resultAlias": "threads",
              "obj": "java.lang:type=Threading",
              "attr": [
                "DaemonThreadCount",
                "PeakThreadCount",
                "ThreadCount",
                "TotalStartedThreadCount"
              ]
            },
            {
              "outputWriters": [
                {
                  "@class": "com.googlecode.jmxtrans.model.output.StdOutWriter"
                }
              ],
              "resultAlias": "tomcat8-connectors",
              "obj": "Catalina:type=ThreadPool,name=*",
              "attr": [
                "currentThreadCount",
                "currentThreadsBusy"
              ]
            },
            {
              "outputWriters": [
                {
                  "@class": "com.googlecode.jmxtrans.model.output.StdOutWriter"
                }
              ],
              "resultAlias": "tomcat8-requests",
              "obj": "Catalina:type=GlobalRequestProcessor,name=*",
              "attr": [
                "bytesReceived",
                "bytesSent",
                "errorCount",
                "processingTime",
                "requestCount"
              ]
            }
          ]
        }
      ]
    }

        你可以根据你想查询的jvm type进行编排queries中的具体内容。

        其中host和port是开启jmx服务的机器的ip和端口,numQueryThreads是针对下面的queries的工作线程数。jmxtrans支持把收集到的jvm信息写入多个后端服务中,例如:StdOutWriter、GangliaWriter、GraphiteWriter、OpenTSDBWriter、RRDWriter、StatsDWriter、StdoutWriter、TCollectorUDPWriter、Log4JWriter、InfluxDBWriter等等。为了演示方便,我使用的是StdOutWriter,也就是打印到标准输出中。


    启动jmxtrans:

        使用jmxtrans.sh [ start conf.json ]来启动jmxtrans服务。但是,因为我选用的是打印结果到标准输出,如果使用jmxtrans.sh来启动,还要在标准能输出看到结果,就需要修改启动脚本,当然这个很容易,只需要在脚本内部的启动命令上设置标准输出重定向即可,但是为了保持jmxtrans.sh的原生行,我采用原始命令启动,命令如下:

    /opt/programs/jdk1.7.0_67/bin/java -server -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true \
    	-Djmxtrans.log.level=DEBUG -Djmxtrans.log.dir=. -Xms512m -Xmx512m -XX:PermSize=384m \
    	-XX:MaxPermSize=384m -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false  \
    	-Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=2101   \
    	-jar /opt/programs/jmxtrans_254/jmxtrans-254/lib/jmxtrans-all.jar -e -f ./test.json -s 60

        注意我的jdk是oracle jdk,采用tar包安装。 


            可以看到已经开始收集配置文件中编排的jvm的相关信息了,-f 是制定配置文件,-s 是制定收集时间间隔。


            下一篇讲解怎么使用jmxtrans agent配合jmxtrans使用。


     

    转载于:https://my.oschina.net/guol/blog/669251

    展开全文
  • jmxtrans默认目录

    2019-08-15 19:25:24
    jmxtrans安装目录:/usr/share/jmxtrans jmxtrans配置文件 :/etc/sysconfig/jmxtrans json文件默认目录:/var/lib/jmxtrans/ jmxtrans默认日志目录:/var/log/jmxtrans

    jmxtrans安装目录:/usr/share/jmxtrans
    jmxtrans配置文件 :/usr/share/jmxtrans/etc/wrapper.conf
    json文件默认目录:/var/lib/jmxtrans/
    jmxtrans默认日志目录:/var/log/jmxtrans

    展开全文
  • Android代码-jmxtrans

    2019-08-06 04:54:02
    This is the source code repository for the jmxtrans project. This is effectively the missing connector between speaking to a JVM via JMX on one end and whatever logging / monitoring / graphing package...
  • <div><p>As of 254, JMXTrans is creating duplicate outputwriters during initialization, only one of which is used. This leads to unnecessary resource consumption. #441 has more details</p><p>该提问来源...
  • JVM 监控 jmxtransjmxtrans-agent

    千次阅读 2017-08-07 12:03:36
    jmxtrans-agent 支持一下几种结果的存储形式: GraphitePlainTextTcpOutputWriter FileOverwriterOutputWriter SummarizingFileOverwriterOutputWriter ConsoleOutputWriter ...

    jmxtrans-agent 支持一下几种结果的存储形式:

    • GraphitePlainTextTcpOutputWriter

    • FileOverwriterOutputWriter

    • SummarizingFileOverwriterOutputWriter

    • ConsoleOutputWriter

    • SummarizingConsoleOutputWriter

    • RollingFileOutputWriter

    • StatsDOutputWriter


    RollingFileOutputWriter  这三种格式。

    ConsoleOutputWriter : 顾名思义,应该是将结果输出到了终端上吧(这个我没有去测试)。

    FileOverwriterOutputWriter、RollingFileOutputWriter : 这两种格式将结果存储到了文件中,而RollingFileOutputWriter 这个又更高级一些,支持文件的切割的一些功能。

    StatsDOutputWriter、GraphitePlainTextTcpOutputWriter : 这些应该结合 StatsD  和  Graphite 这样的开源画图工具去展示的吧。




    jmxtrans 监控Hbase





    展开全文
  • Update jmxtrans.sh

    2020-11-30 06:16:30
    <div><p>Specify JAVA_HOME env var instead of jps and java binaries</p><p>该提问来源于开源项目:jmxtrans/jmxtrans</p></div>
  • jmxtrans梳理

    千次阅读 2014-12-30 23:49:38
    1 jmxtrans入口类  com.googlecode.jmxtrans.JmxTransformer 2 启动命令行参数指定了json规则文件的目录(-j)或者文件(-f) 3 jmxtrans可以监控json文件或者目录的变化 4 定时规则文件  4.1 cronExpression 可以...
  • ubuntu下jmxtrans 安装

    2021-01-06 10:06:43
    JAVA 监控内容收集之 Jmxtrans。它是一个为应用程序、设备、系统等管理功能的框架,通常可以用来监控和管理Java应用系统。 1、拷贝jmxtrans至LS1上; scp jmxtrans-251.deb LS1:./ 2、安装jmxtrans-251.deb dpkg -i...
  • JMXTrans入门教程

    2020-07-01 23:07:49
    JMXTrans是一款开源的JMX指标采集工具,使用简单方便,无需编写代码,只需要配置文件就可以轻松收集大量应用的JMX指标数据。 安装 下载地址,CentOS系统的安装: wget http://central.maven.org/maven2/org/jmxt
  • Forcing Jmxtrans to use UDP

    2020-11-30 06:16:32
    <p>We are using jmxtrans with Graphite, but we are also trying to front it with Statsd. <p>We can see jmxtrans sending data on tcp, but not udp, which is what statsd is looking for. <p>How do we force...
  • jmxtrans介绍与安装

    千次阅读 2019-01-31 17:33:34
    安装jmxtrans jmxtrans是一个通过jmx采集java应用的数据采集器,只要java应用开启了JMX端口,就可以进行采集 去github下载 https://github.com/jmxtrans/jmxtrans/downloads 源码下载编译 git clone ...
  • m trying to add jmxtrans-agent to internal java with springboot application. <p>It's started with : <pre><code> /opt/jdk1.8/bin/java -javaagent:/servers/jmxtrans-agent/jmxtrans-agent.jar=/...
  • jmxtrans,吉姆斯特兰.zip

    2019-10-13 06:05:10
    这是jmxtrans项目的源代码存储库。
  • JMXTrans causing Full GC's

    2020-12-07 06:23:51
    <div><p>We recently plugged JMXTrans into our appservers. Immediately following this we saw strange GC behavior. Our app servers only allow Full GC's via RMI every 70 minutes. Every 70 minutes ...
  • jmxtrans 监控kafka

    2018-02-03 00:28:00
    jmxtrans 的版本必须 是jmxtrans-268.rpm 以上 如果kafka 为kafka_2.11-0.10.1.0 ,则在 jdk 1.7上使用 kafka_2.12-0.11.0.0 只能在jdk 1.8上使用 转载于:https://www.cnblogs.com/taek/p/8407746.html...
  • Aug 24 13:36:20 myhostname.example.org jmxtrans[26076]: Starting jmxtrans: [ OK ] Aug 24 13:36:20 myhostname.example.org systemd[1]: Failed to read PID from file /var/run/jmxtrans.pid: Invalid ...
  • jmxtrans安装使用

    2015-05-24 19:40:36
    实验环境1、下载jmxtrans下载地址:https://github.com/jmxtrans/jmxtrans/downloads2、安装jmxtrans#判断是否已安装此软件 #rpm-qa|grepjmx #卸载软件 #rpm-ejmxXXXXXX #安装jmxtrans rpm-ivh说明:jmxtrans安装...
  • <div><ul><li>Fixes to jmxtrans-systemd logback configuration: <ol><li>Fix error in how <code>logDir</code> property was defined</li><li>Remove console appender. No need to log redundantly to both the ...
  • When I tried with ~5000 not a single metric was reaching graphite, at that moment I saw that jmxtrans had hundreds of threads and was using 100% CPU. <p>Here's the thread dump: ...
  • <div><p>The idea is to package JMXTrans as a War which can be deployed in old school application servers like WebLogic, Tomcat, JBoss... This allows to monitor theses application servers from the ...
  • jmxtrans-all.jar missing?

    2020-11-30 06:16:18
    ve cloned a repository and run ./jmxtrans.sh eample.json. I get "Error: Unable to access jarfile jmxtrans-all.jar". Is it missing in github repository?</p><p>该提问来源于开源项目:...
  • <p>Added a JmxTrans deployment which will obtain JMX metrics automatically from the kafka brokers. It will also automatically roll when security or kafka brokers are updated. The JmxTrans deployment ...
  • <div><p>I recently forked, https://github.com/solarce/chef-jmxtrans, and am working on updating the chef cookbook for jmxtrans, as I'm deploying it in production....jmxtrans/jmxtrans</p></div>
  • <div><p>When servers that are monitored with jmxtrans go down due to maintenance window or any other reason it seems that jmxtrans starts to leak threads ending finally in an OutOfMemoryException....
  • jmxtrans监控kafka

    2016-04-20 11:49:00
    我们知道jmx可以将程序内部的信息暴露出来...这时jmxtrans就派上用场了,jmxtrans的作用是自动去jvm中获取所有jmx格式数据,并按照某种格式(json文件配置格式)输出到其他应用程序(常用的有ganglia) 安装 主...
  • <div><p>I have jmxtrans-agent sending graphite to influxdb, but if the influxdb server ever goes away or is switched out, jmxtrans-agent crashes and has to be restarted to start sending data again....
  • <div><p>Address one common cause of uncaught exceptions, and also register an uncaught exception handler to cause jmxtrans to exit with a non-zero status rather than getting stuck in an inconsistent ...
  • <div><p>Hi i am getting the below error while setting up influxbd with jmxtrans for monitoring data from kafka <pre><code> [19 Jun 2017 17:39:53] [jmxtrans-result-7] 256568 WARN ...
  • [1] <a href="https://github.com/downloads/jmxtrans/jmxtrans/jmxtrans-20121016.145842.6a28c97fbb-0.noarch.rpm">jmxtrans-20121016.145842.6a28c97fbb-0.noarch.rpm</a></p>该提问来源于开源项目:...

空空如也

1 2 3 4 5 ... 18
收藏数 355
精华内容 142
热门标签
关键字:

jmxtrans