2016-10-24 5 views
0

グラフをテンプレートとして作成し、現在のデータと古いデータを比較したいと思います。データは24時間に1回プッシュされ、現在のデータと24時間前の比較グラフを作成します。木場の比較グラフ

私は、日付範囲集計を使用することはできません。

おかげ

あなたはあなたが必要な正確に何をしている、Timelionを見ている必要があり

答えて

0

これは私がの2セットを持って

をやろうとしていますものです2つの異なる期間のデータ

10月21日2016年11月30日00:00から2016年10月21日12:30:00.000

10月24日2016 15:30:00.000 10月24日2016 16:30:00.000

データiは下記フォーマット

を使用してい可視時間範囲今

間で利用可能です今、私は両方の動向

enter image description here

を取得していない午前
{ 
    "title": "comparision_jmeter_jenkins", 
    "type": "line", 
    "params": { 
    "shareYAxis": true, 
    "addTooltip": true, 
    "addLegend": true, 
    "showCircles": true, 
    "smoothLines": false, 
    "interpolate": "linear", 
    "scale": "linear", 
    "drawLinesBetweenPoints": true, 
    "radiusRatio": 9, 
    "times": [], 
    "addTimeMarker": false, 
    "defaultYExtents": false, 
    "setYExtents": false, 
    "yAxis": {} 
    }, 
    "aggs": [ 
    { 
     "id": "1", 
     "type": "count", 
     "schema": "metric", 
     "params": {} 
    }, 
    { 
     "id": "2", 
     "type": "date_histogram", 
     "schema": "segment", 
     "params": { 
     "field": "timestamp", 
     "interval": "auto", 
     "customInterval": "2h", 
     "min_doc_count": 1, 
     "extended_bounds": {} 
     } 
    }, 
    { 
     "id": "3", 
     "type": "date_range", 
     "schema": "group", 
     "params": { 
     "field": "timestamp", 
     "ranges": [ 
      { 
      "from": "now-5d/d+6h", 
      "to": "now-5d/d+7h" 
      }, 
      { 
      "from": "now-2d/d+10h", 
      "to": "now-2d/d+11h" 
      } 
     ] 
     } 
    } 
    ], 
    "listeners": {} 
}