@@ -45,36 +45,61 @@ IMPORTANT: This API returns a maximum of 10,000 {dfeeds}.
45
45
==== {api-path-parms-title}
46
46
47
47
`<feed_id>`::
48
- (Optional, string) Identifier for the {dfeed}. It can be a {dfeed} identifier
49
- or a wildcard expression. If you do not specify one of these options, the API
50
- returns statistics for all {dfeeds}.
48
+ (Optional, string)
49
+ include::{docdir}/ml/ml-shared.asciidoc[tag=datafeed-id-wildcard]
50
+ If you do not specify one of these options, the API returns information about
51
+ all {dfeeds}.
51
52
52
53
[[ml-get-datafeed-stats-query-parms]]
53
54
==== {api-query-parms-title}
54
55
55
56
`allow_no_datafeeds`::
56
- (Optional, boolean) Specifies what to do when the request:
57
- +
58
- --
59
- * Contains wildcard expressions and there are no {datafeeds} that match.
60
- * Contains the `_all` string or no identifiers and there are no matches.
61
- * Contains wildcard expressions and there are only partial matches.
62
-
63
- The default value is `true`, which returns an empty `datafeeds` array when
64
- there are no matches and the subset of results when there are partial matches.
65
- If this parameter is `false`, the request returns a `404` status code when there
66
- are no matches or only partial matches.
67
- --
57
+ (Optional, boolean)
58
+ include::{docdir}/ml/ml-shared.asciidoc[tag=allow-no-datafeeds]
68
59
69
60
70
61
[[ml-get-datafeed-stats-results]]
71
62
==== {api-response-body-title}
72
63
73
- The API returns the following information:
64
+ The API returns an array of {dfeed} count objects. All of these properties are
65
+ informational; you cannot update their values.
66
+
67
+ `assignment_explanation`::
68
+ (string) For started {dfeeds} only, contains messages relating to the selection of a node.
69
+
70
+ `datafeed_id`::
71
+ (string)
72
+ include::{docdir}/ml/ml-shared.asciidoc[tag=datafeed-id]
73
+
74
+ `node`::
75
+ (object) For started {dfeeds} only, the node upon which the {dfeed} is started. The {dfeed} and job will be on the same node.
76
+ `id`::: The unique identifier of the node. For example, "0-o0tOoRTwKFZifatTWKNw".
77
+ `name`::: The node name. For example, `0-o0tOo`.
78
+ `ephemeral_id`::: The node ephemeral ID.
79
+ `transport_address`::: The host and port where transport HTTP connections are
80
+ accepted. For example, `127.0.0.1:9300`.
81
+ `attributes`::: For example, `{"ml.machine_memory": "17179869184"}`.
82
+
83
+ `state`::
84
+ (string) The status of the {dfeed}, which can be one of the following values:
85
+ +
86
+ --
87
+ * `started`: The {dfeed} is actively receiving data.
88
+ * `stopped`: The {dfeed} is stopped and will not receive data until it is
89
+ re-started.
90
+ --
91
+
92
+ `timing_stats`::
93
+ (object) An object that provides statistical information about timing aspect of
94
+ this {dfeed}.
95
+ //average_search_time_per_bucket_ms
96
+ //bucket_count
97
+ //exponential_average_search_time_per_hour_ms
98
+ `job_id`:::
99
+ include::{docdir}/ml/ml-shared.asciidoc[tag=job-id-anomaly-detection]
100
+ `search_count`::: Number of searches performed by this {dfeed}.
101
+ `total_search_time_ms`::: Total time the {dfeed} spent searching in milliseconds.
74
102
75
- `datafeeds`::
76
- (array) An array of {dfeed} count objects.
77
- For more information, see <<ml-datafeed-counts>>.
78
103
79
104
[[ml-get-datafeed-stats-response-codes]]
80
105
==== {api-response-codes-title}
@@ -86,46 +111,46 @@ The API returns the following information:
86
111
[[ml-get-datafeed-stats-example]]
87
112
==== {api-examples-title}
88
113
89
- The following example gets usage information for the
90
- `datafeed-total-requests` {dfeed}:
91
-
92
114
[source,console]
93
115
--------------------------------------------------
94
- GET _ml/datafeeds/datafeed-total-requests /_stats
116
+ GET _ml/datafeeds/datafeed-high_sum_total_sales /_stats
95
117
--------------------------------------------------
96
- // TEST[skip:setup:server_metrics_startdf ]
118
+ // TEST[skip:Kibana sample data started datafeed ]
97
119
98
120
The API returns the following results:
99
121
100
122
[source,console-result]
101
123
----
102
124
{
103
- "count": 1,
104
- "datafeeds": [
125
+ "count" : 1,
126
+ "datafeeds" : [
105
127
{
106
- "datafeed_id": "datafeed-total-requests ",
107
- "state": "started",
108
- "node": {
109
- "id": "2spCyo1pRi2Ajo-j-_dnPX ",
110
- "name": "node-0",
111
- "ephemeral_id": "hoXMLZB0RWKfR9UPPUCxXX",
112
- "transport_address": "127.0.0.1:9300",
113
- "attributes": {
114
- "ml.machine_memory": "17179869184",
115
- "ml.max_open_jobs": "20"
128
+ "datafeed_id" : "datafeed-high_sum_total_sales ",
129
+ "state" : "started",
130
+ "node" : {
131
+ "id" : "7bmMXyWCRs-TuPfGJJ_yMw ",
132
+ "name" : "node-0",
133
+ "ephemeral_id" : "hoXMLZB0RWKfR9UPPUCxXX",
134
+ "transport_address" : "127.0.0.1:9300",
135
+ "attributes" : {
136
+ "ml.machine_memory" : "17179869184",
137
+ "ml.max_open_jobs" : "20"
116
138
}
117
139
},
118
- "assignment_explanation": "",
119
- "timing_stats": {
120
- "job_id": "job-total-requests",
121
- "search_count": 20,
122
- "total_search_time_ms": 120.5
140
+ "assignment_explanation" : "",
141
+ "timing_stats" : {
142
+ "job_id" : "high_sum_total_sales",
143
+ "search_count" : 7,
144
+ "bucket_count" : 743,
145
+ "total_search_time_ms" : 134.0,
146
+ "average_search_time_per_bucket_ms" : 0.180349932705249,
147
+ "exponential_average_search_time_per_hour_ms" : 11.514712961628677
123
148
}
124
149
}
125
150
]
126
151
}
127
152
----
128
- // TESTRESPONSE[s/"2spCyo1pRi2Ajo-j-_dnPX "/$body.$_path/]
153
+ // TESTRESPONSE[s/"7bmMXyWCRs-TuPfGJJ_yMw "/$body.$_path/]
129
154
// TESTRESPONSE[s/"node-0"/$body.$_path/]
130
155
// TESTRESPONSE[s/"hoXMLZB0RWKfR9UPPUCxXX"/$body.$_path/]
131
156
// TESTRESPONSE[s/"127.0.0.1:9300"/$body.$_path/]
0 commit comments