Skip to content

[/api/stats] Add documentation + small improvement#79330

Merged
afharo merged 4 commits intoelastic:masterfrom
afharo:usage_collection/routes/stats
Oct 5, 2020
Merged

[/api/stats] Add documentation + small improvement#79330
afharo merged 4 commits intoelastic:masterfrom
afharo:usage_collection/routes/stats

Conversation

@afharo
Copy link
Copy Markdown
Member

@afharo afharo commented Oct 2, 2020

Summary

  • Add some dev documentation about the /api/stats endpoint
  • Small improvement to avoid checking if all the collectors are ready if we are not going to use them. It should alleviate a bit of the load in Kibana. Especially on the cases when Metricbeat is polling every 10s with exclude_usage=true.

Resolves #75273.

Checklist

  • Documentation was added for features that require explanation or tutorials

For maintainers

@@ -152,9 +154,8 @@ export function registerStatsRoute({
}
}

// Guranteed to resolve immediately due to replay effect on getOpsMetrics$
// eslint-disable-next-line @typescript-eslint/naming-convention
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, OCD trying to avoid as many eslint-disable as possible 😅

@afharo afharo marked this pull request as ready for review October 2, 2020 19:34
@afharo afharo requested a review from a team as a code owner October 2, 2020 19:34
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-telemetry (Team:KibanaTelemetry)

Copy link
Copy Markdown
Contributor

@TinaHeiligers TinaHeiligers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me!
I added a couple of comments but these are only suggestions.

Thank you for doing this!

@@ -0,0 +1,20 @@
# `/api/stats`

This API returns the metrics for the Kibana server and usage stats. It allows the [Metricbeat Kibana module](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-module-kibana.html) to collect the [stats metricset](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-metricset-kibana-stats.html).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs on the kibana stats metricset don't actually give anything useful. Having the link is great though and hopefully we can get a bit more on that page.

@Bamieh
Copy link
Copy Markdown
Contributor

Bamieh commented Oct 5, 2020

@elasticmachine merge upstream

kibanamachine and others added 2 commits October 5, 2020 06:06
Co-authored-by: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>
Copy link
Copy Markdown
Contributor

@Bamieh Bamieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

distributable file count

id before after diff
default 47085 47087 +2
oss 28595 28597 +2

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@afharo afharo merged commit 43493bb into elastic:master Oct 5, 2020
@afharo afharo deleted the usage_collection/routes/stats branch October 5, 2020 11:40
afharo added a commit that referenced this pull request Oct 5, 2020
…79440)

Co-authored-by: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Ahmad Bamieh <ahmadbamieh@gmail.com>
jloleysens added a commit to jloleysens/kibana that referenced this pull request Oct 5, 2020
…nes/fix-description-field

* 'master' of github.com:elastic/kibana:
  A11y tests for user page (elastic#79199)
  [Ingest Pipelines] Processors editor a11y focus states (elastic#79122)
  [Ingest pipelines] Clean up component integration tests (elastic#78838)
  Drilldowns in examples (elastic#75640)
  Storybook and Jest cleanup (elastic#79305)
  adds EQL sequence rule test (elastic#79287)
  PR template a11y checklist item improvement (elastic#79243)
  [Security Solution] Adding tests for dns pipeline in the endpoint package (elastic#79177)
  [ML] Only adjust the bounds of SMV if annotations are visible (elastic#79210)
  global search to ts refs (elastic#79446)
  [Index management] Update TemplateDeserialized interface (elastic#78913)
  [Telemetry] server fetcher check all collectors ready before sending (elastic#79398)
  [Mappings editor] Fix app crash when selecting "other" field type (elastic#79434)
  [`/api/stats`] Add documentation + small improvement (elastic#79330)
  [Discover] "View surrounding documents" encodes spaces in filters (elastic#79283)
  [Lens] refactor DimensionContainer and fix flyout bug (elastic#79277)

# Conflicts:
#	x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/pipeline_processors_editor_item/inline_text_input.tsx
#	x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/processors_tree/components/private_tree.tsx
@lukeelmers lukeelmers added the Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// label Oct 1, 2021
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-core (Team:Core)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:Telemetry release_note:skip Skip the PR/issue when compiling release notes Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// v7.10.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve documentation about /api/stats API

6 participants