Get datafeed stats Added in 5.5.0

GET /_ml/datafeeds/_stats

You can get statistics for multiple datafeeds in a single API request by using a comma-separated list of datafeeds or a wildcard expression. You can get statistics for all datafeeds by using _all, by specifying * as the <feed_id>, or by omitting the <feed_id>. If the datafeed is stopped, the only information you receive is the datafeed_id and the state. This API returns a maximum of 10,000 datafeeds.

Query parameters

  • allow_no_match boolean

    Specifies what to do when the request:

    1. Contains wildcard expressions and there are no datafeeds that match.
    2. Contains the _all string or no identifiers and there are no matches.
    3. Contains wildcard expressions and there are only partial matches.

    The default value is true, which returns an empty datafeeds array when there are no matches and the subset of results when there are partial matches. If this parameter is false, the request returns a 404 status code when there are no matches or only partial matches.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • count number Required
    • datafeeds array[object] Required
      Hide datafeeds attributes Show datafeeds attributes object
      • assignment_explanation string

        For started datafeeds only, contains messages relating to the selection of a node.

      • datafeed_id string Required
      • node object
        Hide node attributes Show node attributes object
        • name string Required
        • ephemeral_id string Required
        • id string Required
        • transport_address string Required
        • attributes object Required
          Hide attributes attribute Show attributes attribute object
          • * string Additional properties
      • state string Required

        Values are started, stopped, starting, or stopping.

      • timing_stats object
        Hide timing_stats attributes Show timing_stats attributes object
        • bucket_count number Required

          The number of buckets processed.

        • exponential_average_search_time_per_hour_ms number

          Time unit for fractional milliseconds

        • exponential_average_calculation_context object
          Hide exponential_average_calculation_context attributes Show exponential_average_calculation_context attributes object
          • incremental_metric_value_ms number

            Time unit for fractional milliseconds

          • latest_timestamp number

            Time unit for milliseconds

          • previous_exponential_average_ms number

            Time unit for fractional milliseconds

        • job_id string Required
        • search_count number Required

          The number of searches run by the datafeed.

        • total_search_time_ms number

          Time unit for fractional milliseconds

        • average_search_time_per_bucket_ms number

          Time unit for fractional milliseconds

      • running_state object
        Hide running_state attributes Show running_state attributes object
        • real_time_configured boolean Required

          Indicates if the datafeed is "real-time"; meaning that the datafeed has no configured end time.

        • real_time_running boolean Required

          Indicates whether the datafeed has finished running on the available past data. For datafeeds without a configured end time, this means that the datafeed is now running on "real-time" data.

        • search_interval object
          Hide search_interval attributes Show search_interval attributes object
          • end string

            A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

          • end_ms number

            Time unit for milliseconds

          • start string

            A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

          • start_ms number

            Time unit for milliseconds

GET /_ml/datafeeds/_stats
curl \
 --request GET 'http://api.example.com/_ml/datafeeds/_stats' \
 --header "Authorization: $API_KEY"