Stats API: implement the "kibana status" spec from the Monitoring data model for stats#20577
Merged
tsullivan merged 46 commits intoelastic:masterfrom Jul 18, 2018
Merged
Conversation
4 tasks
7395c8c to
ba1d0e5
Compare
tsullivan
commented
Jul 10, 2018
Member
Author
There was a problem hiding this comment.
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
tsullivan
commented
Jul 12, 2018
| ]; | ||
| }; | ||
|
|
||
| // TODO use jest snapshotting |
Member
Author
There was a problem hiding this comment.
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.
Member
Author
|
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. |
Member
Author
|
jenkins, test this |
Member
Author
|
Had a failed build from: |
Contributor
💚 Build Succeeded |
Member
Author
|
Thanks 1,000,000 @ycombinator and @chrisronline for helping me review and test this! |
1 task
Member
Author
|
6.x/6.4.0: #20956 |
Contributor
💚 Build Succeeded |
tsullivan
added a commit
to tsullivan/kibana
that referenced
this pull request
Jul 19, 2018
…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
tsullivan
added a commit
that referenced
this pull request
Jul 19, 2018
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #20393
/api/stats?extended=trueAPI endpoint returns data in the same model as thekibana_statsdocuments in the.monitoring-kibana-*indices/api/statusAPI endpoint, which will be marked as "deprecated" in 7.0 and removed in 8.0statsAPI needs data in a different format than the shared modules are providing, the workarounds to fix the format are done in the olderstatusAPI 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: