Skip to content

Add module for cockroachdb#12467

Merged
jsoriano merged 18 commits intoelastic:masterfrom
jsoriano:cockroachdb-module
Jun 28, 2019
Merged

Add module for cockroachdb#12467
jsoriano merged 18 commits intoelastic:masterfrom
jsoriano:cockroachdb-module

Conversation

@jsoriano
Copy link
Copy Markdown
Member

@jsoriano jsoriano commented Jun 6, 2019

Depends on #12465, module implemented as light module (#12270).

Collect metrics from cochroachdb, from its Prometheus endpoint.
All metrics are collected as they are and stored under prometheus.metrics.

An overview dashboard is added:
Captura de pantalla de 2019-06-25 21-18-14

Pending:

@jsoriano jsoriano added in progress Pull request is currently in progress. module Metricbeat Metricbeat [zube]: In Progress Team:Integrations Label for the Integrations team labels Jun 6, 2019
@jsoriano jsoriano self-assigned this Jun 6, 2019
@jsoriano jsoriano force-pushed the cockroachdb-module branch from 716800b to 975ec8f Compare June 6, 2019 15:46
@exekias
Copy link
Copy Markdown
Contributor

exekias commented Jun 6, 2019

I see the pending point of fields.yml. This one is interesting, as already present Prometheus fields.yml gives us the right mapping already, still, there are no docs for the fields that we will get from the module. Is that why it's on the list?

@jsoriano
Copy link
Copy Markdown
Member Author

jsoriano commented Jun 6, 2019

I see the pending point of fields.yml. This one is interesting, as already present Prometheus fields.yml gives us the right mapping already, still, there are no docs for the fields that we will get from the module. Is that why it's on the list?

Yeah, I'd like to explore the possibility of getting the documentation for these fields automatically. If not it will require at least an empty fields.yml to pass our tests (or we have to change the tests).

Comment thread x-pack/metricbeat/module/cockroachdb/status/manifest.yml
@ruflin
Copy link
Copy Markdown
Contributor

ruflin commented Jun 7, 2019

@jsoriano Is there a way to also have generated files for these light modules? This would be nice for testing, docs but also for us to see if the generated events outside the prometheus metrics contain the correct values (for example event.dataset).

@jsoriano
Copy link
Copy Markdown
Member Author

jsoriano commented Jun 7, 2019

@jsoriano Is there a way to also have generated files for these light modules? This would be nice for testing, docs but also for us to see if the generated events outside the prometheus metrics contain the correct values (for example event.dataset).

I would use by now the tools we already have, it should be possible to use current prometheus helpers to test this module and generate the data.json file. I wrote a bit about testing and tooling in the proposal.

@ruflin
Copy link
Copy Markdown
Contributor

ruflin commented Jun 7, 2019

@jsoriano Would be great to have the generated file directly as part of this PR to make sure we generate the right data. Great if the current tools already work.

Comment thread x-pack/metricbeat/module/cockroachdb/status/status_test.go Outdated
@jsoriano jsoriano force-pushed the cockroachdb-module branch from c20452a to df3453a Compare June 7, 2019 18:18
@kaiyan-sheng
Copy link
Copy Markdown
Contributor

Just curious, when there are changes made in prometheus module, for example Pablo's le change on histogram, will tests fail in modules like cockroachdb?

@jsoriano
Copy link
Copy Markdown
Member Author

Just curious, when there are changes made in prometheus module, for example Pablo's le change on histogram, will tests fail in modules like cockroachdb?

Yes, tests will fail and affected files will need to be regenerated. This would be similar to other changes we do in the framework that require regenerating golden files.

Comment thread x-pack/metricbeat/module/cockroachdb/status/status_test.go Outdated
Comment thread dev-tools/cmd/module_include_list/module_include_list.go
@jsoriano
Copy link
Copy Markdown
Member Author

Dashboard added, screenshot uploaded to issue description.

@jsoriano
Copy link
Copy Markdown
Member Author

@exekias I have been playing with the possibility of generating fields.yml and docs for fields from the prometheus response, find here the changes over this PR: jsoriano#3
I think that using these fields for the mapping can be a bit excesive as they are hundreds of new fields and we already have the wildcards, but it could be nice for the documentation. But this would require more changes in the doc generator.
What do you think? Does it worth it? or I leave the fields undocumented by now?

@exekias
Copy link
Copy Markdown
Contributor

exekias commented Jun 27, 2019

Leaving them for another PR sounds reasonable to me, will comment there!

Is this one ready for review?

@jsoriano jsoriano marked this pull request as ready for review June 27, 2019 11:58
@jsoriano jsoriano requested review from a team as code owners June 27, 2019 11:58
@jsoriano
Copy link
Copy Markdown
Member Author

Opening for review, there are some things pending but they are mostly for tests and docs, we can do them in future PRs.

Comment thread CHANGELOG.next.asciidoc Outdated
@jsoriano jsoriano added [zube]: In Review review and removed [zube]: In Progress in progress Pull request is currently in progress. labels Jun 27, 2019
@jsoriano jsoriano merged commit a1e3539 into elastic:master Jun 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Metricbeat Metricbeat module review Team:Integrations Label for the Integrations team v7.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants