diff options
author | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-01-26 00:11:28 +0300 |
---|---|---|
committer | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-02-02 23:52:30 +0300 |
commit | 1e31fac9d8a60efb3b2b536a46e059f286ab62c0 (patch) | |
tree | 3d751e07782a5e9489a46d6f4c6a96ea34cb08e6 /main.go | |
parent | bc4aa822bff4ec2a3a3fdb1daa915782331ad08a (diff) |
Prometheus monitoring for GitLab Pages
This starts of the prometheus monitoring for GitLab Pages, and
resolves gitlab-org/gitlab-pages#42
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?
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -27,6 +27,7 @@ func appMain() { var useHTTP2 = flag.Bool("use-http2", true, "Enable HTTP2 support") var pagesRoot = flag.String("pages-root", "shared/pages", "The directory where pages are stored") var pagesDomain = flag.String("pages-domain", "gitlab-example.com", "The domain to serve static pages") + var metricsAdress = flag.String("metrics-address", "", "The adress to server metrics to") var daemonUID = flag.Uint("daemon-uid", 0, "Drop privileges to this user") var daemonGID = flag.Uint("daemon-gid", 0, "Drop privileges to this group") @@ -46,6 +47,7 @@ func appMain() { config.Domain = strings.ToLower(*pagesDomain) config.RedirectHTTP = *redirectHTTP config.HTTP2 = *useHTTP2 + config.MetricsAddress = *metricsAdress if *pagesRootCert != "" { config.RootCertificate = readFile(*pagesRootCert) |