Skip to content

Commit

Permalink
Merge branch 'main' into js-version
Browse files Browse the repository at this point in the history
  • Loading branch information
asmyasnikov committed Mar 6, 2024
2 parents a7fd881 + cfda13d commit 339f9f0
Show file tree
Hide file tree
Showing 8 changed files with 816 additions and 72 deletions.
113 changes: 41 additions & 72 deletions k8s/helms/grafana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,6 @@ dashboards:
"links": [],
"liveNow": false,
"panels": [
{
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 9,
"title": "Row title",
"type": "row"
},
{
"datasource": {
"type": "prometheus",
Expand Down Expand Up @@ -168,14 +157,14 @@ dashboards:
"h": 9,
"w": 12,
"x": 0,
"y": 1
"y": 0
},
"id": 2,
"id": 12,
"options": {
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "right",
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
Expand All @@ -190,19 +179,7 @@ dashboards:
"uid": "prometheus"
},
"editorMode": "builder",
"expr": "inflight > 0",
"format": "time_series",
"legendFormat": "({{sdk}}-{{sdkVersion}}) {{jobName}} In flight",
"range": true,
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"editorMode": "builder",
"expr": "oks > 0",
"expr": "rate(oks[$__rate_interval]) > 0",
"hide": false,
"legendFormat": "({{sdk}}-{{sdkVersion}}) {{jobName}} OK",
"range": true,
Expand All @@ -214,14 +191,14 @@ dashboards:
"uid": "prometheus"
},
"editorMode": "builder",
"expr": "not_oks > 0",
"expr": "rate(not_oks[$__rate_interval]) > 0",
"hide": false,
"legendFormat": "({{sdk}}-{{sdkVersion}}) {{jobName}} not OK",
"range": true,
"refId": "C"
}
],
"title": "SLO Requests",
"title": "SLO Requests RPS",
"transformations": [],
"type": "timeseries"
},
Expand All @@ -240,6 +217,7 @@ dashboards:
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"axisSoftMin": 0,
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
Expand All @@ -265,6 +243,7 @@ dashboards:
"mode": "off"
}
},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
Expand All @@ -286,14 +265,14 @@ dashboards:
"h": 9,
"w": 12,
"x": 12,
"y": 1
"y": 0
},
"id": 12,
"id": 14,
"options": {
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "right",
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
Expand All @@ -308,38 +287,14 @@ dashboards:
"uid": "prometheus"
},
"editorMode": "builder",
"expr": "delta(inflight[2s]) / 2 > 0",
"format": "time_series",
"legendFormat": "({{sdk}}-{{sdkVersion}}) {{jobName}} In flight",
"range": true,
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"editorMode": "builder",
"expr": "delta(oks[2s]) / 2 > 0",
"hide": false,
"legendFormat": "({{sdk}}-{{sdkVersion}}) {{jobName}} OK",
"range": true,
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"editorMode": "builder",
"expr": "changes(not_oks[2s]) > 0",
"expr": "histogram_quantile(1, rate(attempts_bucket[$__rate_interval]))",
"hide": false,
"legendFormat": "({{sdk}}-{{sdkVersion}}) {{jobName}} not OK",
"legendFormat": "{{sdk}}-{{sdkVersion}} {{jobName}}-{{status}}",
"range": true,
"refId": "C"
"refId": "A"
}
],
"title": "SLO Requests RPS",
"title": "Attempts",
"transformations": [],
"type": "timeseries"
},
Expand All @@ -349,7 +304,7 @@ dashboards:
"h": 1,
"w": 24,
"x": 0,
"y": 10
"y": 9
},
"id": 7,
"panels": [],
Expand Down Expand Up @@ -417,7 +372,7 @@ dashboards:
"h": 8,
"w": 12,
"x": 0,
"y": 11
"y": 10
},
"id": 4,
"options": {
Expand Down Expand Up @@ -510,7 +465,7 @@ dashboards:
"h": 8,
"w": 12,
"x": 12,
"y": 11
"y": 10
},
"id": 5,
"options": {
Expand Down Expand Up @@ -602,7 +557,7 @@ dashboards:
"h": 8,
"w": 12,
"x": 0,
"y": 19
"y": 18
},
"id": 10,
"options": {
Expand Down Expand Up @@ -694,7 +649,7 @@ dashboards:
"h": 8,
"w": 12,
"x": 12,
"y": 19
"y": 18
},
"id": 11,
"options": {
Expand Down Expand Up @@ -726,16 +681,30 @@ dashboards:
"type": "timeseries"
}
],
"refresh": false,
"schemaVersion": 37,
"refresh": "",
"revision": 1,
"schemaVersion": 38,
"style": "dark",
"tags": [],
"templating": {
"list": []
"list": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"filters": [],
"hide": 0,
"label": "",
"name": "filter",
"skipUrlSync": false,
"type": "adhoc"
}
]
},
"time": {
"from": "2023-03-30T12:36:47.587Z",
"to": "2023-03-30T12:43:11.246Z"
"from": "now-15m",
"to": "now"
},
"timepicker": {},
"timezone": "",
Expand Down
1 change: 1 addition & 0 deletions playground/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
data/
40 changes: 40 additions & 0 deletions playground/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# SLO playground

Playground may be used for testing SLO workloads locally

It has several services:

- `prometheus` - storage for metrics
- `prometheus-pushgateway` - push acceptor for prometheus
- `grafana` - provides chats for metrics
- `ydb` - local instance of ydb-database to run workload with

## Network addresses

- Grafana dashboard: http://localhost:3000
- Prometheus pushgateway: http://localhost:9091
- YDB monitoring: http://localhost:8765
- YDB GRPC: grpc://localhost:2136
- YDB GRPC TLS: grpcs://localhost:2135

## Start

```shell
docker-compose up -d
```

## Stop

```shell
docker-compose down
```

## Configs

Grafana's dashboards stored in `configs/grafana/provisioning/dashboards`

## Data

YDB databases are not persistent

All other data like metrics and certs stored in `data/`
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: 1

providers:
- name: 'SLO'
options:
path: /etc/grafana/provisioning/dashboards
Loading

0 comments on commit 339f9f0

Please sign in to comment.