Skip to content

Make logstash/node_stats metricset work for Stack Monitoring without xpack.enabled flag#21546

Merged
sayden merged 19 commits intoelastic:feature-stack-monitoring-mb-ecsfrom
sayden:feature/mb/logstash/node_stats_xpack_flag
Dec 15, 2020
Merged

Make logstash/node_stats metricset work for Stack Monitoring without xpack.enabled flag#21546
sayden merged 19 commits intoelastic:feature-stack-monitoring-mb-ecsfrom
sayden:feature/mb/logstash/node_stats_xpack_flag

Conversation

@sayden
Copy link
Copy Markdown
Contributor

@sayden sayden commented Oct 5, 2020

Ready to test

@sayden sayden added Metricbeat Metricbeat Feature:Stack Monitoring Team:Services (Deprecated) Label for the former Integrations-Services team labels Oct 5, 2020
@sayden sayden self-assigned this Oct 5, 2020
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/stack-monitoring (Stack monitoring)

@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/integrations-services (Team:Services)

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Oct 5, 2020
@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Oct 5, 2020

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #21546 updated

  • Start Time: 2020-12-15T16:35:40.600+0000

  • Duration: 66 min 38 sec

Test stats 🧪

Test Results
Failed 0
Passed 2277
Skipped 524
Total 2801

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 2277
Skipped 524
Total 2801

@chrisronline
Copy link
Copy Markdown
Contributor

I'm seeing this error when running this:

2020-10-23T14:14:48.531-0400 ERROR [publisher_pipeline_output] pipeline/output.go:154 Failed to connect to backoff(elasticsearch(https://localhost:9200)): Connection marked as failed because the onConnect callback failed: error loading template: could not load template. Elasticsearch returned: couldn't load template: 400 Bad Request: {"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Invalid [path] value [logstash.node.stats.events.duration_in_millis] for field alias [logstash.stats.events.duration.ms]: an alias must refer to an existing field in the mappings."}],"type":"mapper_parsing_exception","reason":"Invalid [path] value [logstash.node.stats.events.duration_in_millis] for field alias [logstash.stats.events.duration.ms]: an alias must refer to an existing field in the mappings."},"status":400}. Response body: {"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Invalid [path] value [logstash.node.stats.events.duration_in_millis] for field alias [logstash.stats.events.duration.ms]: an alias must refer to an existing field in the mappings."}],"type":"mapper_parsing_exception","reason":"Invalid [path] value [logstash.node.stats.events.duration_in_millis] for field alias [logstash.stats.events.duration.ms]: an alias must refer to an existing field in the mappings."},"status":400}.

Copy link
Copy Markdown
Contributor

@chrisronline chrisronline left a comment

Choose a reason for hiding this comment

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

LGTM! UI loads up as expected!

@sayden sayden force-pushed the feature/mb/logstash/node_stats_xpack_flag branch from 4ebe049 to d7e5860 Compare December 9, 2020 16:21
@sayden sayden requested a review from ycombinator December 15, 2020 10:17

func (m *MetricSet) init() error {
if m.XPack {
return m.CheckPipelineGraphAPIsAvailable()
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.

I think we will need to call m.CheckPipelineGraphAPIsAvailable() every time now, right, since we plan to always call the Logstash Pipeline Graph APIs in the Fetch() method, no?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I removed it because I didn't see any call to this method anywhere, haha. Anyways I guess it should be included so I added it back into the Fetch call directly.

Copy link
Copy Markdown
Contributor

@ycombinator ycombinator left a comment

Choose a reason for hiding this comment

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

This is looking mostly good. Just left one comment/question.

Copy link
Copy Markdown
Contributor

@ycombinator ycombinator left a comment

Choose a reason for hiding this comment

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

I left a comment/question a few minutes ago. Besides that, everything in this PR LGTM. So I'm approving it for merge now. Feel free to address my comment before merging or after, in the feature branch, as you prefer.

@sayden sayden merged commit 11f8738 into elastic:feature-stack-monitoring-mb-ecs Dec 15, 2020
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:Stack Monitoring Metricbeat Metricbeat Team:Services (Deprecated) Label for the former Integrations-Services team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants