Last active
April 5, 2021 04:20
-
-
Save sriumcp/89e74615992b08c32c8d5662886d6d8b to your computer and use it in GitHub Desktop.
Kubecon metrics-mock config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- provider: newrelic | |
uri: /newrelic | |
versions: | |
- params: | |
- name: nrql | |
value: "SELECT average\\(duration\\) FROM Sessions WHERE version='v1' SINCE .* sec ago\n" | |
metric: | |
type: gauge | |
shift: 5 | |
multiplier: 10 | |
alpha: 2 | |
beta: 2 | |
- params: | |
- name: nrql | |
value: "SELECT average\\(duration\\) FROM Sessions WHERE version='v2' SINCE .* sec ago\n" | |
metric: | |
type: gauge | |
shift: 10 | |
multiplier: 10 | |
alpha: 2 | |
beta: 2 | |
- params: | |
- name: nrql | |
value: "SELECT average\\(duration\\) FROM Sessions WHERE version='v3' SINCE .* sec ago\n" | |
metric: | |
type: gauge | |
shift: 15 | |
multiplier: 10 | |
alpha: 2 | |
beta: 2 | |
- provider: prometheus # this URI will generate metrics in Prometheus response format | |
uri: /promgauge # do not use / for the uri; will lead to unexpected bad things; also make sure URIs are unique | |
# every query to this URI needs to have the following headers | |
headers: | |
user: abcd | |
pass: efgh | |
# this URI will generate metrics for the following versions | |
versions: | |
- params: # params for version 1 should match the following; | |
- name: query | |
# make value a literal scalar so that it can be used as a regex | |
value: "accuracy\\{model_name='dark'\\}\\[.*\\]" | |
metric: | |
# metric returned for this version will be (scaled and shifted) beta distributed | |
# interval = time elapsed in seconds since the metrics-mock pod started | |
type: gauge | |
shift: 5 | |
multiplier: 10 | |
alpha: 2 | |
beta: 2 | |
- provider: prometheus | |
uri: /prometheusreq | |
versions: | |
- params: | |
- name: query | |
value: "sum\\(increase\\(revision_app_request_latencies_count\\{name='v1'}\\[.*\\]\\)\\) or on\\(\\) vector\\(0\\)" | |
metric: | |
# metric returned for this version will be interval*rate | |
# interval = time elapsed in seconds since the metrics-mock pod started | |
type: counter | |
rate: 5.2 | |
- params: | |
- name: query | |
value: "sum\\(increase\\(revision_app_request_latencies_count\\{name='v2'}\\[.*\\]\\)\\) or on\\(\\) vector\\(0\\)" | |
metric: | |
# metric returned for this version will be interval*rate | |
# interval = time elapsed in seconds since the metrics-mock pod started | |
type: counter | |
rate: 6.84 | |
- params: | |
- name: query | |
value: "sum\\(increase\\(revision_app_request_latencies_count\\{name='v3'}\\[.*\\]\\)\\) or on\\(\\) vector\\(0\\)" | |
metric: | |
# metric returned for this version will be interval*rate | |
# interval = time elapsed in seconds since the metrics-mock pod started | |
type: counter | |
rate: 6.13 | |
- provider: prometheus | |
uri: /prometheusmean | |
versions: | |
- params: | |
- name: query | |
value: ".*revision_app_request_latencies_sum.*v1.*" | |
metric: | |
# metric returned for this version will be (scaled and shifted) beta distributed | |
# interval = time elapsed in seconds since the metrics-mock pod started | |
type: gauge | |
shift: 5 | |
multiplier: 10 | |
alpha: 2 | |
beta: 2 | |
- params: | |
- name: query | |
value: ".*revision_app_request_latencies_sum.*v2.*" | |
metric: | |
# metric returned for this version will be (scaled and shifted) beta distributed | |
# interval = time elapsed in seconds since the metrics-mock pod started | |
type: gauge | |
shift: 5 | |
multiplier: 10 | |
alpha: 2 | |
beta: 2 | |
- params: | |
- name: query | |
value: ".*revision_app_request_latencies_sum.*v3.*" | |
metric: | |
# metric returned for this version will be (scaled and shifted) beta distributed | |
# interval = time elapsed in seconds since the metrics-mock pod started | |
type: gauge | |
shift: 5 | |
multiplier: 10 | |
alpha: 2 | |
beta: 2 | |
- provider: prometheus | |
uri: /prometheustail | |
versions: | |
- params: | |
- name: query | |
value: "histogram.*v1.*" | |
metric: | |
# metric returned for this version will be (scaled and shifted) beta distributed | |
# interval = time elapsed in seconds since the metrics-mock pod started | |
type: gauge | |
shift: 10 | |
multiplier: 10 | |
alpha: 2 | |
beta: 2 | |
- params: | |
- name: query | |
value: "histogram.*v2.*" | |
metric: | |
# metric returned for this version will be (scaled and shifted) beta distributed | |
# interval = time elapsed in seconds since the metrics-mock pod started | |
type: gauge | |
shift: 10 | |
multiplier: 10 | |
alpha: 2 | |
beta: 2 | |
- params: | |
- name: query | |
value: "histogram.*v3.*" | |
metric: | |
# metric returned for this version will be (scaled and shifted) beta distributed | |
# interval = time elapsed in seconds since the metrics-mock pod started | |
type: gauge | |
shift: 10 | |
multiplier: 10 | |
alpha: 2 | |
beta: 2 | |
- provider: prometheus | |
uri: /prometheuserr | |
versions: | |
- params: | |
- name: query | |
value: ".*response_code_class.*v1.*" | |
metric: | |
# metric returned for this version will be (scaled and shifted) beta distributed | |
# interval = time elapsed in seconds since the metrics-mock pod started | |
type: gauge | |
shift: 0 | |
multiplier: 10 | |
alpha: 2 | |
beta: 100000 | |
- params: | |
- name: query | |
value: ".*response_code_class.*v2.*" | |
metric: | |
# metric returned for this version will be (scaled and shifted) beta distributed | |
# interval = time elapsed in seconds since the metrics-mock pod started | |
type: gauge | |
shift: 0 | |
multiplier: 10 | |
alpha: 2 | |
beta: 100000 | |
- params: | |
- name: query | |
value: ".*response_code_class.*v3.*" | |
metric: | |
# metric returned for this version will be (scaled and shifted) beta distributed | |
# interval = time elapsed in seconds since the metrics-mock pod started | |
type: gauge | |
shift: 0 | |
multiplier: 10 | |
alpha: 2 | |
beta: 100000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment