0

ここからストーム トポロジ モニタリング用に Gumbo を設定しようとしています。

このサイトには明確な例や使用法がありません。パラメータとは何か、上記のサイトでこのコードを追加する場所を明確にする必要があります

MonitorClient mclient = MonitorClient.forConfig(conf);

// There are multiple metric groups, each with multiple metrics.
// Components have names and multiple instances, each of which has an    integer ID

mclient.declare(metricGroup,metric,task_id,component_id);

mclient.increment(metricGroup,metric, 1L , task_id);

TaskHook.registerTo(config);

では、MetricGroup、metric、task_id、および component_id にどのような値を提供する必要があるでしょうか? 各スパウトとボルトからそれを見つける必要がある場合、どうすればよいでしょうか? このコードを配置する場所は、トポロジを送信する前のトポロジ ビルダーか、open/prepare メソッドの下の個々の Spout/Bolt クラスか、それ以外の場所かです。この質問に関する助けに感謝します。

4

1 に答える 1

0

私はいくつかのオプションを試しましたが、以下は私にとってうまくいった設定です。グループ名は何でもかまいません。メトリック名は、あるコンポーネントから別のコンポーネントに送信されるストリームの名前です。タスク ID は任意の一意のタスク番号です。

conf.put("gumbo.server.kind", "local");
conf.put("gumbo.local.port", 8086); //Any port it must be same in the html file
conf.put("gumbo.start", System.currentTimeMillis());  // should be the same for all calls
conf.put("gumbo.bucketSize", 1000L);
conf.put("gumbo.enabled", true);
conf.put("gumbo.http.host", "hostname");
conf.put("gumbo.http.port", 8086);//Any port it must be same in the html file
conf.put("gumbo.http.app", "gumbo");
conf.put("gumbo.enabled", true);
conf.put("gumbo.server.key", topology_id);

MonitorClient mclient = MonitorClient.connect(conf);

GumboTaskHook.registerTo(conf);
    mclient.declare("Backlog",RTConstants.MATCH_LEFT_STREAM,3,RTConstants.TRANSFORM_LEFT_BOLT);       
    mclient.increment("Backlog",RTConstants.MATCH_LEFT_STREAM, 1L , 3);

    mclient.declare("Backlog",RTConstants.MATCH_RIGHT_STREAM,4,RTConstants.TRANSFORM_RIGHT_BOLT);       
    mclient.increment("Backlog",RTConstants.MATCH_RIGHT_STREAM, 1L , 4);
于 2016-03-28T01:25:36.480 に答える