-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stats API: implement the "kibana status" spec from the Monitoring data model for stats #20577
Conversation
7395c8c
to
ba1d0e5
Compare
}, | ||
response_times: { | ||
// TODO: rename to use `_ms` suffix per beats naming conventions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
collectorSet.toApiFieldNames()
takes care of this TODO
503ac41
to
ca5f2fa
Compare
ca5f2fa
to
acba93c
Compare
- constantly accumulating stats over time does not align with the existing behavior, which is to reset the stats to 0 whenever they are pulled
- change the signature of sourceKibana
- to not clear the data when pulling via the api - fetching is a read-only thing
@@ -69,11 +69,13 @@ const getInitial = () => { | |||
]; | |||
}; | |||
|
|||
// TODO use jest snapshotting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This TODO will not be done in this PR to avoid extra lines of code change. This PR does change this from a Mocha test to a Jest test though.
CI passing and going green looks like a fluke. Jenkins has downtime right now. I'll run it when I hear that it's ready. |
jenkins, test this |
Had a failed build from:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
💚 Build Succeeded |
Thanks 1,000,000 @ycombinator and @chrisronline for helping me review and test this! |
6.x/6.4.0: #20956 |
💚 Build Succeeded |
…a model for stats (elastic#20577) * [Stats API] Set API field names per spec * fix jest tests * fix api integration test * trash the original metrics collector - constantly accumulating stats over time does not align with the existing behavior, which is to reset the stats to 0 whenever they are pulled * move some logic out of the collector types combiner into inline - change the signature of sourceKibana * Make a new stats collector for the API - to not clear the data when pulling via the api - fetching is a read-only thing * isolate data transforms for api data and upload data * no static methods * remove external in bytes * remove the _stats prefix for kibana and reporting * update jest test snapshot * fix collector_types_combiner test * fix usage api * add test suite todo comment * reduce some loc change * roll back mysterious change * reduce some more loc change * comment correction * reduce more loc change * whitespace * comment question * fix cluster_uuid * fix stats integration test * fix bulk uploader test, combineTypes is no longer external * very important comments about the current nature of stats represented and long-term goals * add stats api tests with/without authentication * fix more fields to match data model * fix more tests * fix jest test * remove TODO * remove sockets * use snake_case for api field names * restore accidental removal + copy/paste error * sourceKibana -> getKibanaInfoForStats * skip usage test on legacy endpoint * fix api tests * more comment * stop putting a field in that used to be omitted * fix the internal type to ID the usage data for bulk uploader * correct the kibana usage type value, which is shown as-is in the API * more fixes for the constants identifying collector types + test against duplicates * add a comment on a hack, and a whitespace fix
…a model for stats (#20577) (#20956) * [Stats API] Set API field names per spec * fix jest tests * fix api integration test * trash the original metrics collector - constantly accumulating stats over time does not align with the existing behavior, which is to reset the stats to 0 whenever they are pulled * move some logic out of the collector types combiner into inline - change the signature of sourceKibana * Make a new stats collector for the API - to not clear the data when pulling via the api - fetching is a read-only thing * isolate data transforms for api data and upload data * no static methods * remove external in bytes * remove the _stats prefix for kibana and reporting * update jest test snapshot * fix collector_types_combiner test * fix usage api * add test suite todo comment * reduce some loc change * roll back mysterious change * reduce some more loc change * comment correction * reduce more loc change * whitespace * comment question * fix cluster_uuid * fix stats integration test * fix bulk uploader test, combineTypes is no longer external * very important comments about the current nature of stats represented and long-term goals * add stats api tests with/without authentication * fix more fields to match data model * fix more tests * fix jest test * remove TODO * remove sockets * use snake_case for api field names * restore accidental removal + copy/paste error * sourceKibana -> getKibanaInfoForStats * skip usage test on legacy endpoint * fix api tests * more comment * stop putting a field in that used to be omitted * fix the internal type to ID the usage data for bulk uploader * correct the kibana usage type value, which is shown as-is in the API * more fixes for the constants identifying collector types + test against duplicates * add a comment on a hack, and a whitespace fix
Addresses #20393
/api/stats?extended=true
API endpoint returns data in the same model as thekibana_stats
documents in the.monitoring-kibana-*
indices/api/status
API endpoint, which will be marked as "deprecated" in 7.0 and removed in 8.0stats
API needs data in a different format than the shared modules are providing, the workarounds to fix the format are done in the olderstatus
API code to continue legacy backwards compatibilityNo release notes yet, but there should documentation for this API in the next major version.
Usage:
Get Kibana server system status metrics:
Get Kibana server system status metrics, along with the Elasticsearch clusterUuid, and plugin usage metrics. This will require authentication if Elasticsearch requires it: