Page MenuHomePhabricator

Create api health point for monitoring
Closed, ResolvedPublic

Description

Quarry health point at /.health/summary/v1/<int:minutes> that indicates the number of created queries, revisions, runs by state in the last <minutes>.

Description for Google-Code-in-2018

Python skills are needed to work on Flask and SQLAlchemy frameworks.

Quarry is a simple web interface that can be used to execute queries on sql servers that contain Wikipedia data.

We want to develop the monitoring of this service, to be sure it works as excepted and to be notified if it doesn't. To get this the distant software that will perform the monitoring will in fact fetch on a regular basis a specific url, like /.health/summary/v1/<int:minutes>, where <int:minutes> is the period he want to get statistics for. This endpoint will return :

-number of created new queries
-number of created new revisions (that's a query SQL code version linked to a query ID)
-number of last query runs, grouped by state (successful, failed, ...)

So this task is to create this new api endpoint to these return computed values probably generated using SQLAlchemy functions.

Patch in gerrit in analytics/quarry/web repo wanted.

Event Timeline

Framawiki updated the task description. (Show Details)Nov 16 2018, 7:20 PM
rafidaslam added a subscriber: rafidaslam.

I'll work on this

Change 474532 had a related patch set uploaded (by Rafidaslam; owner: Rafid Aslam):
[analytics/quarry/web@master] Add "/health/summary/v1/<int:minutes>" API endpoint

https://gerrit.wikimedia.org/r/474532

Framawiki updated the task description. (Show Details)Nov 18 2018, 9:04 PM

Change 474532 merged by jenkins-bot:
[analytics/quarry/web@master] health.py: initializes health endpoint

https://gerrit.wikimedia.org/r/474532

https://quarry.wmflabs.org/.health/summary/v1/60 is happily working, I think we can close this task. Thanks @rafidaslam :)

Framawiki closed this task as Resolved.May 11 2019, 5:52 PM