2020-01-01 13:55:28 +05:30
|
|
|
# Generate Sample Prometheus Data
|
|
|
|
|
|
|
|
This command will run Prometheus queries for each of the metrics of a specific environment
|
2020-03-09 13:42:32 +05:30
|
|
|
for a series of time intervals: 30 minutes, 3 hours, 8 hours, 24 hours, 72 hours, and 7 days
|
|
|
|
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.
|
2020-01-01 13:55:28 +05:30
|
|
|
|
|
|
|
- This command requires an id from an Environment with an available Prometheus installation.
|
|
|
|
|
|
|
|
**Example:**
|
|
|
|
|
2020-04-08 14:13:33 +05:30
|
|
|
```shell
|
2020-01-01 13:55:28 +05:30
|
|
|
bundle exec rake gitlab:generate_sample_prometheus_data[21]
|
|
|
|
```
|