简体   繁体   English

获取Appmetrics将数据发送到(Eclips)IBM Health Center

[英]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: 当我启动应用程序时,我得到以下三行:

  • [Mon Mar 14 15:20:13 2016] com.ibm.diagnostics.healthcenter.loader INFO: Node Application Metrics 1.0.7.201602110606 (Agent Core 3.0.6.201511030958) [2016年3月14日星期一15:20:13] com.ibm.diagnostics.healthcenter.loader信息:节点应用程序指标1.0.7.201602110606(Agent Core 3.0.6.201511030958)
  • [Mon Mar 14 15:20:13 2016] com.ibm.diagnostics.healthcenter.mqtt INFO: Connecting to broker localhost:1883 [2016年3月14日星期一15:20:13] com.ibm.diagnostics.healthcenter.mqtt信息:连接到代理localhost:1883
  • [Mon Mar 14 15:20:14 2016] com.ibm.diagnostics.healthcenter.mqtt INFO: Connected to broker localhost:1883 [2016年3月14日星期一15:20:14] com.ibm.diagnostics.healthcenter.mqtt信息:已连接到代理localhost:1883

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.

相关问题 从 ibm bluemix 获取数据到 python 代码中 - getting data from ibm bluemix into python code IBM Cloud:让Cloud Foundry不轮询应用程序实例(运行状况检查) - IBM Cloud: Have Cloud Foundry not poll for instance of application (health check) 在 IBM Cloud Function 中发送 zip 文件作为响应 - Send zip file as response in IBM Cloud Function appmetrics(https://github.com/RuntimeTools/appmetrics/issues)请求和http事件不起作用 - appmetrics(https://github.com/RuntimeTools/appmetrics/issues) request and http event not working 从服务器中的公共 API 获取数据并发送到客户端 - Getting data from public API in server and send to Client 让 nodeJS web 服务器将表单数据发送到我的 email - Getting nodeJS web server to send form data to my email 在 IBM Cloudant http 日志记录中获得“未经授权”? - Getting “unauthorized” in IBM Cloudant http loging? 通过 beantalk 部署节点应用程序时的“无数据”健康状态 - "no data" health status while deploying node app via beanstalk 如何使用nodemailer从IBM Lotus Notes发送邮件? - How to send mail from IBM lotus notes using nodemailer? 每当我发出PostgreSQL查询时,Appmetrics-dash都会使应用程序崩溃 - Appmetrics-dash crashes app whenever I issue a postgresql query
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM