[英]Getting appmetrics to send data to (Eclips) IBM Health centre
Decided to set up appmetrics to monitor my app, but got stuck on getting Eclipse Health centre to, and I can't find any instructions (that I can understand). 决定设置用于监视我的应用程序的度量标准,但是被困在Eclipse Health Center上,我找不到任何说明(我能理解)。
Got a mosquito MTQQ broker installed (localhost port 1883) 安装了蚊子MTQQ代理(本地主机端口1883)
Set up the appmetric (as a config file) 设置appmetric(作为配置文件)
var appmetrics = require('appmetrics')
module.exports = {
crMonitor: function(){
var monitoring = appmetrics.monitor();
monitoring.on('mqtt', function(data){
console.log("MTQQ event at " + data.time+ " type " +data.method + " topic: " + data.topic)
})
monitoring.enable('socketio');
monitoring.enable('eventloop');
monitoring.enable('http');
/*monitoring.on('initialized', function (env) {
env = monitoring.getEnvironment();
for (var entry in env) {
console.log(entry + ':' + env[entry]);
};
});*/
return monitoring;
}
}
And when I start the application I get the following three lines: 当我启动应用程序时,我得到以下三行:
So they are talking. 所以他们在说话。 But now comes how to set up Health Centre. 但是现在是如何建立医疗中心。 Tried without manual, no luck, can start it, but can't find any way to configure source. 在没有手册的情况下尝试过,没有运气,可以启动它,但是找不到任何配置源的方法。
I then found this https://www.ibm.com/support/knowledgecenter/SS3KLZ/com.ibm.java.diagnostics.healthcenter.doc/topics/configuringagent.html 然后,我找到了这个https://www.ibm.com/support/knowledgecenter/SS3KLZ/com.ibm.java.diagnostics.healthcenter.doc/topics/configuringagent.html
But I can't make heads or toes of what I am suppose to do. 但是我无法做我想做的事情。 I tried setting the environment (launchctl setenv IBM_JAVA_OPTIONS "-Xhealthcenter:port=1883") but as far as I can tell, eclipse healthcenter does not even attempt to gather information via MTQQ. 我尝试设置环境(launchctl setenv IBM_JAVA_OPTIONS“ -Xhealthcenter:port = 1883”),但是据我所知,eclipse healthcenter甚至没有尝试通过MTQQ收集信息。
Any suggestions. 有什么建议么。
If I'm reading your question right, you're trying to get AppMetrics to send data to the Eclipse HealthCenter client via MQTT. 如果我正确地阅读了您的问题,那么您正在尝试使AppMetrics通过MQTT将数据发送到Eclipse HealthCenter客户端。
First, a bit of definition - AppMetrics is doing the job of what we call an Agent - this monitors your code extracting useful information that it will then send somewhere for analysis. 首先,有一点定义-AppMetrics正在执行我们称为代理的工作-这将监视您的代码以提取有用的信息,然后将其发送到某处进行分析。 In your case, you have the AppMetrics Agent sending the data over MQTT, and the log output you show proves it's connected to your Mosquito broker, so you're half way there already! 就您而言,您有AppMetrics代理通过MQTT发送数据,并且显示的日志输出证明它已连接到Mosquito代理,因此您已经完成了一半!
Now you want the Eclipse Health Center Client to connect to the Mosquito broker, get the data, perform analysis and produce graphs so you can visualise what's happening with your program. 现在,您希望Eclipse Health Center Client连接到Mosquito代理,获取数据,执行分析并生成图形,以便您可以直观地查看程序的情况。 This is where your problem lies, as the link you have and the options you're trying are about setting up the Java Health Center AGENT, not the Eclipse Client. 这就是您的问题所在,因为您拥有的链接和正在尝试的选项都是关于设置Java Health Center AGENT而不是Eclipse Client。 The instructions for installing the Eclipse Health Center Client are at https://www.ibm.com/support/knowledgecenter/SS3KLZ/com.ibm.java.diagnostics.healthcenter.doc/topics/installingclient.html - this includes links to the Eclipse Marketplace to install from there, or to the repository to include if using Eclipse's Install New Software option from the Help menu. https://www.ibm.com/support/knowledgecenter/SS3KLZ/com.ibm.java.diagnostics.healthcenter.doc/topics/installingclient.html上的安装Eclipse Health Center Client的说明-包括指向如果要使用Eclipse Marketplace,请从那里进行安装;如果使用“帮助”菜单中的Eclipse的“安装新软件”选项,则要包含到其中的Eclipse Marketplace。
There's a diagram that explains all this visually at https://www.ibm.com/support/knowledgecenter/SS3KLZ/com.ibm.java.diagnostics.healthcenter.doc/topics/introduction.html 在https://www.ibm.com/support/knowledgecenter/SS3KLZ/com.ibm.java.diagnostics.healthcenter.doc/topics/introduction.html上,有一个图表以可视方式对其进行了说明。
Hope this helps! 希望这可以帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.