Commit Graph

90 Commits

Author SHA1 Message Date
Takuya Noguchi e8fee6b8f7 Fix misspellings in docs
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2019-02-25 10:31:35 +09:00
Evan Read eb86630959 Ensure all lists are surrounded by new lines
Markdown renderers find it easier to determine
where lists start and end when lists are surrounded
by new lines.

For consistency, also ensure entries in the list
are aligned when they span multipls lines.
2019-02-22 13:17:10 +00:00
Joshua Lambert c2f79ab2ad Update Prometheus documentation to indicate on by default 2019-02-19 17:13:25 -05:00
Ben Kochie e1ea47bb5c
Update metrics docs
Update the list of GitLab metrics to include the missing metric names.
2019-02-06 15:15:13 +01:00
Evan Read c2c2d04b3a Fix most instances of bare URLs in markdown 2019-01-24 06:52:33 +00:00
Takuya Noguchi 5fbaa5d7f7 Fix navigation style in docs
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2019-01-02 15:05:34 +09:00
Achilleas Pipinellis 1dc451a65d
Compress all images under doc/ 2018-12-18 11:09:04 +01:00
Evan Read 141d3eb997 Remove broken link and fix markdown formatting 2018-11-30 09:07:14 +10:00
Chenjerai Katanda 414ca3f7a8 Add instructions on how to add Prometheus as data source in Grafana 2018-11-23 16:14:12 +00:00
Achilleas Pipinellis a079bf7f9a Merge branch 'docs-update-perfbar-path' into 'master'
refresh the path to performance bar in admin settings with the up-to-date value

See merge request gitlab-org/gitlab-ce!23316
2018-11-23 14:40:24 +00:00
Alexander Tanayno 1d4f771ab2 update screenshot for request profiling token 2018-11-23 09:46:10 +00:00
Alexander Tanayno d2271ea983 update path to performance bar in admin settings 2018-11-23 09:33:39 +00:00
Marcia Ramos 53996b6484 Merge branch 'patch-28' into 'master'
Fix punctuation error

See merge request gitlab-org/gitlab-ce!22345
2018-11-16 12:44:31 +00:00
Achilleas Pipinellis c1f2fa8e99 Merge branch 'add-prometheus-external-docs' into 'master'
Add docs for setting up external Prometheus

Closes #40949 and #37255

See merge request gitlab-org/gitlab-ce!22831
2018-11-14 08:06:33 +00:00
Achilleas Pipinellis 12d98ec0f0
Properly indent codeblocks 2018-11-14 09:00:43 +01:00
Joshua Lambert c1ae5bc0bc Incorporate feedback 2018-11-13 15:44:31 -05:00
Joshua Lambert b83917f9cf Add additional documentation for external Prometheus server 2018-11-13 00:53:37 -05:00
Evan Read 20146580a0 Resolve Markdown ordered lists not conforming to styleguide 2018-11-13 10:53:38 +10:00
Evan Read 16cb782a79 Feature backported to CE in 11.5, not 10.7 2018-11-08 09:24:26 +10:00
Toon Claes 149b632722 Backport changes from EE
Now the files are identical again compared to EE.

These are backported from
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5050
2018-11-07 11:29:31 +01:00
Joshua Lambert b42234202b WIP update 2018-11-06 01:19:40 -05:00
Andrew Banchich 7067cbaef9 Fix punctuation error 2018-10-14 18:18:37 +00:00
Zeger-Jan van de Weg 30b4ce940d
Remove Git circuit breaker
Was introduced in the time that GitLab still used NFS, which is not
required anymore in most cases. By removing this, the API it calls will
return empty responses. This interface has to be removed in the next
major release, expected to be 12.0.
2018-10-10 09:08:18 +02:00
Ben Kochie e91c7469ad
Update example Prometheus queries
* Update metric names to match current release.
* Improve descriptions.
* Improve examples to show more query language functionality.

Memory:
* Show use of `or` function.
* Automatically select "MemAvailable" kernel metric if possible.

CPU:
* Show use of `avg without ...`.
* Show CPU utilization per node.

Network:
* Show use of `!=` label matching.
* Don't show "localhost" metrics.
2018-09-12 10:23:25 +02:00
Brett Walker b0be58a1b3 Resolve "CE documentation is not CommonMark compliant" 2018-09-06 16:52:18 +00:00
Achilleas Pipinellis 8dbcd11075
Compress all PNG images under doc/
The pngquant tool was used https://pngquant.org, and particularly, the
following command:

        /usr/bin/pngquant -f --skip-if-larger --ext .png --speed 1 image.png

Before: 47584K
After : 34924K
2018-08-27 15:52:03 +02:00
Lin Jen-Shin cf7cb4f6df Use title: "Unicorn Metrics available" as in EE 2018-07-18 17:22:51 +08:00
Stan Hu 7376ffc3a3 Add Prometheus metrics to track reCAPTCHA success/failures 2018-07-03 11:39:00 -07:00
Ben Kochie 78a9991543
Cleanup ruby sampler metrics
* Use a simple counter for sampler duration instead of a histogram.
* Use a counter to collect GC time.
* Remove unused objects metric.
* Cleanup metric names to match Prometheus conventions.
* Prefix generic GC stats with `gc_stat`.
* Include worker label on memory and file descriptor metrics.
2018-06-22 14:12:22 +02:00
Ben Bodenmiller ce7936176f cleanup Prometheus setup details 2018-05-29 08:29:19 +00:00
Joshua Lambert e4ebee4246 Remove experiemental notes from Prometheus docs 2018-05-21 10:48:59 +00:00
Pascal Borreli 12e3eff462 Fixed typos 2018-04-27 08:50:05 +00:00
Nathan Jones 33c163b347
Update index.md to describe leaving out the host in prometheus['listen_address'] to allow public access.
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-04-05 18:38:29 +02:00
Sean McGivern a200619d14 Show Ajax requests in performance bar
But first, rewrite the performance bar in Vue:

