You'll find some proof of concepts, research documents, es queries...
Generates some fake latency logs that can be used for creating SLOs on. The logs contains latency
field.
SCENARIO
can be either:
90percent_good
: 90% of the time, the latency is below 100ms ([0, 100]), or above 300ms ([300, 600])95percent_good
: 95% of the time, the latency is below 100ms ([0, 100]), or above 300ms ([300, 600])99percent_good
: 99% of the time, the latency is below 100ms ([0, 100]), or above 300ms ([300, 600])full_outage_every_day
: Follow a sinusoidale function to generate the good (f(x) >= 0) and bad (f(x) < 0) logs. Function is meant to be negative once per day-ishhealthy_then_failing
: Previous data is 100% good, then starts failing
SCENARIO="95percent_good" node lib/latency_logs_generator/index
Note: this script is deprecated. It simulates the output of an SLO's running transform. Use the latency logs generator instead.
Handy if you want to generate some data for an existing SLO, and keep generating the data as time passes. The script will generate 3 month of historical data, and then every minute, will insert a new document.
- Create an SLO through the API. Copy the slo
id
- Stop the transform manually associated to this slo
- Remove the data manually (delete by query or delete all slo indices)
- Run
node lib/continuous_rollup_data_generator/index.js slo_id
The data is generated with the following noise function. When the function returns a negative value, we use it to compute the good
events as a ratio of the total
events.
Generates some historical summary data to be use in tests/storybook. Tweak the scripts under lib/historical_summary_generator
to match the expected use case then run:
node lib/historical_summary_generator/index