Skip to content
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

feat: add indexing pressure #727

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

mingregister
Copy link

So far, I have not seen the indexing_pressure metrics in the elasticsearch_exporter, so i add it. #638

黄振明 added 2 commits June 9, 2023 12:45
Signed-off-by: 黄振明 <huangzhenming@qunjielong.com>
Signed-off-by: 黄振明 <huangzhenming@qunjielong.com>
黄振明 added 3 commits June 9, 2023 12:52
Signed-off-by: 黄振明 <huangzhenming@qunjielong.com>
Signed-off-by: 黄振明 <huangzhenming@qunjielong.com>
Signed-off-by: 黄振明 <huangzhenming@qunjielong.com>
@mingregister
Copy link
Author

@SuperQ hello, Could you help to review this pr. I use this pr in our production, and everything is fine,

  • elasticsearch7.10 collects all metrics successfully
  • elasticsearch7.7 does not have the indexing_pressure metrics but everything else works fine except can not collect the indexing_pressue metric.

Please let me know if you have any questions or concerns.

@SuperQ SuperQ requested a review from sysadmind June 25, 2023 09:39
{
Type: prometheus.GaugeValue,
Desc: prometheus.NewDesc(
prometheus.BuildFQName(namespace, "indexing_pressure", "current_combined_coordinating_and_primary_in_bytes"),
Copy link
Contributor

@SuperQ SuperQ Jun 27, 2023

Choose a reason for hiding this comment

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

This seems like a composite metric that is the sum of the current_coordinating_in_bytes and current_primary_in_bytes metrics.

We typically drop these things to save space and cardinality when you can use foo + bar in PromQL.

Copy link
Author

Choose a reason for hiding this comment

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

thanks for your review. After I check the document, current_combined_coordinating_and_primary_in_bytes or total_combined_coordinating_and_primary_in_bytes is not equal to coordinating + primary. So maybe we should keep this? Here is the document:

# https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html#cluster-nodes-stats-api-response-body-indexing-pressure
combined_coordinating_and_primary_in_bytes: 
(integer) Memory consumed, in bytes, by indexing requests in the coordinating or primary stage. This value is not the sum of coordinating and primary as a node can reuse the coordinating memory if the primary stage is executed locally.

Please let me known if you have any questions or concern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants