Example Elasticsearch Queries

The service can be accessed at https://logproc-stage-ucsb-1.test.dataone.org/app/kibana

Elasticsearch can be accessed locally by opening a ssh tunnel:

ssh -L9200:localhost:9200 logproc-stage-ucsb-1.test.dataone.org

Metrics Service

Landing Page Query Request

{
  "metrics": [
      "Citations",
      "Unique_Dataset_Requests",
      "Total_Dataset_Requests",
      "Total_Dataset_Investigations",
      "Unique_Dataset_Investigations"
    ],
    "filterBy": [
      {
        "filterType": "dataset",
        "values": [
          "Dataset002"
        ],
        "interpretAs": "list"
      }
    ],
    "groupBy": [
      "dataset"
    ]
}

User Profile Charts

{
  "metrics": [
      "Citations",
      "Unique_Dataset_Requests",
      "Total_Dataset_Requests",
      "Total_Dataset_Investigations",
      "Unique_Dataset_Investigations"
    ],
    "filterBy": [
      {
        "filterType": "uid",
        "values": [
          "User01"
        ],
        "interpretAs": "list"
      },
      {
        "filterType": "month",
        "values": [
          "2017-01",
          "2018-04"
        ],
        "interpretAs": "range"
      }
    ],
    "groupBy": [
      "uid", "month", "year"
    ]
}

User Profile Summary

{
  "metrics": [
      "Citations",
      "Unique_Dataset_Requests",
      "Total_Dataset_Requests",
      "Total_Dataset_Investigations",
      "Unique_Dataset_Investigations"
    ],
    "filterBy": [
      {
        "filterType": "uid",
        "values": [
          "User01"
        ],
        "interpretAs": "list"
      }
    ],
    "groupBy": [
      "uid"
    ]
}

Event Processing

Unprocessed events

GET eventlog-1/_search
{
 "query": {
   "bool": {
     "must": [
       {
         "term": {"event.key": "read"}
       }
     ],
     "must_not": [
       {
         "exists":{"field":"sessionId"}
       }
     ]
   }
 },
 "size":0
}

View in kibana