1. Remove the peek-host gem and replace it with existing code. This also allows
   us to include the host in the JSON response, rather than in the page HTML.
2. Leave the line profiler parts as here-be-dragons: nicer would be a separate
   endpoint for these, so we could use them on Ajax requests too.
3. The performance bar is too fiddly to rewrite right now, so apply the same
   logic to that.

Then, add features! All requests made through Axios are able to be tracked. To
keep a lid on memory usage, only the first two requests for a given URL are
tracked, though. Each request that's tracked has the same data as the initial
page load, with the exception of the performance bar and the line profiler, as
explained above.
2018-03-19 19:06:09 +00:00
Sean McGivern 5bfa93e38a Make Gitaly more prominent in the performance bar
This is as important as SQL timings, and much more important most of the time
than GC, Redis, or Sidekiq.
2018-03-13 12:58:00 +00:00
Ben Bodenmiller 400eb26d28 add nginx_status monitoring details 2018-03-07 11:32:01 +00:00
Ben Bodenmiller 56d7a7353e fix docs link 2018-02-21 15:52:41 +00:00
Marcia Ramos c234913e22 Docs: add indexes for monitoring and performance monitoring 2017-12-14 18:24:42 +00:00
Bob Van Landuyt d4d06bded1 Keep track of storage check timings 2017-12-11 13:18:39 +01:00
Yorick Peterse 4dfe26cd8b
Rewrite the GitHub importer from scratch
Prior to this MR there were two GitHub related importers:

* Github::Import: the main importer used for GitHub projects
* Gitlab::GithubImport: importer that's somewhat confusingly used for
  importing Gitea projects (apparently they have a compatible API)

This MR renames the Gitea importer to Gitlab::LegacyGithubImport and
introduces a new GitHub importer in the Gitlab::GithubImport namespace.
This new GitHub importer uses Sidekiq for importing multiple resources
in parallel, though it also has the ability to import data sequentially
should this be necessary.

The new code is spread across the following directories:

* lib/gitlab/github_import: this directory contains most of the importer
  code such as the classes used for importing resources.
* app/workers/gitlab/github_import: this directory contains the Sidekiq
  workers, most of which simply use the code from the directory above.
* app/workers/concerns/gitlab/github_import: this directory provides a
  few modules that are included in every GitHub importer worker.

== Stages

The import work is divided into separate stages, with each stage
importing a specific set of data. Stages will schedule the work that
needs to be performed, followed by scheduling a job for the
"AdvanceStageWorker" worker. This worker will periodically check if all
work is completed and schedule the next stage if this is the case. If
work is not yet completed this worker will reschedule itself.

Using this approach we don't have to block threads by calling `sleep()`,
as doing so for large projects could block the thread from doing any
work for many hours.

== Retrying Work

Workers will reschedule themselves whenever necessary. For example,
hitting the GitHub API's rate limit will result in jobs rescheduling
themselves. These jobs are not processed until the rate limit has been
reset.

== User Lookups

Part of the importing process involves looking up user details in the
GitHub API so we can map them to GitLab users. The old importer used
an in-memory cache, but this obviously doesn't work when the work is
spread across different threads.

The new importer uses a Redis cache and makes sure we only perform
API/database calls if absolutely necessary.  Frequently used keys are
refreshed, and lookup misses are also cached; removing the need for
performing API/database calls if we know we don't have the data we're
looking for.

== Performance & Models

The new importer in various places uses raw INSERT statements (as
generated by `Gitlab::Database.bulk_insert`) instead of using Rails
models. This allows us to bypass any validations and callbacks,
drastically reducing the number of SQL queries and Gitaly RPC calls
necessary to import projects.

To ensure the code produces valid data the corresponding tests check if
the produced rows are valid according to the model validation rules.
2017-11-07 23:24:59 +01:00
Rémy Coutable d7942f223c Allow to disable the Performance Bar and document the `p b` shortcut in its doc page
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-10-30 16:13:15 +01:00
Bob Van Landuyt 9ced16d914 Add missing circuitbreaker metrics to prometheus documentation 2017-10-27 13:12:47 +02:00
ernstvn 64820341e0 Clarify documentation about performance bar 2017-09-06 09:42:34 -07:00
Rémy Coutable acc0d84845 Moves the Performance Bar to the top instead of being at the bottom 2017-07-31 08:07:51 +00:00
Filipa Lacerda 25285d90a8 Merge branch 'pawel/prometheus_multiproc_dir_documentation' into 'master'
Documentation and link to explanation of prometheus_multiproc_dir

See merge request !12956
2017-07-20 16:56:37 +00:00
Pawel Chojnacki d4df306b07 Documentation and link to explanation of prometheus_multiproc_dir
- Change the wording a little bit
2017-07-20 10:18:06 +02:00
Ben Kochie 53c2f5538b Add versions to Prometheus metrics doc
Document the original release of each Prometheus metric.
2017-07-19 14:40:30 +02:00
Ben Kochie afba21f6a0 Update piplines created metric name
* Use `_total` naming convention.
* Add to metrics documentation.
2017-07-19 09:43:57 +02:00
Joshua Lambert 811108dce9 Fixed typos 2017-07-18 10:58:19 -04:00
Joshua Lambert 9f85578c0a Update admin docs 2017-07-17 00:29:21 -04:00