首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >未显示新的relic自定义插件数据- ruby sdk

未显示新的relic自定义插件数据- ruby sdk
EN

Stack Overflow用户
提问于 2014-10-10 18:27:39
回答 1查看 129关注 0票数 0

我正在使用newrelic的ruby sdk开发一个自定义插件。当我在终端上运行示例应用程序时,它显示数据已成功捕获。但当我访问该站点时,它无法搜索指标,因此我无法查看任何报告的数据。

插件名称和其他所有内容都会显示出来,但不会显示数据的去向。

代理文件如下所示:

代码语言:javascript
复制
require "rubygems"
require "bundler/setup"

require "newrelic_plugin"

module ExampleAgent

  class Agent < NewRelic::Plugin::Agent::Base

    agent_guid "com.phytel.Product1"
    agent_version "1.0.1"
    agent_config_options :hostname  # frequency of the periodic functions
    agent_human_labels("Product1") { "Call Statuses" }

    def poll_cycle
      # x = Time.now.to_f * hertz * Math::PI * 2
      report_metric "Component/Status/Progressing",     "Value", 10
      report_metric "Component/Status/Scheduled",     "Value", 20
      report_metric "Component/Status/Busy",     "Value", 2
    end

  end

  #
  # Register this agent with the component.
  # The ExampleAgent is the name of the module that defines this
  # driver (the module must contain at least three classes - a
  # PollCycle, a Metric and an Agent class, as defined above).
  #
  NewRelic::Plugin::Setup.install_agent :example, ExampleAgent

  #
  # Launch the agent; this never returns.
  #
  NewRelic::Plugin::Run.setup_and_run

end

EN

回答 1

Stack Overflow用户

发布于 2014-12-23 12:30:33

不要将Component部分放在指标名称中。SDK会自动为您添加此内容。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26297292

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档