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

Add Beats module and input info to Telemetry #20648

Merged
merged 8 commits into from
Jul 16, 2018

Conversation

tsullivan
Copy link
Member

Carry on from #18833

(No release notes needd)

This adds the following info to Beats telemetry data payload:

input: {
  count: <Number>,
  names: [ <String>, ... ], # Example: `stdin`
},
module: {
  count: <Number>,
  names: [ <String>, ... ], # Example: `system`, `elasticsearch`
},

To test:

  1. Run some type of Beat with a module configured, or run Filebeat with an input configured
  2. Check for the Beat info to appear in Monitoring
  3. Run the Telemetry API debug script to ensure Beats data appears in the payload:
    node scripts/api_debug.js telemetry --host=https://virtual-spice:5691 | jq '.[].stack_stats | { beats: .beats }'
    

This may be blocked by elastic/beats#7562.

  • This PR does not include any changes to accommodate the schema change.
  • The mock data in the test fixtures also uses the 6.3 schema.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@ruflin
Copy link
Contributor

ruflin commented Jul 11, 2018

I assume the schema changes you mention above are the ones needed in Elasticsearch? Or are there also schema changes needed in KB? I will take for of the changes in ES.

Copy link
Contributor

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

Change looks good to me. Do you plan to add the host info like platform in a follow up PR? See here for an example: elastic/beats#7537

Unfortunately the queue type PR is still open.

@tsullivan tsullivan requested a review from ycombinator July 11, 2018 22:54
clusterModuleSets[clusterUuid] = new Set();
}

// beats_stats
Copy link
Contributor

@ycombinator ycombinator Jul 12, 2018

Choose a reason for hiding this comment

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

Minor: I see you have this section of code here for processing beats_stats results and further down a section of code for processing beats_state results. I think it might be a bit more readable if you extracted each section into its own respective function, something like processBeatsStatsResults and processBeatsStateResults, and then call those from here.

@tsullivan
Copy link
Member Author

Do you plan to add the host info like platform in a follow up PR? See here for an example: elastic/beats#7537

Hi, unfortunately I didn't realize those parts were also part of the scope of this work, and the queue name which is still an open PR would put me in a hanging state. If we need that in 6.4 as well, I will try to find someone who can take it on.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@ruflin
Copy link
Contributor

ruflin commented Jul 16, 2018

@tsullivan With input and module we definitively have the 2 most important ones. host / platform would be great to have. Let's skip queue for now.

@tsullivan
Copy link
Member Author

unrelated selenium failure

jenkins test this

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@tsullivan tsullivan merged commit 8ba773a into elastic:master Jul 16, 2018
@tsullivan tsullivan deleted the telemetry/add-beats-state branch July 16, 2018 19:57
tsullivan added a commit to tsullivan/kibana that referenced this pull request Jul 16, 2018
* fix metrics field name (stats)

* add state info

* add module name count

* use a set for the unique hosts instead of a map

* fix getting beats_state info

* fix unit test

* processBeatsStatsResults and processBeatsStateResults
@tsullivan
Copy link
Member Author

6.x/6.4.0: #20856

tsullivan added a commit that referenced this pull request Jul 16, 2018
* fix metrics field name (stats)

* add state info

* add module name count

* use a set for the unique hosts instead of a map

* fix getting beats_state info

* fix unit test

* processBeatsStatsResults and processBeatsStateResults
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Telemetry review v6.4.0 v7.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants