summaryrefslogtreecommitdiff
path: root/doc/raketasks
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-16 21:08:00 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-16 21:08:00 +0000
commit69d6d3ca2013e97cfd2d89449669ea7bf475f4e9 (patch)
tree2cc4227ebfc52b7603691f06b0b8e09e030e8428 /doc/raketasks
parent01fdcf49b1553c22ae116fe96cedd7b91d02225c (diff)
downloadgitlab-ce-69d6d3ca2013e97cfd2d89449669ea7bf475f4e9.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/raketasks')
-rw-r--r--doc/raketasks/generate_sample_prometheus_data.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/raketasks/generate_sample_prometheus_data.md b/doc/raketasks/generate_sample_prometheus_data.md
new file mode 100644
index 00000000000..2489a2c2ad3
--- /dev/null
+++ b/doc/raketasks/generate_sample_prometheus_data.md
@@ -0,0 +1,16 @@
+# Generate Sample Prometheus Data
+
+This command will run Prometheus queries for each of the metrics of a specific environment
+for a default time interval of 7 days ago to now. The results of each of query are stored
+under a `sample_metrics` directory as a yaml file named by the metric's `identifier`.
+When the environmental variable `USE_SAMPLE_METRICS` is set, the Prometheus API query is
+re-routed to `Projects::Environments::SampleMetricsController` which loads the appropriate
+data set if it is present within the `sample_metrics` directory.
+
+- This command requires an id from an Environment with an available Prometheus installation.
+
+**Example:**
+
+```
+bundle exec rake gitlab:generate_sample_prometheus_data[21]
+```