Skip to content

Commit

Permalink
Merge branch 'stack-dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ccremer committed Nov 28, 2021
2 parents 73c19df + 2708697 commit 258e3bc
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 48 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
| [![chart downloads](https://img.shields.io/github/downloads/ccremer/charts/clustercode-0.1.2/total)](https://github.com/ccremer/charts/releases/tag/clustercode-0.1.2) | [clustercode](charts/clustercode/README.md) |
| [![chart downloads](https://img.shields.io/github/downloads/ccremer/charts/emby-0.2.2/total)](https://github.com/ccremer/charts/releases/tag/emby-0.2.2) | [emby](charts/emby/README.md) |
| [![chart downloads](https://img.shields.io/github/downloads/ccremer/charts/fronius-exporter-0.8.1/total)](https://github.com/ccremer/charts/releases/tag/fronius-exporter-0.8.1) | [fronius-exporter](charts/fronius-exporter/README.md) |
| [![chart downloads](https://img.shields.io/github/downloads/ccremer/charts/fronius-stack-0.1.3/total)](https://github.com/ccremer/charts/releases/tag/fronius-stack-0.1.3) | [fronius-stack](charts/fronius-stack/README.md) |
| [![chart downloads](https://img.shields.io/github/downloads/ccremer/charts/fronius-stack-0.1.4/total)](https://github.com/ccremer/charts/releases/tag/fronius-stack-0.1.4) | [fronius-stack](charts/fronius-stack/README.md) |
| [![chart downloads](https://img.shields.io/github/downloads/ccremer/charts/kubernetes-zfs-provisioner-1.1.1/total)](https://github.com/ccremer/charts/releases/tag/kubernetes-zfs-provisioner-1.1.1) | [kubernetes-zfs-provisioner](charts/kubernetes-zfs-provisioner/README.md) |
| [![chart downloads](https://img.shields.io/github/downloads/ccremer/charts/samba-0.1.1/total)](https://github.com/ccremer/charts/releases/tag/samba-0.1.1) | [samba](charts/samba/README.md) |
| [![chart downloads](https://img.shields.io/github/downloads/ccremer/charts/znapzend-0.5.4/total)](https://github.com/ccremer/charts/releases/tag/znapzend-0.5.4) | [znapzend](charts/znapzend/README.md) |
Expand Down
6 changes: 3 additions & 3 deletions charts/fronius-stack/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ dependencies:
version: 0.8.1
- name: influxdb2
repository: https://helm.influxdata.com
version: 2.0.1
digest: sha256:c2a8ef2c9e8519232c3d9c14f1cacc0e9bcbadebfe140ebde4b561a6946358b3
generated: "2021-11-14T10:47:13.91054599Z"
version: 2.0.2
digest: sha256:4a07f1d8da2db0106154dce815fc48ab38ca4b8bf30e9ac5a18be603b3823665
generated: "2021-11-24T16:05:02.248733163Z"
4 changes: 2 additions & 2 deletions charts/fronius-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.3
version: 0.1.4

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand All @@ -34,6 +34,6 @@ dependencies:
condition: fronius.enabled
- name: influxdb2
alias: influxdb
version: 2.0.1
version: 2.0.2
repository: https://helm.influxdata.com
condition: influxdb.enabled
4 changes: 2 additions & 2 deletions charts/fronius-stack/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# fronius-stack

![Version: 0.1.3](https://img.shields.io/badge/Version-0.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 0.1.4](https://img.shields.io/badge/Version-0.1.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

A Helm chart for installing fronius-exporter with long-term storage

Expand Down Expand Up @@ -116,7 +116,7 @@ Common/Useful Link references from values.yaml
| Repository | Name | Version |
|------------|------|---------|
| https://ccremer.github.io/charts | fronius(fronius-exporter) | 0.8.1 |
| https://helm.influxdata.com | influxdb(influxdb2) | 2.0.1 |
| https://helm.influxdata.com | influxdb(influxdb2) | 2.0.2 |

## Values

Expand Down
115 changes: 75 additions & 40 deletions charts/fronius-stack/files/grafana/fronius-dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,32 @@
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"description": "Charts displaying various metrics such as power, load, autonomy and energy",
"editable": true,
"fiscalYearStartMonth": 0,
"gnetId": null,
"graphTooltip": 0,
"iteration": 1624718409543,
"iteration": 1638115222739,
"links": [],
"liveNow": false,
"panels": [
{
"collapsed": false,
"datasource": null,
"fieldConfig": {
"defaults": {},
"overrides": []
},
"gridPos": {
"h": 1,
"w": 24,
Expand All @@ -41,10 +53,6 @@
"datasource": "${datasource}",
"decimals": null,
"description": "",
"fieldConfig": {
"defaults": {},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
Expand Down Expand Up @@ -75,23 +83,30 @@
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.5.3",
"pluginVersion": "8.2.3",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"$$hashKey": "object:45",
"alias": "Load",
"color": "#F2495C",
"fill": 0
},
{
"$$hashKey": "object:46",
"alias": "Photovoltaic",
"color": "#73BF69"
},
{
"$$hashKey": "object:47",
"alias": "Grid",
"color": "#5794F2"
},
{
"$$hashKey": "object:73",
"alias": "_value"
}
],
"spaceLength": 10,
Expand All @@ -116,7 +131,7 @@
"hide": false,
"orderByTime": "ASC",
"policy": "default",
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn:(r) =>\r\n r._measurement == \"fronius_site_power_load\" and\r\n r.site == \"${site}\"\r\n )\r\n |> group(columns: [\"site\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> map(fn: (r) => ({_value:r._value * -1.0, _time:r._time,_field:\"Load\"}))",
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn:(r) =>\r\n r._measurement == \"fronius_site_power_load\" and\r\n r.site == \"${site}\"\r\n )\r\n |> group(columns: [\"site\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> map(fn: (r) => ({\"Load\":r._value * -1.0, _time:r._time}))",
"refId": "Load",
"resultFormat": "time_series",
"select": [
Expand Down Expand Up @@ -153,7 +168,7 @@
"hide": false,
"orderByTime": "ASC",
"policy": "default",
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn:(r) =>\r\n r._measurement == \"fronius_site_power_photovoltaic\" and\r\n r.site == \"${site}\"\r\n )\r\n |> group(columns: [\"site\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> keep(columns: [\"_value\", \"_time\"])\r\n |> set(key: \"_field\", value: \"Photovoltaic\")",
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn:(r) =>\r\n r._measurement == \"fronius_site_power_photovoltaic\" and\r\n r.site == \"${site}\"\r\n )\r\n |> group(columns: [\"site\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> keep(columns: [\"_value\", \"_time\"])\r\n |> map(fn: (r) => ({\"Photovoltaic\":r._value, _time:r._time}))",
"refId": "Photovoltaics",
"resultFormat": "time_series",
"select": [
Expand Down Expand Up @@ -190,7 +205,7 @@
"hide": false,
"orderByTime": "ASC",
"policy": "default",
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn:(r) =>\r\n r._measurement == \"fronius_site_power_grid\" and\r\n r.site == \"${site}\"\r\n )\r\n |> group(columns: [\"site\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> map(fn: (r) => ({_value:r._value, _time:r._time,_field:\"Grid\"}))",
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn:(r) =>\r\n r._measurement == \"fronius_site_power_grid\" and\r\n r.site == \"${site}\"\r\n )\r\n |> group(columns: [\"site\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> map(fn: (r) => ({\"Grid\":r._value, _time:r._time}))",
"refId": "Grid",
"resultFormat": "time_series",
"select": [
Expand Down Expand Up @@ -343,7 +358,7 @@
"text": {},
"textMode": "value_and_name"
},
"pluginVersion": "7.5.3",
"pluginVersion": "8.2.3",
"targets": [
{
"groupBy": [
Expand Down Expand Up @@ -469,10 +484,6 @@
"dashLength": 10,
"dashes": false,
"datasource": "${datasource}",
"fieldConfig": {
"defaults": {},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
Expand Down Expand Up @@ -500,12 +511,13 @@
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.5.3",
"pluginVersion": "8.2.3",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"$$hashKey": "object:85",
"alias": "Self-Consumption",
"color": "#F2495C",
"fill": 0
Expand All @@ -532,7 +544,7 @@
],
"orderByTime": "ASC",
"policy": "default",
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn:(r) =>\r\n r._measurement == \"fronius_site_autonomy_ratio\" and\r\n r.site == \"${site}\"\r\n )\r\n |> group(columns: [\"site\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> keep(columns: [\"_value\", \"_time\"])\r\n |> set(key: \"_field\", value: \"Autonomy\")",
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn:(r) =>\r\n r._measurement == \"fronius_site_autonomy_ratio\" and\r\n r.site == \"${site}\"\r\n )\r\n |> group(columns: [\"site\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> map(fn: (r) => ({\"Autonomy\":r._value, _time:r._time}))",
"refId": "Autonomy",
"resultFormat": "time_series",
"select": [
Expand Down Expand Up @@ -569,7 +581,7 @@
"hide": false,
"orderByTime": "ASC",
"policy": "default",
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn:(r) =>\r\n r._measurement == \"fronius_site_selfconsumption_ratio\" and\r\n r.site == \"${site}\"\r\n )\r\n |> group(columns: [\"site\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> keep(columns: [\"_value\", \"_time\"])\r\n |> set(key: \"_field\", value: \"Self-Consumption\")",
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn:(r) =>\r\n r._measurement == \"fronius_site_selfconsumption_ratio\" and\r\n r.site == \"${site}\"\r\n )\r\n |> group(columns: [\"site\"])\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> map(fn: (r) => ({\"Self-Consumption\":r._value, _time:r._time}))",
"refId": "Self-Consumption",
"resultFormat": "time_series",
"select": [
Expand Down Expand Up @@ -640,6 +652,8 @@
},
"decimals": 1,
"mappings": [],
"max": 1,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
Expand Down Expand Up @@ -706,7 +720,7 @@
"text": {},
"textMode": "value_and_name"
},
"pluginVersion": "7.5.3",
"pluginVersion": "8.2.3",
"targets": [
{
"groupBy": [
Expand Down Expand Up @@ -792,6 +806,10 @@
{
"collapsed": false,
"datasource": null,
"fieldConfig": {
"defaults": {},
"overrides": []
},
"gridPos": {
"h": 1,
"w": 24,
Expand Down Expand Up @@ -841,7 +859,7 @@
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.5.3",
"pluginVersion": "8.2.3",
"pointradius": 2,
"points": false,
"renderer": "flot",
Expand All @@ -867,7 +885,7 @@
],
"orderByTime": "ASC",
"policy": "default",
"query": "import \"strings\"\r\nimport \"date\"\r\nfrom(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn:(r) =>\r\n r._measurement == \"fronius_site_energy_consumption\" and\r\n r.site == \"${site}\" and\r\n r.time_frame == \"day\"\r\n )\r\n |> drop(columns: [\"url\", \"host\", \"time_frame\"])\r\n |> window(every: 24h)\r\n |> max()\r\n |> group(columns: [\"site\"])\r\n |> map(fn: (r) => ({_value: r._value, _time: date.truncate(t: r._time, unit: 1d), _field: \"Energy per day\"}))",
"query": "import \"strings\"\r\nimport \"date\"\r\nfrom(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn:(r) =>\r\n r._measurement == \"fronius_site_energy_consumption\" and\r\n r.site == \"${site}\" and\r\n r.time_frame == \"day\"\r\n )\r\n |> drop(columns: [\"url\", \"host\", \"time_frame\"])\r\n |> window(every: 24h)\r\n |> max()\r\n |> group(columns: [\"site\"])\r\n |> map(fn: (r) => ({\"Energy per day\": r._value, _time: date.truncate(t: r._time, unit: 1d)}))",
"refId": "Energy per day",
"resultFormat": "time_series",
"select": [
Expand Down Expand Up @@ -973,7 +991,7 @@
"text": {},
"textMode": "auto"
},
"pluginVersion": "7.5.3",
"pluginVersion": "8.2.3",
"targets": [
{
"groupBy": [
Expand Down Expand Up @@ -1018,6 +1036,10 @@
{
"collapsed": false,
"datasource": null,
"fieldConfig": {
"defaults": {},
"overrides": []
},
"gridPos": {
"h": 1,
"w": 24,
Expand All @@ -1038,6 +1060,19 @@
"fixedColor": "super-light-purple",
"mode": "fixed"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"axisSoftMin": 0,
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineWidth": 1
},
"mappings": [],
"min": 0,
"thresholds": {
Expand All @@ -1061,20 +1096,22 @@
},
"id": 11,
"options": {
"displayMode": "basic",
"orientation": "vertical",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"limit": 10,
"values": true
"barWidth": 0.97,
"groupWidth": 0.7,
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"showUnfilled": true,
"text": {}
"orientation": "vertical",
"showValue": "always",
"stacking": "none",
"text": {},
"tooltip": {
"mode": "single"
}
},
"pluginVersion": "7.5.3",
"pluginVersion": "8.2.3",
"targets": [
{
"groupBy": [
Expand All @@ -1093,7 +1130,7 @@
],
"orderByTime": "ASC",
"policy": "default",
"query": "import \"strings\"\r\nfrom(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn:(r) =>\r\n r._measurement == \"fronius_site_energy_consumption\" and\r\n r.site == \"${site}\" and\r\n r.time_frame == \"year\"\r\n )\r\n |> drop(columns: [\"url\", \"host\", \"time_frame\"])\r\n |> window(every: 1y)\r\n |> max()\r\n |> group(columns: [\"site\"])\r\n |> map(fn: (r) => ({_value: r._value, _time: r._time, year: int(v: strings.substring(start: 0, end: 4, v: string(v: r._time)))}))\r\n |> group(columns: [\"site\"], mode: \"except\")",
"query": "import \"strings\"\r\nfrom(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn:(r) =>\r\n r._measurement == \"fronius_site_energy_consumption\" and\r\n r.site == \"${site}\" and\r\n r.time_frame == \"year\"\r\n )\r\n |> drop(columns: [\"url\", \"host\", \"time_frame\"])\r\n |> window(every: 1y)\r\n |> max()\r\n |> group(columns: [\"site\"])\r\n |> map(fn: (r) => ({\"Energy per Year\": r._value, _time: r._time, year: strings.substring(start: 0, end: 4, v: string(v: r._time)) }))\r\n",
"refId": "Energy per year",
"resultFormat": "time_series",
"select": [
Expand All @@ -1114,7 +1151,7 @@
}
],
"title": "Total Energy per year",
"type": "bargauge"
"type": "barchart"
},
{
"datasource": "${datasource}",
Expand Down Expand Up @@ -1159,7 +1196,7 @@
"text": {},
"textMode": "auto"
},
"pluginVersion": "7.5.3",
"pluginVersion": "8.2.3",
"targets": [
{
"groupBy": [
Expand Down Expand Up @@ -1203,7 +1240,7 @@
}
],
"refresh": false,
"schemaVersion": 27,
"schemaVersion": 31,
"style": "dark",
"tags": [
"fronius"
Expand Down Expand Up @@ -1244,7 +1281,6 @@
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
Expand All @@ -1267,7 +1303,6 @@
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
Expand All @@ -1282,5 +1317,5 @@
"timezone": "",
"title": "Fronius Symo",
"uid": "wTbh9P6Gk",
"version": 4
"version": 5
}

0 comments on commit 258e3bc

Please sign in to comment.