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

Support multi-target #143

Closed
wants to merge 1 commit into from

Conversation

mateusduboli
Copy link
Contributor

Adds support for multi-target pattern. Refers to #130

Discussion points:

  • Should we always enable the scrapper by default? Is this possibly a security problem?

@mateusduboli mateusduboli force-pushed the add-multi-target branch 2 times, most recently from 9a61dc0 to 3654d56 Compare September 19, 2022 14:22
@mateusduboli
Copy link
Contributor Author

@grobie

@mateusduboli
Copy link
Contributor Author

@roidelapluie can you help us with this PR?

@grobie
Copy link
Member

grobie commented Oct 7, 2022

Apologies for the radio silence @mateusduboli.

@SuperQ @roidelapluie So I see that the project's stance on multi-targets has changed? I found @SuperQ's comment from February suggesting exactly this change #111 (comment).

The change looks good to me in general. I believe users should explicitly opt-in into the new behavior though by setting a flag. It might be unexpected and even harmful for users upgrading to the newest version if the exporter can be suddenly used to make requests against arbitrary endpoints.

@SuperQ
Copy link
Member

SuperQ commented Oct 7, 2022

Yes, we've been adding multi-target exporter scrape support across the ecosystem to better support hosted/blackbox managed instances like Elasticache.

@SuperQ
Copy link
Member

SuperQ commented Oct 7, 2022

I don't think we've added any blockers / flags to any other exporter that disable multi-target by default. We typically recommend users that care implement auth/tls.

@mateusduboli
Copy link
Contributor Author

Hi @grobie and @SuperQ, anything else that we can do to get this merged?

Copy link

@maxbrunet maxbrunet left a comment

Choose a reason for hiding this comment

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

Found a recurring typo: s/scrapp/scrap/ 🙂

scrape / scraping: copy (data) from a website using a computer program.

scrap / scrapping: discard or remove from service (a retired, old, or inoperative vehicle, vessel, or machine), especially so as to convert it to scrap metal.

scraper/scraper.go Show resolved Hide resolved
scraper/scraper.go Show resolved Hide resolved
cmd/memcached_exporter/main_test.go Show resolved Hide resolved
@mateusduboli
Copy link
Contributor Author

@SuperQ @maxbrunet
Any updates here?

Copy link
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

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

Minor nits.

Also, would you please update the README with documentation on how it's intended to work. I get it, but it would be nice to have docs right away.

scraper/scraper.go Outdated Show resolved Hide resolved
scraper/scraper_test.go Outdated Show resolved Hide resolved
Signed-off-by: Mateus Dubiela Oliveira <mateus.dubiela@nubank.com.br>
@mateusduboli
Copy link
Contributor Author

@SuperQ done ✅

@pplu
Copy link

pplu commented Dec 29, 2022

Can this get merged and released? It is a super-useful feature, and it looks like everything that was asked for has been done.

@mateusduboli
Copy link
Contributor Author

@SuperQ @grobie any updates?

Copy link
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

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

Please follow Prometheus best practices.

logger: logger,
timeout: timeout,
scrapeCount: prometheus.NewCounter(prometheus.CounterOpts{
Name: "memcached_exporter_scrape_count",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Name: "memcached_exporter_scrape_count",
Name: "memcached_exporter_scrapes_total",

Help: "Count of memcached exporter scapes.",
}),
scrapeErrors: prometheus.NewCounter(prometheus.CounterOpts{
Name: "memcached_exporter_scrape_error_count",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Name: "memcached_exporter_scrape_error_count",
Name: "memcached_exporter_scrape_errors_total",

@chewrocca
Copy link

This feature seems helpful, but it has been open for several months without recent activity or approval. Is there a specific reason for the delay? Could someone help resolve any conflicts and get this merged?

@matthiasr
Copy link
Contributor

We wrapped this up in #173.

@matthiasr matthiasr closed this Jun 2, 2023
@SuperQ
Copy link
Member

SuperQ commented Jun 2, 2023

Completed in #173

@matthiasr
Copy link
Contributor

Thank you for your contribution!

matthiasr added a commit that referenced this pull request Jun 2, 2023
with changelog for #143 / #173.

Signed-off-by: Matthias Rampke <matthias@prometheus.io>
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.

7 participants