Would Kibana5 support pipeline aggregations?


(Morry) #1

Hi

Timelion helps us a lot for calculating and plotting time series data, but the shortage is that X-axis can only be time series.

So when we do some calculations like this, neither Kibana nor timelion works.

gongshi

This is a division between two terms aggregation, and the X-axis should be field C. As I know, pipeline aggregation can solve this problem, but I found it not supported with current version of Kibana.

Also, I'd like to know whether it's difficult to develop a new Kibana plugin based on timelion to solve this problem?

Thank you for help!


(Chris Cowan) #2

We don't have any plans for adding pipeline aggregations to Visualize :frowning: (but we are exploring some new interfaces but there is no timeline for when that will be ready).

As a side note... For Pipeline Aggs you will also either need to have the x-axis be either a histogram or date_histogram due the the nature of how most pipeline aggs. work. Have you tied to express your equation in pipeline aggs in Sense? Is field C a number?


(Morry) #3

Hi @simianhacker ,

Field C is not numeric, so the x-axis would be terms aggregation.

I have tried to write the dsl, but have problems with buckets_path

{
  "size": 0,
  "aggs": {
    "test": {
      "filters": {
        "filters": {
          "A": {
            # ...
          },
          "B": {
            # ...
          }
        }
      },
      "aggs": {
        "groupby": {
          "terms": {
            "field": "session.column2",
            "size": 10
          }
        },
        "ratio": {
          "bucket_script": {
            "buckets_path": {
              "FA": "A>groupby",  # No aggregation found for path [A>groupby]
              "FB": "B>groupby"   # No aggregation found for path [B>groupby]
            },
            "script": "FA / FB * 100"
          }
        }
      }
    }
  }
}

(Morry) #4

Hi @simianhacker
I've corrected my dsl, but still with problem of sorting.

{
  "size": 0,
  "aggregations": {
    "session_id": {
      "terms": {
        "field": "session.column2",
        "order": {
          "ratio": "desc" # Error!
        }
      },
      "aggregations": {
        "A": {
          "filter": {
            # ...
          }
        },
        "B": {
          "filter": {
            # ...
          }
        },
        "ratio": {
          "bucket_script": {
            "buckets_path": {
              "FA": "A._count",
              "FB": "B._count"
            },
            "script": "FA / (FB + 1) * 100.0"
          }
        }
      }
    }
  }
}

I tried to order by sub-aggs, but raised error:

Invalid term-aggregator order path [ratio]. Unknown aggregation [ratio]

(system) #5