Prometheus monitoring for GitLab Pages
This starts of the prometheus monitoring for GitLab Pages, and fixes #42 (closed)
Point to check:
- Are the metric names good, keeping Prometheus' conventions in mind?
- Golang, general style etc
- Shouldn't I do some voodoo magic to import this in the library?
Merge request reports
Activity
TODO:
- Add
gitlab_pages_last_update_seconds
-- Seconds since 1970 to last update - Add tests
/cc @nick.thomas @ayufan
- Add
- Resolved by Zeger-Jan van de Weg
- Resolved by Zeger-Jan van de Weg
- Resolved by Zeger-Jan van de Weg
Example metrics:
# HELP gitlab_pages_domains_served_total The total number of sites served by this Pages app # TYPE gitlab_pages_domains_served_total gauge gitlab_pages_domains_served_total 7 # HELP gitlab_pages_domains_updated_total The total number of site updates processed since daemon start # TYPE gitlab_pages_domains_updated_total counter gitlab_pages_domains_updated_total 1 # HELP gitlab_pages_http_requests_total Total number of HTTP requests done serving # TYPE gitlab_pages_http_requests_total counter gitlab_pages_http_requests_total{code="302",method="GET"} 1 gitlab_pages_http_requests_total{code="404",method="GET"} 2 # HELP gitlab_pages_http_sessions_active The number of HTTP requests currently being processed # TYPE gitlab_pages_http_sessions_active gauge gitlab_pages_http_sessions_active 0 # HELP gitlab_pages_last_domain_update_seconds Seconds since Unix Epoc to the last update for all domains served # TYPE gitlab_pages_last_domain_update_seconds counter gitlab_pages_last_domain_update_seconds 1.485509286e+09
mentioned in issue gitlab-com/infrastructure#1071 (closed)
- Resolved by Zeger-Jan van de Weg
- Resolved by Nick Thomas
assigned to @nick.thomas
- Resolved by Zeger-Jan van de Weg
- Resolved by Zeger-Jan van de Weg
- Resolved by Zeger-Jan van de Weg
- Resolved by Nick Thomas
- Resolved by Zeger-Jan van de Weg
- Resolved by Zeger-Jan van de Weg
- Resolved by Zeger-Jan van de Weg
- Resolved by Zeger-Jan van de Weg
- Resolved by Nick Thomas
- Resolved by Zeger-Jan van de Weg
- Resolved by Nick Thomas
- Resolved by Zeger-Jan van de Weg
added 2 commits
- 1c53d534 - Reduce the cyclomatic complexity of appMain()
- 45f8c120 - Revert changes to handling sockets in appMain
- Resolved by Nick Thomas
@zj with a few minor changes and a rebase / squash to get rid of the back-and-forth in the commits, I think this can be merged. Good work
👍 @nick.thomas Rebased, left with 2 commits. Let me know what you think
mentioned in commit eae671b2
@zj is this also configurable in Omnibus or not yet? Thanks :)
@zj Do you have some pointers for me what too look at in this MR? Diff is 'uge.
Sorry about that, thats true. Didn't realise that. Anyway, in
main.go
I've declared a new flag to pass an address to the daemon to expose the metrics. Found hereAnyway, I found already how omnibus tries to handle these flags so I might just give this a whirl myself monday. :)
For cross linking: omnibus-gitlab!1300 (merged)