Skip to content

Commit

Permalink
add dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
YvannPONCE committed Oct 16, 2024
1 parent b12b4ad commit cd8dc6b
Show file tree
Hide file tree
Showing 3 changed files with 267 additions and 23 deletions.
282 changes: 263 additions & 19 deletions cloud/config/grafana/dashboards_data/doctor.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,34 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 2,
"id": 3,
"links": [],
"panels": [
{
"datasource": {
"type": "prometheus",
"uid": "Prometheus"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 5,
"options": {
"code": {
"language": "plaintext",
"showLineNumbers": false,
"showMiniMap": false
},
"content": "## Firsst name : Marie \n## Last name : Dupont\n## Age : 78\n## Sexe : F",
"mode": "markdown"
},
"pluginVersion": "11.2.0",
"title": "Client informations",
"type": "text"
},
{
"datasource": {
"default": false,
Expand All @@ -30,32 +55,37 @@
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
"fixedColor": "blue",
"mode": "fixed"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisGridShow": true,
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"fillOpacity": 49,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineInterpolation": "smooth",
"lineStyle": {
"fill": "solid"
},
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
Expand Down Expand Up @@ -83,14 +113,12 @@
"overrides": []
},
"gridPos": {
"h": 14,
"w": 24,
"x": 0,
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 1,
"interval": "0.01",
"maxDataPoints": 5000,
"id": 3,
"options": {
"legend": {
"calcs": [],
Expand All @@ -111,34 +139,250 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "heartbeat",
"expr": "heartrate",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
"legendFormat": "__auto",
"interval": "",
"legendFormat": "frequency in bpm",
"range": true,
"refId": "A",
"useBackend": false
}
],
"title": "Heartbeat",
"title": "Heart rate",
"type": "timeseries"
},
{
"datasource": {
"default": false,
"type": "prometheus",
"uid": "Prometheus"
},
"fieldConfig": {
"defaults": {
"color": {
"fixedColor": "yellow",
"mode": "fixed"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisGridShow": true,
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 50,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "smooth",
"lineStyle": {
"fill": "solid"
},
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "yellow",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 2,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "Prometheus"
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "temperature",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
"interval": "",
"legendFormat": "degrees",
"range": true,
"refId": "A",
"useBackend": false
}
],
"title": "Temperature",
"type": "timeseries"
},
{
"datasource": {
"default": false,
"type": "prometheus",
"uid": "Prometheus"
},
"fieldConfig": {
"defaults": {
"color": {
"fixedColor": "purple",
"mode": "fixed"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisGridShow": true,
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 49,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "smooth",
"lineStyle": {
"fill": "solid"
},
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 4,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "Prometheus"
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "acceleration",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
"interval": "",
"legendFormat": "acceleration",
"range": true,
"refId": "A",
"useBackend": false
}
],
"title": "Acceleration",
"type": "timeseries"
}
],
"refresh": "",
"schemaVersion": 39,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-5m",
"from": "now-1h",
"to": "now"
},
"timepicker": {},
"timepicker": {
"hidden": true
},
"timezone": "browser",
"title": "Doctor",
"uid": "ddzo049zu0dtsc",
"version": 3,
"uid": "ee114zd3cfeo0c",
"version": 5,
"weekStart": ""
}
4 changes: 2 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ services:
- ./cloud/config/alertmanager:/etc/alertmanager
command:
- --config.file=/etc/alertmanager/alertmanager.yml
env_file:
- ./cloud/config/alertmanager/.env
# env_file:
# - ./cloud/config/alertmanager/.env
grafana:
image: grafana/grafana
ports:
Expand Down
4 changes: 2 additions & 2 deletions gateway/dataManager/downsampler.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ type DownSampler struct {
}

var downSamplingConf = map[string]int{
"acceleration": 50,
"heartrate": 4,
"acceleration": 5,
"heartrate": 1,
"temperature": 1,
"glucose": 1,
}
Expand Down

0 comments on commit cd8dc6b

Please sign in to comment.