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

roachtest: scrape prometheus metrics on demand #66657

Merged
merged 1 commit into from
Jun 23, 2021

Conversation

otan
Copy link
Contributor

@otan otan commented Jun 21, 2021

This commit adds a prometheus scraper on TPC-C workloads and scrapes
their metrics. This is configured by setting it in the tpccOptions
setup. It is currently set up on the multi-region chaos tests.

At the end of the run, we take a snapshot of the metrics of the workload
and store it as an artifact, which can be used later.

Release note: None

@otan otan requested review from tbg and a team June 21, 2021 03:00
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@otan otan force-pushed the prometheus_on_demand branch 2 times, most recently from 9bff031 to 07146f0 Compare June 21, 2021 04:04
pkg/cmd/roachtest/prometheus.go Outdated Show resolved Hide resolved
pkg/cmd/roachtest/prometheus.go Outdated Show resolved Hide resolved
pkg/cmd/roachtest/prometheus.go Outdated Show resolved Hide resolved
pkg/cmd/roachtest/prometheus.go Outdated Show resolved Hide resolved
pkg/cmd/roachtest/cluster_interface.go Outdated Show resolved Hide resolved
pkg/cmd/roachtest/cluster_interface_mock_test.go Outdated Show resolved Hide resolved
pkg/cmd/roachtest/prometheus.go Outdated Show resolved Hide resolved
pkg/cmd/roachtest/prometheus.go Outdated Show resolved Hide resolved
pkg/cmd/roachtest/prometheus_test.go Outdated Show resolved Hide resolved
pkg/cmd/roachtest/tpcc.go Outdated Show resolved Hide resolved
pkg/cmd/roachtest/prometheus.go Outdated Show resolved Hide resolved
pkg/cmd/roachtest/prometheus.go Outdated Show resolved Hide resolved
@otan otan force-pushed the prometheus_on_demand branch from 07146f0 to 0909766 Compare June 22, 2021 03:44
@otan otan requested a review from tbg June 22, 2021 03:45
@otan otan force-pushed the prometheus_on_demand branch 2 times, most recently from c8b2973 to bee464e Compare June 22, 2021 08:46
@otan otan requested a review from stevendanna June 22, 2021 20:04
Copy link
Collaborator

@stevendanna stevendanna left a comment

Choose a reason for hiding this comment

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

Left a minor comment or two, but I leave them to your discretion.

Thanks for addressing the previous comments

pkg/cmd/roachtest/tpcc.go Outdated Show resolved Hide resolved

// MakeInsecureCockroachScrapeConfig creates scrape configs for the given
// cockroach nodes. All nodes are assumed to be insecure and running on
// port 26258.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe there is a way to get the port via roachprod if this function were to take a *cluser as well. But, I think that will com naturally if we decide to follow-up with local-mode support.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mmm, I'll defer to that ;)

This commit adds a prometheus scraper on TPC-C workloads and scrapes
their metrics. This is configured by setting it in the tpccOptions
setup. It is currently set up on the multi-region chaos tests.

At the end of the run, we take a snapshot of the metrics of the workload
and store it as an artifact, which can be used later.

Release note: None
@otan otan force-pushed the prometheus_on_demand branch from bee464e to f84cda0 Compare June 23, 2021 03:57
@otan
Copy link
Contributor Author

otan commented Jun 23, 2021

thanks!

bors r=stevendanna

@craig
Copy link
Contributor

craig bot commented Jun 23, 2021

Build succeeded:

@craig craig bot merged commit c29c2fe into cockroachdb:master Jun 23, 2021
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.

4 participants