2016-12-14 11 views
0

私はElasticsearchasデータソースでGrafanaを使用しています。 私の各文書には、フィールド "id"と "lastmodifiedDate"があります。 私はそれに応じてIDのカウント最終更新日を持つテーブルを表示したいと思います。ここGrafana 2.xのElasticsearch Luceneクエリから図をプロットできません

は私の文書である:

{ 
     "_index": "global_search", 
     "_type": "News_Item", 
     "_id": "48", 
     "_score": 1, 
     "_source": { 
      "id": "48", 
      "dueDate": 1478802600000, 
      "lastModifiedDate": 1478802600000, 
      "whenCreatedDate": 1477506600000, 
      "ownerEmail": "[email protected]", 
      "owner": { 
      "firstname": "ABC", 
      "lastname": "Kumar", 
      "email": "[email protected]" 
      }, 
      "subject": "USA','According to NBCDFW.com, an explosion at a silicon plant ", 
      "status": "NEW", 
      "updatedby": "ABC Kumar", 
      "content": "Text data" 
     } 
     }, 
     { 
     "_index": "global_search", 
     "_type": "News_Item", 
     "_id": "26", 
     "_score": 1, 
     "_source": { 
      "id": "26", 
      "dueDate": 1477679400000, 
      "lastModifiedDate": 1477679400000, 
      "whenCreatedDate": 1477506600000, 
      "researchTitle": "Flash Floods Hit Parts of Southern France", 
      "ownerEmail": "[email protected]", 
      "owner": { 
      "firstname": "XYZ", 
      "lastname": "Kumar", 
      "email": "[email protected]" 
      }, 
      "subject": "Flash Floods Hit Parts of Southern France", 
      "status": "MONITORING", 
      "updatedby": "XYZ", 
      "content": "Text2 data" 
     } 
     } 

は質問:どのようにIDのに従って、日付のカウントでテーブルをプロットするテーブルをプロットする正確なLuceneクエリとは何ですか?

答えて

0

クエリパラメータを以下にそれを得ることができます。

Metric: 
    Count 
Group by: 
    type: Date Histogram 
    field: lastModifiedDate 

Queryフィールドは空白のままにすることができます。

関連する問題