jmx

开启jmx时遇到的一个Tomcat坑

本秂侑毒 提交于 2020-03-08 04:57:37
在startup.sh的最后一行之前加入了 export CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote -Djava.rmi.server.hostname=ip -Dcom.sun.management.jmxremote.port=1090 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.password.file=/usr/local/apache-tomcat-8.0.35/bin/jmxremote.password -Dcom.sun.management.jmxremote.access.file=/usr/local/apache-tomcat-8.0.35/bin/jmxremote.access" 以使用Jvisualvm进行远程监控 需要jmxremote.password和jmxremote.access两个文件 内容分别是user password和user readonly/readwrite 遇到的坑是,当时顺手就chmod 777 jmxremote.*了

SSL property(configuration) files on a JMX agent and JMX client command lines make the JMX client fail with error "… PKIX path building failed

若如初见. 提交于 2020-03-05 00:27:20
问题 There are already many such questions on SO with error "...PKIX path building failed...", but none of them addressed my problem. I tried for many hours without success. Problem I am facing is JMX client throws error when SSL configuration information(keystore and its password) is put in property files (configuration files) and the file names are supplied on Java command line used for the JMX client and its JMX server(agent) programs. The client works fine if I directly supply the keystore and

SSL property(configuration) files on a JMX agent and JMX client command lines make the JMX client fail with error "… PKIX path building failed

拜拜、爱过 提交于 2020-03-05 00:26:45
问题 There are already many such questions on SO with error "...PKIX path building failed...", but none of them addressed my problem. I tried for many hours without success. Problem I am facing is JMX client throws error when SSL configuration information(keystore and its password) is put in property files (configuration files) and the file names are supplied on Java command line used for the JMX client and its JMX server(agent) programs. The client works fine if I directly supply the keystore and

启动tomcat时jmx port被占用

时光毁灭记忆、已成空白 提交于 2020-03-03 05:29:15
一.问题描述   今天一来公司,在IntelliJ IDEA 中启动Tomcat服务器时就出现了如下图所示的错误:   错误: 代理抛出异常错误 : java.rmi.server.ExportException: Port already in use: 1099; nested exception is: java.net.BindException: Address already in use: JVM_Bind   这里说的是1099端口被其它进程占用了. 二.解决办法   找出占用1099端口的进程,进入windows命令,查看什么进程占用了1099端口   使用命令 :netstat -aon|findstr 1099 找出占用1099端口的进程,如下图所示:   然后关闭占用该端口的进程:taskkill -f -pid 3756 来源: https://www.cnblogs.com/zdb292034/p/8047596.html

Java之JMX

冷暖自知 提交于 2020-02-21 03:34:04
[动态修改程序的配置的思想值得学习!] 一、JMX简介   JMX是一种JAVA的正式规范,它主要目的是让程序有被管理的功能,那么怎么理解所谓的“被管理”呢?试想你开发了一个软件(如WEB网站),它是在24小时不间断运行的,那么你可能会想要“监控”这个软件的运行情况,比如收到了多少数据,有多少人登录等等。或者你又想“配置”这个软件,比如现在访问人数比较多,你想把数据连接池设置得大一些。   当然,你也许会专门为这些管理来开发软件,但如果你借助JMX,则会发现创建这样的管理程序是如此简单。因为你无需为管理程序来开发界面,已经有通用的JMX管理软件,如MC4J,或者是用一般都附带提供的HTML网页来管理,你要做的仅仅是将自己要被管理和监控类的按照JMX规范修改一下即可。   中间件软件WebLogic的管理页面就是基于JMX开发的,而JBoss则整个系统都基于JMX构架。 二、准备工作   JMX是一份规范,SUN依据这个规范在JDK(1.3、1.4、5.0)提供了JMX接口。而根据这个接口的实现则有很多种,比如Weblogic的JMX实现、MX4J、JBoss的JMX实现。在SUN自己也实现了一份,不过在JDK1.4之前,这件JMX实现(一些JAR包)是可选的,你得去它的网站上下载。JDK5.0则内嵌了进来,安装JDK5.0就可以开发基于JMX的代码了。   但JDK5

