Skip to content

Conversation

@dpifke
Copy link

@dpifke dpifke commented Aug 16, 2020

No description provided.

@glensc
Copy link
Contributor

glensc commented Aug 17, 2020

@dpifke please add section to README how this is supposed to be used.

also, perhaps the endpoint should be protected with a token? is that common in prometheus ecosystem that the resources it polls are public?

example: #289

@dpifke
Copy link
Author

dpifke commented Aug 18, 2020

@dpifke please add section to README how this is supposed to be used.

Partially done. I'll add a link to an example Grafana dashboard for https://performance.wikimedia.org/xhgui once I've made one.

also, perhaps the endpoint should be protected with a token? is that common in prometheus ecosystem that the resources it polls are public?

Generally, Prometheus endpoints don't require any authentication. The information being exposed isn't anything which couldn't already be scraped from the index page.

@glensc
Copy link
Contributor

glensc commented Aug 19, 2020

@dpifke you need to rebase against merge conflicts from the upstream

This adds a /metrics endpoint, to export stats about the size of the
database table.  (This is currently PDO-only.)

Bug: T256039
Change-Id: I5f83c6fe648db6065a46ef51a110fe4278bfaeaf
@Krinkle
Copy link
Contributor

Krinkle commented Aug 20, 2020

These queries aren't ideal to expose publicly. There is precedent for this with the /import and /delete endpoints which are much more powerful in comparison and also don't require any authentication.

We currently leave it to site-admins to stub these out at the web server level. I suppose we could do the same here, so perhaps nothing is required to change here but just wanted to point it out in case @glensc has thoughts on that. See also #308.

@glensc
Copy link
Contributor

glensc commented Aug 24, 2020

merged as 4b25fc6, could not figure out how to push to developer branch (allow changes from maintainer was not enabled?)

@glensc glensc closed this Aug 24, 2020
@glensc
Copy link
Contributor

glensc commented Sep 4, 2020

Is there a limitation of why this can't be implemented with MongoDB? or you were just not interested in implementing it yourself?

ps: I've created an issue to track differences, would be nice to have your input, as you use PDO: #320

@dpifke
Copy link
Author

dpifke commented Sep 8, 2020

Nothing PDO-specific, I just didn't have a recent MongoDB instance set up with which to try to implement it. (MongoDB is infeasible to run at Wikimedia due to non-OSI-approved license and it having been removed from Debian.) Most of the functionality that's missing w/ the PDO backend is stuff we weren't really using; I'll add some notes to the linked task as to what we've identified. Our goal is to eventually contribute patches to bring it up to par.

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