Skip to content

Commit 99d5a40

Browse files
committed
Fix grafana dashboard
1 parent ec24138 commit 99d5a40

File tree

3 files changed

+91
-93
lines changed

3 files changed

+91
-93
lines changed

alfalfa_worker/jobs/openstudio/step_run.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ def ep_read_outputs(self):
169169
"value": value
170170
}, "tags":
171171
{
172+
"name": point.name,
173+
"units": point.units,
172174
"id": point.point.ref_id,
173175
"point": True,
174176
"source": "alfalfa"

docker-compose.historian.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
version: "3.4"
22

33
services:
4+
worker:
5+
environment:
6+
- HISTORIAN_ENABLE=true
47
influxdb:
58
container_name: alfalfa_influxdb
69
image: influxdb:1.8

grafana/dashboards/Simple TS Dashboard.json

Lines changed: 86 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,68 @@
33
"list": [
44
{
55
"builtIn": 1,
6-
"datasource": "-- Grafana --",
6+
"datasource": {
7+
"type": "datasource",
8+
"uid": "grafana"
9+
},
710
"enable": true,
811
"hide": true,
912
"iconColor": "rgba(0, 211, 255, 1)",
1013
"name": "Annotations & Alerts",
14+
"target": {
15+
"limit": 100,
16+
"matchAny": false,
17+
"tags": [],
18+
"type": "dashboard"
19+
},
1120
"type": "dashboard"
1221
}
1322
]
1423
},
1524
"editable": true,
16-
"gnetId": null,
25+
"fiscalYearStartMonth": 0,
1726
"graphTooltip": 0,
18-
"id": 1,
19-
"iteration": 1612894943454,
27+
"iteration": 1754064698526,
2028
"links": [],
29+
"liveNow": false,
2130
"panels": [
2231
{
23-
"aliasColors": {},
24-
"bars": false,
25-
"dashLength": 10,
26-
"dashes": false,
27-
"datasource": "influxAlfalfa",
32+
"datasource": {
33+
"type": "influxdb",
34+
"uid": "PA09DBFE508D93A41"
35+
},
2836
"fieldConfig": {
2937
"defaults": {
38+
"color": {
39+
"mode": "palette-classic"
40+
},
3041
"custom": {
31-
"align": null,
32-
"filterable": false
42+
"axisLabel": "",
43+
"axisPlacement": "auto",
44+
"barAlignment": 0,
45+
"drawStyle": "line",
46+
"fillOpacity": 0,
47+
"gradientMode": "none",
48+
"hideFrom": {
49+
"legend": false,
50+
"tooltip": false,
51+
"viz": false
52+
},
53+
"lineInterpolation": "linear",
54+
"lineWidth": 1,
55+
"pointSize": 6,
56+
"scaleDistribution": {
57+
"type": "linear"
58+
},
59+
"showPoints": "always",
60+
"spanNulls": false,
61+
"stacking": {
62+
"group": "A",
63+
"mode": "none"
64+
},
65+
"thresholdsStyle": {
66+
"mode": "off"
67+
}
3368
},
3469
"mappings": [],
3570
"thresholds": {
@@ -44,148 +79,106 @@
4479
"value": 80
4580
}
4681
]
47-
}
82+
},
83+
"unit": "short"
4884
},
4985
"overrides": []
5086
},
51-
"fill": 0,
52-
"fillGradient": 0,
5387
"gridPos": {
5488
"h": 9,
5589
"w": 12,
5690
"x": 0,
5791
"y": 0
5892
},
59-
"hiddenSeries": false,
6093
"id": 2,
61-
"legend": {
62-
"avg": false,
63-
"current": false,
64-
"max": false,
65-
"min": false,
66-
"show": true,
67-
"total": false,
68-
"values": false
69-
},
70-
"lines": true,
71-
"linewidth": 1,
72-
"nullPointMode": "null",
7394
"options": {
74-
"alertThreshold": false
95+
"legend": {
96+
"calcs": [],
97+
"displayMode": "list",
98+
"placement": "bottom"
99+
},
100+
"tooltip": {
101+
"mode": "multi",
102+
"sort": "none"
103+
}
75104
},
76-
"percentage": false,
77-
"pluginVersion": "7.3.6",
78-
"pointradius": 2,
79-
"points": true,
80-
"renderer": "flot",
81-
"seriesOverrides": [],
82-
"spaceLength": 10,
83-
"stack": false,
84-
"steppedLine": false,
105+
"pluginVersion": "8.5.4",
85106
"targets": [
86107
{
87-
"alias": "$tag_dis",
108+
"alias": "$tag_name",
88109
"groupBy": [
89110
{
90-
"params": ["dis"],
111+
"params": [
112+
"name"
113+
],
91114
"type": "tag"
92115
}
93116
],
94-
"measurement": "$site_id",
117+
"measurement": "$run_id",
95118
"orderByTime": "ASC",
96119
"policy": "default",
97120
"refId": "A",
98121
"resultFormat": "time_series",
99122
"select": [
100123
[
101124
{
102-
"params": ["value"],
125+
"params": [
126+
"value"
127+
],
103128
"type": "field"
104129
}
105130
]
106131
],
107132
"tags": []
108133
}
109134
],
110-
"thresholds": [],
111-
"timeFrom": null,
112-
"timeRegions": [],
113-
"timeShift": null,
114135
"title": "Simple Timeseries",
115-
"tooltip": {
116-
"shared": true,
117-
"sort": 0,
118-
"value_type": "individual"
119-
},
120-
"type": "graph",
121-
"xaxis": {
122-
"buckets": null,
123-
"mode": "time",
124-
"name": null,
125-
"show": true,
126-
"values": []
127-
},
128-
"yaxes": [
129-
{
130-
"format": "short",
131-
"label": null,
132-
"logBase": 1,
133-
"max": null,
134-
"min": null,
135-
"show": true
136-
},
137-
{
138-
"format": "short",
139-
"label": null,
140-
"logBase": 1,
141-
"max": null,
142-
"min": null,
143-
"show": true
144-
}
145-
],
146-
"yaxis": {
147-
"align": false,
148-
"alignLevel": null
149-
}
136+
"type": "timeseries"
150137
}
151138
],
152-
"refresh": false,
153-
"schemaVersion": 26,
139+
"refresh": "",
140+
"schemaVersion": 36,
154141
"style": "dark",
155142
"tags": [],
156143
"templating": {
157144
"list": [
158145
{
159-
"allValue": null,
160146
"current": {
161-
"selected": true,
162-
"text": "99fa6408-6b01-11eb-9657-acde48001122",
163-
"value": "99fa6408-6b01-11eb-9657-acde48001122"
147+
"selected": false,
148+
"text": "8531e0e0-6d82-11f0-badc-dff039404b9b",
149+
"value": "8531e0e0-6d82-11f0-badc-dff039404b9b"
164150
},
165-
"datasource": "influxAlfalfa",
166-
"error": null,
151+
"datasource": {
152+
"type": "influxdb",
153+
"uid": "PA09DBFE508D93A41"
154+
},
155+
"definition": "",
167156
"hide": 0,
168157
"includeAll": false,
169-
"label": "Site ID",
158+
"label": "Run ID",
170159
"multi": false,
171-
"name": "site_id",
160+
"name": "run_id",
172161
"options": [],
173162
"query": "show measurements",
174163
"refresh": 1,
175164
"regex": "",
176165
"skipUrlSync": false,
177166
"sort": 0,
178167
"tagValuesQuery": "",
179-
"tags": [],
180168
"tagsQuery": "",
181169
"type": "query",
182170
"useTags": false
183171
}
184172
]
185173
},
174+
"time": {
175+
"from": "2020-01-01T0:00:00Z",
176+
"to": "now"
177+
},
186178
"timepicker": {},
187179
"timezone": "utc",
188180
"title": "Simple Dashboard",
189181
"uid": "YxaCy4PMk",
190-
"version": 3
191-
}
182+
"version": 1,
183+
"weekStart": ""
184+
}

0 commit comments

Comments
 (0)