Kafka监控工具汇总

*爱你&永不变心* 提交于 2020-02-18 01:23:01
对于大数据集群来说,监控功能是非常必要的,通过日志判断故障低效,我们需要完整的指标来帮我们管理Kafka集群。本文讨论Kafka的监控以及一些常用的第三方监控工具。 一、Kafka Monitoring 首先介绍kafka的监控原理,第三方工具也是通过这些来进行监控的,我们也可以自己去是实现监控,官网关于监控的文档地址如下: http://kafka.apache.org/documentation/#monitoring ]( http://kafka.apache.org/documentation/#monitoring ) kafka使用Yammer Metrics进行监控,Yammer Metrics是一个java的监控库。 kafka默认有很多的监控指标,默认都使用JMX接口远程访问,具体方法是在启动broker和clients之前设置JMX_PORT: JMX_PORT=9997 bin/kafka-server-start.sh config/server.properties Kafka的每个监控指标都是以JMX MBEAN的形式定义的,MBEAN是一个被管理的资源实例。 我们可以使用Jconsole (Java Monitoring and Management Console),一种基于JMX的可视化监视、管理工具。 来可视化监控的结果: 图2

WSO2: StatisticsClient

喜你入骨 提交于 2020-02-07 09:32:25
问题 How can i use StatisticsAdmin of Application Server My scenario is : i want to get responsetime of a service that deploy on a server(AppServer/DataServer..) and probed by ESB using discoveryproxy of governance regidtry. if is it possible how can i implement it? otherwise i should be get service response time from AppServer in direct using service name. i can create a proxy of ServerAdminMBean using this package and interface import org.wso2.carbon.server.admin.service.ServerAdminMBean but i

JMX and REST API. How can I build a bridge between them?

北城余情 提交于 2020-02-06 15:14:47
问题 I have written a code which exposes data from my JVM application via JMX Bean. I can see these values in JConsole. How can I grab these values from jconsole, do I need to write another program. And also, how can I use REST API to display these JMX Bean data to Rich UI format? I have used Jolokia and I am getting this reply. I am not getting any info. I used the jolokia as JVM argument in my code. But the only reply I am getting is this { timestamp: 1411988073, status: 200, request: { type:

Name for @ManagedOperation in Spring JMX

懵懂的女人 提交于 2020-02-01 05:31:11
问题 I used org.springframework.jmx.export.annotation.@ManagedOperation to expose a method as MBean. I want the operation name different from the method name, but managed operation doesn't have any attribute for it. For example: @ManagedOperation public synchronized void clearCache() { // do something } and I want this operation exposed with name = "ResetCache". 回答1: Create a custom annotation: @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface JmxName { String value

Prometheus监控实践

百般思念 提交于 2020-01-29 16:02:35
prometheus存储的是 时序数据 ,即按相同时序(相同名称和标签),以时间维度存储连续的数据的集合。 一、架构图 二、部署 1. Prometheus Server端部署 1、解压安装包:(各组件最新版下载地址: https://prometheus.io/download/ ) 1 mkdir /opt/monitor;cd /opt/monitor 2 unzip prometheus.zip ./ 3 tar zxf prometheus-2.11.1.linux-amd64.tar.gz 4 mv prometheus-2.11.1.linux-amd64 prometheus-2.11.1 2、添加为系统服务 1 vim /usr/lib/systemd/system/prometheus-server.service 2 3 [Unit] 4 Description=prometheus-server 5 After=network.target 6 7 [Service] 8 Type=simple 9 User=root 10 ExecStart=/opt/monitor/prometheus/prometheus-2.11.1/prometheus --config.file=/opt/monitor/prometheus/prometheus-2.11.1