2014-10-10 51 views
0

我正在使用newrelic的ruby sdk開發自定義插件。當我運行示例應用程序時,在終端上顯示數據被成功捕獲。但是當我去到網站時,它無法搜索指標,並且由於我無法查看任何已報告的數據。新的遺蹟自定義插件數據沒有顯示 - ruby​​ sdk

該插件名稱和everthing其他顯示,但不在數據發生的地方。

此代理文件的樣子:

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

回答

0

不要把你的度量標準名稱的Component部分。 SDK會自動爲您添加。

相關問題