Compare commits
7 Commits
c7203f58ff
...
962d9b5ac9
Author | SHA1 | Date | |
---|---|---|---|
962d9b5ac9
|
|||
e81fb5d445
|
|||
73945b6cb9
|
|||
089ea914b6 | |||
dd1baa4aef
|
|||
ea3195a93c
|
|||
aef1499e65
|
4
install.sh
Executable file
4
install.sh
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
mkdir -p ./collections/ansible_collections/community
|
||||||
|
# git clone --depth=1 -b 1.2.1 https://github.com/ansible-collections/community.grafana.git ./collections/ansible_collections/community/grafana
|
||||||
|
git clone --depth=1 -b 1.2.1-extended https://github.com/ansible_community.grafana.git ./collections/ansible_collections/community/grafana
|
||||||
|
|
2
play.yml
2
play.yml
@@ -74,4 +74,6 @@
|
|||||||
tags: docker
|
tags: docker
|
||||||
- name: "install cobald"
|
- name: "install cobald"
|
||||||
role: cobald
|
role: cobald
|
||||||
|
vars:
|
||||||
|
docker_network: slurm
|
||||||
tags: cobald
|
tags: cobald
|
||||||
|
@@ -45,11 +45,13 @@ COPY cobald-entrypoint.sh /usr/local/sbin/docker-entrypoint.sh
|
|||||||
|
|
||||||
RUN chmod 755 /usr/local/sbin/docker-entrypoint.sh
|
RUN chmod 755 /usr/local/sbin/docker-entrypoint.sh
|
||||||
|
|
||||||
ENTRYPOINT /usr/local/sbin/docker-entrypoint.sh
|
ENTRYPOINT [ "/usr/local/sbin/docker-entrypoint.sh" ]
|
||||||
|
|
||||||
RUN yum -y install iproute &&\
|
RUN yum -y install iproute &&\
|
||||||
yum clean all && rm -rf /var/cache/yum
|
yum clean all && rm -rf /var/cache/yum
|
||||||
|
|
||||||
USER cobald
|
USER cobald
|
||||||
|
|
||||||
|
STOPSIGNAL SIGINT
|
||||||
|
|
||||||
CMD "python3 -m cobald.daemon /etc/cobald/config.yaml"
|
CMD "python3 -m cobald.daemon /etc/cobald/config.yaml"
|
||||||
|
590
roles/cobald/files/grafana-dashboard.json
Normal file
590
roles/cobald/files/grafana-dashboard.json
Normal file
@@ -0,0 +1,590 @@
|
|||||||
|
{
|
||||||
|
"annotations": {
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"builtIn": 1,
|
||||||
|
"datasource": "-- Grafana --",
|
||||||
|
"enable": true,
|
||||||
|
"hide": true,
|
||||||
|
"iconColor": "rgba(0, 211, 255, 1)",
|
||||||
|
"name": "Annotations & Alerts",
|
||||||
|
"type": "dashboard"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"editable": true,
|
||||||
|
"gnetId": null,
|
||||||
|
"graphTooltip": 0,
|
||||||
|
"id": 1,
|
||||||
|
"iteration": 1623184036048,
|
||||||
|
"links": [],
|
||||||
|
"panels": [
|
||||||
|
{
|
||||||
|
"collapsed": false,
|
||||||
|
"datasource": null,
|
||||||
|
"gridPos": {
|
||||||
|
"h": 1,
|
||||||
|
"w": 24,
|
||||||
|
"x": 0,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"id": 4,
|
||||||
|
"panels": [],
|
||||||
|
"title": "Row title",
|
||||||
|
"type": "row"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aliasColors": {},
|
||||||
|
"bars": false,
|
||||||
|
"dashLength": 10,
|
||||||
|
"dashes": false,
|
||||||
|
"datasource": "InfluxDB",
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"unit": "none"
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"fill": 1,
|
||||||
|
"fillGradient": 0,
|
||||||
|
"gridPos": {
|
||||||
|
"h": 9,
|
||||||
|
"w": 12,
|
||||||
|
"x": 0,
|
||||||
|
"y": 1
|
||||||
|
},
|
||||||
|
"hiddenSeries": false,
|
||||||
|
"id": 2,
|
||||||
|
"interval": "1s",
|
||||||
|
"legend": {
|
||||||
|
"avg": false,
|
||||||
|
"current": false,
|
||||||
|
"max": true,
|
||||||
|
"min": true,
|
||||||
|
"show": true,
|
||||||
|
"total": false,
|
||||||
|
"values": true
|
||||||
|
},
|
||||||
|
"lines": true,
|
||||||
|
"linewidth": 1,
|
||||||
|
"maxDataPoints": 200,
|
||||||
|
"nullPointMode": "null",
|
||||||
|
"options": {
|
||||||
|
"alertThreshold": true
|
||||||
|
},
|
||||||
|
"percentage": false,
|
||||||
|
"pluginVersion": "7.5.7",
|
||||||
|
"pointradius": 2,
|
||||||
|
"points": false,
|
||||||
|
"renderer": "flot",
|
||||||
|
"seriesOverrides": [],
|
||||||
|
"spaceLength": 10,
|
||||||
|
"stack": false,
|
||||||
|
"steppedLine": false,
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"groupBy": [
|
||||||
|
{
|
||||||
|
"params": [
|
||||||
|
"$__interval"
|
||||||
|
],
|
||||||
|
"type": "time"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"params": [
|
||||||
|
"null"
|
||||||
|
],
|
||||||
|
"type": "fill"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"orderByTime": "ASC",
|
||||||
|
"policy": "default",
|
||||||
|
"query": "nodes = from(bucket: \"batleth\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> keep(columns: [\"tardis_machine_name\", \"_time\"])\n |> sort(columns: [\"_time\"], desc: true)\n |> unique(column: \"tardis_machine_name\")\n// |> yield()\n\noffset = from(bucket: \"batleth\")\n |> range(start: 0, stop: v.timeRangeStart)\n |> filter(fn: (r) => r._field == \"state\")\n |> group(columns: [\"tardis_machine_name\", \"machine_type\"])\n |> reduce(fn: (r, accumulator) => ({\n _value: accumulator._value + (\n if r._value == \"AvailableState\" then 1 \n else if r._value == \"DownState\" then -1 \n else 0)\n }), identity: {_value: 0})\n |> duplicate(column: \"_stop\", as: \"_time\")\n\nnew = from(bucket: \"batleth\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._field == \"state\")\n// |> filter(fn: (r) => r.tardis_machine_name == \"${machine}\")\n |> group(columns: [\"tardis_machine_name\", \"machine_type\"])\n |> window(every: $__interval)\n |> reduce(fn: (r, accumulator) => ({\n _value: accumulator._value + (\n if r._value == \"AvailableState\" then 1 \n else if r._value == \"DownState\" then -1 \n else 0)\n }), identity: {_value: 0})\n |> duplicate(column: \"_stop\", as: \"_time\")\n\nunion(tables: [offset, new])\n |> window(every: inf)\n |> cumulativeSum()\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> yield()",
|
||||||
|
"refId": "A",
|
||||||
|
"resultFormat": "time_series",
|
||||||
|
"select": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"params": [
|
||||||
|
"value"
|
||||||
|
],
|
||||||
|
"type": "field"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"params": [],
|
||||||
|
"type": "mean"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"tags": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"thresholds": [],
|
||||||
|
"timeFrom": null,
|
||||||
|
"timeRegions": [],
|
||||||
|
"timeShift": null,
|
||||||
|
"title": "nodes running",
|
||||||
|
"tooltip": {
|
||||||
|
"shared": true,
|
||||||
|
"sort": 0,
|
||||||
|
"value_type": "individual"
|
||||||
|
},
|
||||||
|
"type": "graph",
|
||||||
|
"xaxis": {
|
||||||
|
"buckets": null,
|
||||||
|
"mode": "time",
|
||||||
|
"name": null,
|
||||||
|
"show": true,
|
||||||
|
"values": []
|
||||||
|
},
|
||||||
|
"yaxes": [
|
||||||
|
{
|
||||||
|
"format": "none",
|
||||||
|
"label": null,
|
||||||
|
"logBase": 1,
|
||||||
|
"max": null,
|
||||||
|
"min": null,
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"format": "short",
|
||||||
|
"label": null,
|
||||||
|
"logBase": 1,
|
||||||
|
"max": null,
|
||||||
|
"min": null,
|
||||||
|
"show": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"yaxis": {
|
||||||
|
"align": false,
|
||||||
|
"alignLevel": null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aliasColors": {},
|
||||||
|
"bars": false,
|
||||||
|
"dashLength": 10,
|
||||||
|
"dashes": false,
|
||||||
|
"datasource": "InfluxDB",
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"fill": 1,
|
||||||
|
"fillGradient": 0,
|
||||||
|
"gridPos": {
|
||||||
|
"h": 9,
|
||||||
|
"w": 12,
|
||||||
|
"x": 12,
|
||||||
|
"y": 1
|
||||||
|
},
|
||||||
|
"hiddenSeries": false,
|
||||||
|
"id": 8,
|
||||||
|
"interval": "1s",
|
||||||
|
"legend": {
|
||||||
|
"avg": false,
|
||||||
|
"current": false,
|
||||||
|
"max": false,
|
||||||
|
"min": false,
|
||||||
|
"show": true,
|
||||||
|
"total": false,
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"lines": true,
|
||||||
|
"linewidth": 1,
|
||||||
|
"maxDataPoints": null,
|
||||||
|
"nullPointMode": "null",
|
||||||
|
"options": {
|
||||||
|
"alertThreshold": true
|
||||||
|
},
|
||||||
|
"percentage": false,
|
||||||
|
"pluginVersion": "7.5.7",
|
||||||
|
"pointradius": 2,
|
||||||
|
"points": false,
|
||||||
|
"renderer": "flot",
|
||||||
|
"seriesOverrides": [],
|
||||||
|
"spaceLength": 10,
|
||||||
|
"stack": false,
|
||||||
|
"steppedLine": false,
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"groupBy": [
|
||||||
|
{
|
||||||
|
"params": [
|
||||||
|
"$__interval"
|
||||||
|
],
|
||||||
|
"type": "time"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"params": [
|
||||||
|
"null"
|
||||||
|
],
|
||||||
|
"type": "fill"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"orderByTime": "ASC",
|
||||||
|
"policy": "default",
|
||||||
|
"query": "from(bucket: \"batleth\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"tardis_pipeline\")\n |> filter(fn: (r) => r._field == \"demand\" or r._field == \"supply\")\n |> drop(columns: [\"host\"])\n |> aggregateWindow(every: $__interval, fn: mean)\n |> yield()",
|
||||||
|
"queryType": "randomWalk",
|
||||||
|
"refId": "A",
|
||||||
|
"resultFormat": "time_series",
|
||||||
|
"select": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"params": [
|
||||||
|
"value"
|
||||||
|
],
|
||||||
|
"type": "field"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"params": [],
|
||||||
|
"type": "mean"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"tags": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"thresholds": [],
|
||||||
|
"timeFrom": null,
|
||||||
|
"timeRegions": [],
|
||||||
|
"timeShift": null,
|
||||||
|
"title": "pipeline demand/supply (mean)",
|
||||||
|
"tooltip": {
|
||||||
|
"shared": true,
|
||||||
|
"sort": 0,
|
||||||
|
"value_type": "individual"
|
||||||
|
},
|
||||||
|
"type": "graph",
|
||||||
|
"xaxis": {
|
||||||
|
"buckets": null,
|
||||||
|
"mode": "time",
|
||||||
|
"name": null,
|
||||||
|
"show": true,
|
||||||
|
"values": []
|
||||||
|
},
|
||||||
|
"yaxes": [
|
||||||
|
{
|
||||||
|
"$$hashKey": "object:115",
|
||||||
|
"decimals": null,
|
||||||
|
"format": "short",
|
||||||
|
"label": "cpus",
|
||||||
|
"logBase": 1,
|
||||||
|
"max": null,
|
||||||
|
"min": null,
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$$hashKey": "object:116",
|
||||||
|
"format": "short",
|
||||||
|
"label": null,
|
||||||
|
"logBase": 1,
|
||||||
|
"max": null,
|
||||||
|
"min": null,
|
||||||
|
"show": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"yaxis": {
|
||||||
|
"align": false,
|
||||||
|
"alignLevel": null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aliasColors": {},
|
||||||
|
"bars": false,
|
||||||
|
"dashLength": 10,
|
||||||
|
"dashes": false,
|
||||||
|
"datasource": "InfluxDB",
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"fill": 1,
|
||||||
|
"fillGradient": 0,
|
||||||
|
"gridPos": {
|
||||||
|
"h": 8,
|
||||||
|
"w": 12,
|
||||||
|
"x": 0,
|
||||||
|
"y": 10
|
||||||
|
},
|
||||||
|
"hiddenSeries": false,
|
||||||
|
"id": 6,
|
||||||
|
"interval": "1s",
|
||||||
|
"legend": {
|
||||||
|
"avg": false,
|
||||||
|
"current": false,
|
||||||
|
"max": false,
|
||||||
|
"min": false,
|
||||||
|
"show": true,
|
||||||
|
"total": false,
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"lines": true,
|
||||||
|
"linewidth": 1,
|
||||||
|
"nullPointMode": "null",
|
||||||
|
"options": {
|
||||||
|
"alertThreshold": true
|
||||||
|
},
|
||||||
|
"percentage": false,
|
||||||
|
"pluginVersion": "7.5.7",
|
||||||
|
"pointradius": 2,
|
||||||
|
"points": false,
|
||||||
|
"renderer": "flot",
|
||||||
|
"seriesOverrides": [],
|
||||||
|
"spaceLength": 10,
|
||||||
|
"stack": false,
|
||||||
|
"steppedLine": false,
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"groupBy": [
|
||||||
|
{
|
||||||
|
"params": [
|
||||||
|
"$__interval"
|
||||||
|
],
|
||||||
|
"type": "time"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"params": [
|
||||||
|
"null"
|
||||||
|
],
|
||||||
|
"type": "fill"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"orderByTime": "ASC",
|
||||||
|
"policy": "default",
|
||||||
|
"query": "f = (r, accumulator) => ({\n _value: accumulator._value + (if r._value == \"AvailableState\" then 1 else if r._value == \"DownState\" then -1 else 0)\n })\n\nfrom(bucket: \"batleth\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._field == \"state\")\n |> group(columns: [\"tardis_machine_name\"])\n |> window(every: $__interval)\n |> reduce(fn: f, identity: {_value: 0})\n |> duplicate(column: \"_stop\", as: \"_time\")\n |> window(every: inf, timeColumn: \"_time\")\n |> yield()",
|
||||||
|
"queryType": "randomWalk",
|
||||||
|
"refId": "A",
|
||||||
|
"resultFormat": "time_series",
|
||||||
|
"select": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"params": [
|
||||||
|
"value"
|
||||||
|
],
|
||||||
|
"type": "field"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"params": [],
|
||||||
|
"type": "mean"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"tags": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"thresholds": [],
|
||||||
|
"timeFrom": null,
|
||||||
|
"timeRegions": [],
|
||||||
|
"timeShift": null,
|
||||||
|
"title": "node fluctuation",
|
||||||
|
"tooltip": {
|
||||||
|
"shared": true,
|
||||||
|
"sort": 0,
|
||||||
|
"value_type": "individual"
|
||||||
|
},
|
||||||
|
"type": "graph",
|
||||||
|
"xaxis": {
|
||||||
|
"buckets": null,
|
||||||
|
"mode": "time",
|
||||||
|
"name": null,
|
||||||
|
"show": true,
|
||||||
|
"values": []
|
||||||
|
},
|
||||||
|
"yaxes": [
|
||||||
|
{
|
||||||
|
"format": "short",
|
||||||
|
"label": null,
|
||||||
|
"logBase": 1,
|
||||||
|
"max": null,
|
||||||
|
"min": null,
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"format": "short",
|
||||||
|
"label": null,
|
||||||
|
"logBase": 1,
|
||||||
|
"max": null,
|
||||||
|
"min": null,
|
||||||
|
"show": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"yaxis": {
|
||||||
|
"align": false,
|
||||||
|
"alignLevel": null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aliasColors": {},
|
||||||
|
"bars": false,
|
||||||
|
"dashLength": 10,
|
||||||
|
"dashes": false,
|
||||||
|
"datasource": "InfluxDB",
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"fill": 1,
|
||||||
|
"fillGradient": 0,
|
||||||
|
"gridPos": {
|
||||||
|
"h": 8,
|
||||||
|
"w": 12,
|
||||||
|
"x": 12,
|
||||||
|
"y": 10
|
||||||
|
},
|
||||||
|
"hiddenSeries": false,
|
||||||
|
"id": 10,
|
||||||
|
"interval": "1s",
|
||||||
|
"legend": {
|
||||||
|
"avg": false,
|
||||||
|
"current": false,
|
||||||
|
"max": false,
|
||||||
|
"min": false,
|
||||||
|
"show": true,
|
||||||
|
"total": false,
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"lines": true,
|
||||||
|
"linewidth": 1,
|
||||||
|
"maxDataPoints": null,
|
||||||
|
"nullPointMode": "null",
|
||||||
|
"options": {
|
||||||
|
"alertThreshold": true
|
||||||
|
},
|
||||||
|
"percentage": false,
|
||||||
|
"pluginVersion": "7.5.7",
|
||||||
|
"pointradius": 2,
|
||||||
|
"points": false,
|
||||||
|
"renderer": "flot",
|
||||||
|
"seriesOverrides": [],
|
||||||
|
"spaceLength": 10,
|
||||||
|
"stack": false,
|
||||||
|
"steppedLine": false,
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"groupBy": [
|
||||||
|
{
|
||||||
|
"params": [
|
||||||
|
"$__interval"
|
||||||
|
],
|
||||||
|
"type": "time"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"params": [
|
||||||
|
"null"
|
||||||
|
],
|
||||||
|
"type": "fill"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"orderByTime": "ASC",
|
||||||
|
"policy": "default",
|
||||||
|
"query": "from(bucket: \"batleth\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"tardis_pipeline\")\n |> filter(fn: (r) => r._field == \"utilisation\" or r._field == \"allocation\")\n |> keep(columns: [\"_time\", \"_measurement\", \"_field\", \"_value\", \"tardis_machine_name\"])\n |> aggregateWindow(every: $__interval, fn: mean)\n |> yield()",
|
||||||
|
"queryType": "randomWalk",
|
||||||
|
"refId": "A",
|
||||||
|
"resultFormat": "time_series",
|
||||||
|
"select": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"params": [
|
||||||
|
"value"
|
||||||
|
],
|
||||||
|
"type": "field"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"params": [],
|
||||||
|
"type": "mean"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"tags": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"thresholds": [],
|
||||||
|
"timeFrom": null,
|
||||||
|
"timeRegions": [],
|
||||||
|
"timeShift": null,
|
||||||
|
"title": "pipeline (utilization/allocation)",
|
||||||
|
"tooltip": {
|
||||||
|
"shared": true,
|
||||||
|
"sort": 0,
|
||||||
|
"value_type": "individual"
|
||||||
|
},
|
||||||
|
"type": "graph",
|
||||||
|
"xaxis": {
|
||||||
|
"buckets": null,
|
||||||
|
"mode": "time",
|
||||||
|
"name": null,
|
||||||
|
"show": true,
|
||||||
|
"values": []
|
||||||
|
},
|
||||||
|
"yaxes": [
|
||||||
|
{
|
||||||
|
"format": "short",
|
||||||
|
"label": null,
|
||||||
|
"logBase": 1,
|
||||||
|
"max": null,
|
||||||
|
"min": null,
|
||||||
|
"show": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"format": "short",
|
||||||
|
"label": null,
|
||||||
|
"logBase": 1,
|
||||||
|
"max": null,
|
||||||
|
"min": null,
|
||||||
|
"show": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"yaxis": {
|
||||||
|
"align": false,
|
||||||
|
"alignLevel": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"refresh": "5s",
|
||||||
|
"schemaVersion": 27,
|
||||||
|
"style": "dark",
|
||||||
|
"tags": [],
|
||||||
|
"templating": {
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"allValue": null,
|
||||||
|
"current": {
|
||||||
|
"isNone": true,
|
||||||
|
"selected": false,
|
||||||
|
"text": "None",
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"datasource": "InfluxDB",
|
||||||
|
"definition": "from(bucket: \"batleth\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> keep(columns: [\"tardis_machine_name\", \"_time\"])\n |> sort(columns: [\"_time\"], desc: true)\n |> unique(column: \"tardis_machine_name\")",
|
||||||
|
"description": null,
|
||||||
|
"error": null,
|
||||||
|
"hide": 0,
|
||||||
|
"includeAll": false,
|
||||||
|
"label": null,
|
||||||
|
"multi": false,
|
||||||
|
"name": "machine",
|
||||||
|
"options": [],
|
||||||
|
"query": "from(bucket: \"batleth\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> keep(columns: [\"tardis_machine_name\", \"_time\"])\n |> sort(columns: [\"_time\"], desc: true)\n |> unique(column: \"tardis_machine_name\")",
|
||||||
|
"refresh": 2,
|
||||||
|
"regex": "",
|
||||||
|
"skipUrlSync": false,
|
||||||
|
"sort": 0,
|
||||||
|
"tagValuesQuery": "",
|
||||||
|
"tags": [],
|
||||||
|
"tagsQuery": "",
|
||||||
|
"type": "query",
|
||||||
|
"useTags": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"time": {
|
||||||
|
"from": "now-5m",
|
||||||
|
"to": "now"
|
||||||
|
},
|
||||||
|
"timepicker": {},
|
||||||
|
"timezone": "",
|
||||||
|
"title": "cobald",
|
||||||
|
"uid": "urDuvE6Gk",
|
||||||
|
"version": 9
|
||||||
|
}
|
@@ -20,19 +20,27 @@
|
|||||||
"data": [
|
"data": [
|
||||||
{
|
{
|
||||||
"type": "cell",
|
"type": "cell",
|
||||||
"id": "078ad2e135410000"
|
"id": "07900a722c363000"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "cell",
|
"type": "cell",
|
||||||
"id": "078ba588b6c10000"
|
"id": "07900a7236f63000"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "cell",
|
"type": "cell",
|
||||||
"id": "078ba5e53a810000"
|
"id": "07900a723cf63000"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "cell",
|
"type": "cell",
|
||||||
"id": "078c36c747010000"
|
"id": "07900a7243f63000"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "cell",
|
||||||
|
"id": "079e694f29581000"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "cell",
|
||||||
|
"id": "079e6e037c181000"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -43,61 +51,7 @@
|
|||||||
},
|
},
|
||||||
"included": [
|
"included": [
|
||||||
{
|
{
|
||||||
"id": "078ad2e135410000",
|
"id": "07900a722c363000",
|
||||||
"type": "cell",
|
|
||||||
"attributes": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"w": 4,
|
|
||||||
"h": 4
|
|
||||||
},
|
|
||||||
"relationships": {
|
|
||||||
"view": {
|
|
||||||
"data": {
|
|
||||||
"type": "view",
|
|
||||||
"id": "078ad2e135410000"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "078ba588b6c10000",
|
|
||||||
"type": "cell",
|
|
||||||
"attributes": {
|
|
||||||
"x": 0,
|
|
||||||
"y": 4,
|
|
||||||
"w": 4,
|
|
||||||
"h": 4
|
|
||||||
},
|
|
||||||
"relationships": {
|
|
||||||
"view": {
|
|
||||||
"data": {
|
|
||||||
"type": "view",
|
|
||||||
"id": "078ba588b6c10000"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "078ba5e53a810000",
|
|
||||||
"type": "cell",
|
|
||||||
"attributes": {
|
|
||||||
"x": 4,
|
|
||||||
"y": 4,
|
|
||||||
"w": 4,
|
|
||||||
"h": 4
|
|
||||||
},
|
|
||||||
"relationships": {
|
|
||||||
"view": {
|
|
||||||
"data": {
|
|
||||||
"type": "view",
|
|
||||||
"id": "078ba5e53a810000"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "078c36c747010000",
|
|
||||||
"type": "cell",
|
"type": "cell",
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"x": 4,
|
"x": 4,
|
||||||
@@ -109,14 +63,209 @@
|
|||||||
"view": {
|
"view": {
|
||||||
"data": {
|
"data": {
|
||||||
"type": "view",
|
"type": "view",
|
||||||
"id": "078c36c747010000"
|
"id": "07900a722c363000"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "07900a7236f63000",
|
||||||
|
"type": "cell",
|
||||||
|
"attributes": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"w": 4,
|
||||||
|
"h": 4
|
||||||
|
},
|
||||||
|
"relationships": {
|
||||||
|
"view": {
|
||||||
|
"data": {
|
||||||
|
"type": "view",
|
||||||
|
"id": "07900a7236f63000"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "07900a723cf63000",
|
||||||
|
"type": "cell",
|
||||||
|
"attributes": {
|
||||||
|
"x": 4,
|
||||||
|
"y": 4,
|
||||||
|
"w": 4,
|
||||||
|
"h": 4
|
||||||
|
},
|
||||||
|
"relationships": {
|
||||||
|
"view": {
|
||||||
|
"data": {
|
||||||
|
"type": "view",
|
||||||
|
"id": "07900a723cf63000"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "07900a7243f63000",
|
||||||
|
"type": "cell",
|
||||||
|
"attributes": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 4,
|
||||||
|
"w": 4,
|
||||||
|
"h": 4
|
||||||
|
},
|
||||||
|
"relationships": {
|
||||||
|
"view": {
|
||||||
|
"data": {
|
||||||
|
"type": "view",
|
||||||
|
"id": "07900a7243f63000"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "079e694f29581000",
|
||||||
|
"type": "cell",
|
||||||
|
"attributes": {
|
||||||
|
"x": 8,
|
||||||
|
"y": 0,
|
||||||
|
"w": 4,
|
||||||
|
"h": 4
|
||||||
|
},
|
||||||
|
"relationships": {
|
||||||
|
"view": {
|
||||||
|
"data": {
|
||||||
|
"type": "view",
|
||||||
|
"id": "079e694f29581000"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "079e6e037c181000",
|
||||||
|
"type": "cell",
|
||||||
|
"attributes": {
|
||||||
|
"x": 8,
|
||||||
|
"y": 4,
|
||||||
|
"w": 4,
|
||||||
|
"h": 4
|
||||||
|
},
|
||||||
|
"relationships": {
|
||||||
|
"view": {
|
||||||
|
"data": {
|
||||||
|
"type": "view",
|
||||||
|
"id": "079e6e037c181000"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "view",
|
"type": "view",
|
||||||
"id": "078ad2e135410000",
|
"id": "07900a722c363000",
|
||||||
|
"attributes": {
|
||||||
|
"name": "nodes running",
|
||||||
|
"properties": {
|
||||||
|
"shape": "chronograf-v2",
|
||||||
|
"queries": [
|
||||||
|
{
|
||||||
|
"text": "from(bucket: \"batleth\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._field == \"state\")\n |> group()\n |> window(every: 10s)\n |> reduce(fn: (r, accumulator) => ({\n _value: accumulator._value + (\n if r._value == \"AvailableState\" then 1 \n else if r._value == \"DownState\" then -1 \n else 0)\n }), identity: {_value: 0})\n |> duplicate(column: \"_stop\", as: \"_time\")\n |> window(every: inf) //, timeColumn: \"_time\")\n |> cumulativeSum()\n// |> reduce(fn: (r, accumulator) => ({r with x: r._value * 2}), identity: {x:0})\n// |> map(fn: (r) => ({r with vnew: r._value*2}))\n// |> integral(unit: 10s, timeColumn: \"_stop\")\n// |> window(every: inf) //, timeColumn: \"_stop\")\n |> yield()",
|
||||||
|
"editMode": "advanced",
|
||||||
|
"name": "",
|
||||||
|
"builderConfig": {
|
||||||
|
"buckets": [],
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"key": "_measurement",
|
||||||
|
"values": [],
|
||||||
|
"aggregateFunctionType": "filter"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"functions": [
|
||||||
|
{
|
||||||
|
"name": "mean"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"aggregateWindow": {
|
||||||
|
"period": "auto",
|
||||||
|
"fillValues": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"axes": {
|
||||||
|
"x": {
|
||||||
|
"bounds": [
|
||||||
|
"",
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"label": "",
|
||||||
|
"prefix": "",
|
||||||
|
"suffix": "",
|
||||||
|
"base": "10",
|
||||||
|
"scale": "linear"
|
||||||
|
},
|
||||||
|
"y": {
|
||||||
|
"bounds": [
|
||||||
|
"",
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"label": "",
|
||||||
|
"prefix": "",
|
||||||
|
"suffix": "",
|
||||||
|
"base": "10",
|
||||||
|
"scale": "linear"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "xy",
|
||||||
|
"legend": {},
|
||||||
|
"geom": "line",
|
||||||
|
"colors": [
|
||||||
|
{
|
||||||
|
"id": "9b960932-18d9-4f57-80ba-24998a06613d",
|
||||||
|
"type": "scale",
|
||||||
|
"hex": "#31C0F6",
|
||||||
|
"name": "Nineteen Eighty Four",
|
||||||
|
"value": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "c1742651-0d5e-4148-b9c0-92beb642417a",
|
||||||
|
"type": "scale",
|
||||||
|
"hex": "#A500A5",
|
||||||
|
"name": "Nineteen Eighty Four",
|
||||||
|
"value": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "756fa8cb-9d9c-4e45-9a4f-f2b106b0216a",
|
||||||
|
"type": "scale",
|
||||||
|
"hex": "#FF7E27",
|
||||||
|
"name": "Nineteen Eighty Four",
|
||||||
|
"value": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"note": "",
|
||||||
|
"showNoteWhenEmpty": false,
|
||||||
|
"xColumn": "_time",
|
||||||
|
"generateXAxisTicks": [],
|
||||||
|
"xTotalTicks": 0,
|
||||||
|
"xTickStart": 0,
|
||||||
|
"xTickStep": 0,
|
||||||
|
"yColumn": "_value",
|
||||||
|
"generateYAxisTicks": [],
|
||||||
|
"yTotalTicks": 0,
|
||||||
|
"yTickStart": 0,
|
||||||
|
"yTickStep": 0,
|
||||||
|
"shadeBelow": false,
|
||||||
|
"position": "overlaid",
|
||||||
|
"timeFormat": "",
|
||||||
|
"hoverDimension": "auto",
|
||||||
|
"legendColorizeRows": true,
|
||||||
|
"legendOpacity": 1,
|
||||||
|
"legendOrientationThreshold": 100000000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "view",
|
||||||
|
"id": "07900a7236f63000",
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"name": "Name this Cell",
|
"name": "Name this Cell",
|
||||||
"properties": {
|
"properties": {
|
||||||
@@ -221,112 +370,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "view",
|
"type": "view",
|
||||||
"id": "078ba588b6c10000",
|
"id": "07900a723cf63000",
|
||||||
"attributes": {
|
|
||||||
"name": "states",
|
|
||||||
"properties": {
|
|
||||||
"shape": "chronograf-v2",
|
|
||||||
"queries": [
|
|
||||||
{
|
|
||||||
"text": "from(bucket: \"batleth\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._field == \"state\")\n |> group(columns: [\"_value\"], mode: \"by\")\n |> duplicate(column: \"_value\", as: \"state\")\n |> window(every: 10s)\n |> count(column: \"state\")\n |> rename(columns: {\"_value\": \"_field\", \"state\": \"_value\"})\n |> group(columns: [\"_field\"])\n |> yield()",
|
|
||||||
"editMode": "advanced",
|
|
||||||
"name": "",
|
|
||||||
"builderConfig": {
|
|
||||||
"buckets": [],
|
|
||||||
"tags": [
|
|
||||||
{
|
|
||||||
"key": "_measurement",
|
|
||||||
"values": [],
|
|
||||||
"aggregateFunctionType": "filter"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"functions": [
|
|
||||||
{
|
|
||||||
"name": "mean"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"aggregateWindow": {
|
|
||||||
"period": "auto",
|
|
||||||
"fillValues": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"axes": {
|
|
||||||
"x": {
|
|
||||||
"bounds": [
|
|
||||||
"",
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label": "",
|
|
||||||
"prefix": "",
|
|
||||||
"suffix": "",
|
|
||||||
"base": "10",
|
|
||||||
"scale": "linear"
|
|
||||||
},
|
|
||||||
"y": {
|
|
||||||
"bounds": [
|
|
||||||
"",
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"label": "",
|
|
||||||
"prefix": "",
|
|
||||||
"suffix": "",
|
|
||||||
"base": "10",
|
|
||||||
"scale": "linear"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"type": "xy",
|
|
||||||
"legend": {},
|
|
||||||
"geom": "line",
|
|
||||||
"colors": [
|
|
||||||
{
|
|
||||||
"id": "9b960932-18d9-4f57-80ba-24998a06613d",
|
|
||||||
"type": "scale",
|
|
||||||
"hex": "#31C0F6",
|
|
||||||
"name": "Nineteen Eighty Four",
|
|
||||||
"value": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "c1742651-0d5e-4148-b9c0-92beb642417a",
|
|
||||||
"type": "scale",
|
|
||||||
"hex": "#A500A5",
|
|
||||||
"name": "Nineteen Eighty Four",
|
|
||||||
"value": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "756fa8cb-9d9c-4e45-9a4f-f2b106b0216a",
|
|
||||||
"type": "scale",
|
|
||||||
"hex": "#FF7E27",
|
|
||||||
"name": "Nineteen Eighty Four",
|
|
||||||
"value": 0
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"note": "",
|
|
||||||
"showNoteWhenEmpty": false,
|
|
||||||
"xColumn": "_stop",
|
|
||||||
"generateXAxisTicks": [],
|
|
||||||
"xTotalTicks": 0,
|
|
||||||
"xTickStart": 0,
|
|
||||||
"xTickStep": 0,
|
|
||||||
"yColumn": "_value",
|
|
||||||
"generateYAxisTicks": [],
|
|
||||||
"yTotalTicks": 0,
|
|
||||||
"yTickStart": 0,
|
|
||||||
"yTickStep": 0,
|
|
||||||
"shadeBelow": false,
|
|
||||||
"position": "overlaid",
|
|
||||||
"timeFormat": "",
|
|
||||||
"hoverDimension": "auto",
|
|
||||||
"legendColorizeRows": true,
|
|
||||||
"legendOpacity": 1,
|
|
||||||
"legendOrientationThreshold": 100000000
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "view",
|
|
||||||
"id": "078ba5e53a810000",
|
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"name": "node fluctuation",
|
"name": "node fluctuation",
|
||||||
"properties": {
|
"properties": {
|
||||||
@@ -431,14 +475,14 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "view",
|
"type": "view",
|
||||||
"id": "078c36c747010000",
|
"id": "07900a7243f63000",
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"name": "nodes running",
|
"name": "states",
|
||||||
"properties": {
|
"properties": {
|
||||||
"shape": "chronograf-v2",
|
"shape": "chronograf-v2",
|
||||||
"queries": [
|
"queries": [
|
||||||
{
|
{
|
||||||
"text": "from(bucket: \"batleth\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._field == \"state\")\n |> group()\n |> window(every: 10s)\n |> reduce(fn: (r, accumulator) => ({\n _value: accumulator._value + (\n if r._value == \"AvailableState\" then 1 \n else if r._value == \"DownState\" then -1 \n else 0)\n }), identity: {_value: 0})\n |> duplicate(column: \"_stop\", as: \"_time\")\n |> window(every: inf) //, timeColumn: \"_time\")\n |> cumulativeSum()\n// |> reduce(fn: (r, accumulator) => ({r with x: r._value * 2}), identity: {x:0})\n// |> map(fn: (r) => ({r with vnew: r._value*2}))\n// |> integral(unit: 10s, timeColumn: \"_stop\")\n// |> window(every: inf) //, timeColumn: \"_stop\")\n |> yield()",
|
"text": "from(bucket: \"batleth\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._field == \"state\")\n |> group(columns: [\"_value\"], mode: \"by\")\n |> duplicate(column: \"_value\", as: \"state\")\n |> window(every: 10s)\n |> count(column: \"state\")\n |> rename(columns: {\"_value\": \"_field\", \"state\": \"_value\"})\n |> group(columns: [\"_field\"])\n |> yield()",
|
||||||
"editMode": "advanced",
|
"editMode": "advanced",
|
||||||
"name": "",
|
"name": "",
|
||||||
"builderConfig": {
|
"builderConfig": {
|
||||||
@@ -514,6 +558,216 @@
|
|||||||
],
|
],
|
||||||
"note": "",
|
"note": "",
|
||||||
"showNoteWhenEmpty": false,
|
"showNoteWhenEmpty": false,
|
||||||
|
"xColumn": "_stop",
|
||||||
|
"generateXAxisTicks": [],
|
||||||
|
"xTotalTicks": 0,
|
||||||
|
"xTickStart": 0,
|
||||||
|
"xTickStep": 0,
|
||||||
|
"yColumn": "_value",
|
||||||
|
"generateYAxisTicks": [],
|
||||||
|
"yTotalTicks": 0,
|
||||||
|
"yTickStart": 0,
|
||||||
|
"yTickStep": 0,
|
||||||
|
"shadeBelow": false,
|
||||||
|
"position": "overlaid",
|
||||||
|
"timeFormat": "",
|
||||||
|
"hoverDimension": "auto",
|
||||||
|
"legendColorizeRows": true,
|
||||||
|
"legendOpacity": 1,
|
||||||
|
"legendOrientationThreshold": 100000000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "view",
|
||||||
|
"id": "079e694f29581000",
|
||||||
|
"attributes": {
|
||||||
|
"name": "pipeline (demand / supply)",
|
||||||
|
"properties": {
|
||||||
|
"shape": "chronograf-v2",
|
||||||
|
"queries": [
|
||||||
|
{
|
||||||
|
"text": "from(bucket: \"batleth\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"tardis_pipeline\")\n |> filter(fn: (r) => r._field == \"demand\" or r._field == \"supply\")\n// |> filter(fn: (r) => r._field == \"state\")\n// |> group()\n// |> window(every: 10s)\n// |> duplicate(column: \"_stop\", as: \"_time\")\n// |> window(every: inf) //, timeColumn: \"_time\")\n// |> cumulativeSum()\n |> yield()",
|
||||||
|
"editMode": "advanced",
|
||||||
|
"name": "",
|
||||||
|
"builderConfig": {
|
||||||
|
"buckets": [],
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"key": "_measurement",
|
||||||
|
"values": [],
|
||||||
|
"aggregateFunctionType": "filter"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"functions": [
|
||||||
|
{
|
||||||
|
"name": "mean"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"aggregateWindow": {
|
||||||
|
"period": "auto",
|
||||||
|
"fillValues": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"axes": {
|
||||||
|
"x": {
|
||||||
|
"bounds": [
|
||||||
|
"",
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"label": "",
|
||||||
|
"prefix": "",
|
||||||
|
"suffix": "",
|
||||||
|
"base": "10",
|
||||||
|
"scale": "linear"
|
||||||
|
},
|
||||||
|
"y": {
|
||||||
|
"bounds": [
|
||||||
|
"",
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"label": "",
|
||||||
|
"prefix": "",
|
||||||
|
"suffix": "",
|
||||||
|
"base": "10",
|
||||||
|
"scale": "linear"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "xy",
|
||||||
|
"legend": {},
|
||||||
|
"geom": "line",
|
||||||
|
"colors": [
|
||||||
|
{
|
||||||
|
"id": "4ef29481-ecf3-4a09-b0f5-e34e8d3e50b5",
|
||||||
|
"type": "scale",
|
||||||
|
"hex": "#31C0F6",
|
||||||
|
"name": "Nineteen Eighty Four",
|
||||||
|
"value": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "719de04a-f70f-4c54-a1bb-982a9d13dbae",
|
||||||
|
"type": "scale",
|
||||||
|
"hex": "#A500A5",
|
||||||
|
"name": "Nineteen Eighty Four",
|
||||||
|
"value": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "8d5c1f25-3801-4cdd-ad40-b8e2e78342a0",
|
||||||
|
"type": "scale",
|
||||||
|
"hex": "#FF7E27",
|
||||||
|
"name": "Nineteen Eighty Four",
|
||||||
|
"value": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"note": "",
|
||||||
|
"showNoteWhenEmpty": false,
|
||||||
|
"xColumn": "_time",
|
||||||
|
"generateXAxisTicks": [],
|
||||||
|
"xTotalTicks": 0,
|
||||||
|
"xTickStart": 0,
|
||||||
|
"xTickStep": 0,
|
||||||
|
"yColumn": "_value",
|
||||||
|
"generateYAxisTicks": [],
|
||||||
|
"yTotalTicks": 0,
|
||||||
|
"yTickStart": 0,
|
||||||
|
"yTickStep": 0,
|
||||||
|
"shadeBelow": false,
|
||||||
|
"position": "overlaid",
|
||||||
|
"timeFormat": "",
|
||||||
|
"hoverDimension": "auto",
|
||||||
|
"legendColorizeRows": true,
|
||||||
|
"legendOpacity": 1,
|
||||||
|
"legendOrientationThreshold": 100000000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "view",
|
||||||
|
"id": "079e6e037c181000",
|
||||||
|
"attributes": {
|
||||||
|
"name": "pipeline (Utilization / Allocation)",
|
||||||
|
"properties": {
|
||||||
|
"shape": "chronograf-v2",
|
||||||
|
"queries": [
|
||||||
|
{
|
||||||
|
"text": "from(bucket: \"batleth\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"tardis_pipeline\")\n |> filter(fn: (r) => r._field == \"utilisation\" or r._field == \"allocation\")\n// |> filter(fn: (r) => r._field == \"state\")\n// |> group()\n// |> window(every: 10s)\n// |> duplicate(column: \"_stop\", as: \"_time\")\n// |> window(every: inf) //, timeColumn: \"_time\")\n// |> cumulativeSum()\n |> yield()",
|
||||||
|
"editMode": "advanced",
|
||||||
|
"name": "",
|
||||||
|
"builderConfig": {
|
||||||
|
"buckets": [],
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"key": "_measurement",
|
||||||
|
"values": [],
|
||||||
|
"aggregateFunctionType": "filter"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"functions": [
|
||||||
|
{
|
||||||
|
"name": "mean"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"aggregateWindow": {
|
||||||
|
"period": "auto",
|
||||||
|
"fillValues": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"axes": {
|
||||||
|
"x": {
|
||||||
|
"bounds": [
|
||||||
|
"",
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"label": "",
|
||||||
|
"prefix": "",
|
||||||
|
"suffix": "",
|
||||||
|
"base": "10",
|
||||||
|
"scale": "linear"
|
||||||
|
},
|
||||||
|
"y": {
|
||||||
|
"bounds": [
|
||||||
|
"",
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"label": "",
|
||||||
|
"prefix": "",
|
||||||
|
"suffix": "",
|
||||||
|
"base": "10",
|
||||||
|
"scale": "linear"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "xy",
|
||||||
|
"legend": {},
|
||||||
|
"geom": "line",
|
||||||
|
"colors": [
|
||||||
|
{
|
||||||
|
"id": "4ef29481-ecf3-4a09-b0f5-e34e8d3e50b5",
|
||||||
|
"type": "scale",
|
||||||
|
"hex": "#31C0F6",
|
||||||
|
"name": "Nineteen Eighty Four",
|
||||||
|
"value": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "719de04a-f70f-4c54-a1bb-982a9d13dbae",
|
||||||
|
"type": "scale",
|
||||||
|
"hex": "#A500A5",
|
||||||
|
"name": "Nineteen Eighty Four",
|
||||||
|
"value": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "8d5c1f25-3801-4cdd-ad40-b8e2e78342a0",
|
||||||
|
"type": "scale",
|
||||||
|
"hex": "#FF7E27",
|
||||||
|
"name": "Nineteen Eighty Four",
|
||||||
|
"value": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"note": "",
|
||||||
|
"showNoteWhenEmpty": false,
|
||||||
"xColumn": "_time",
|
"xColumn": "_time",
|
||||||
"generateXAxisTicks": [],
|
"generateXAxisTicks": [],
|
||||||
"xTotalTicks": 0,
|
"xTotalTicks": 0,
|
||||||
|
54
roles/cobald/tasks/grafana.yml
Normal file
54
roles/cobald/tasks/grafana.yml
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
- name: create influx token for grafana
|
||||||
|
influx_token:
|
||||||
|
base: "http://localhost:{{influx_pubport}}"
|
||||||
|
org: "my-org"
|
||||||
|
auth_token: "{{influx_admin_token}}"
|
||||||
|
description: grafana read access
|
||||||
|
key: grafana
|
||||||
|
permissions:
|
||||||
|
- action: read
|
||||||
|
resource:
|
||||||
|
type: buckets
|
||||||
|
register: influx_grafana_token
|
||||||
|
|
||||||
|
- name: run grafana
|
||||||
|
docker_container:
|
||||||
|
name: ed-grafana
|
||||||
|
image: grafana/grafana:7.5.7
|
||||||
|
hostname: ed-grafana
|
||||||
|
domainname: cobald.local
|
||||||
|
networks:
|
||||||
|
- name: "{{docker_network}}"
|
||||||
|
published_ports:
|
||||||
|
- "3000:3000"
|
||||||
|
state: started
|
||||||
|
detach: True
|
||||||
|
cleanup: True
|
||||||
|
|
||||||
|
- wait_for:
|
||||||
|
host: localhost
|
||||||
|
port: 3000
|
||||||
|
|
||||||
|
- community.grafana.grafana_datasource:
|
||||||
|
grafana_url: http://localhost:3000
|
||||||
|
grafana_user: admin
|
||||||
|
grafana_password: admin
|
||||||
|
name: InfluxDB
|
||||||
|
ds_type: influxdb
|
||||||
|
ds_url: "{{influx_url}}"
|
||||||
|
additional_json_data:
|
||||||
|
defaultBucket: "{{influx_bucket}}"
|
||||||
|
organization: "{{influx_org}}"
|
||||||
|
version: Flux
|
||||||
|
additional_secure_json_data:
|
||||||
|
token: "{{influx_grafana_token.token}}"
|
||||||
|
register: das
|
||||||
|
|
||||||
|
- community.grafana.grafana_dashboard:
|
||||||
|
grafana_url: http://localhost:3000
|
||||||
|
grafana_user: admin
|
||||||
|
grafana_password: admin
|
||||||
|
state: present
|
||||||
|
commit_message: updated by ansible
|
||||||
|
overwrite: yes
|
||||||
|
json_data: "{{lookup('file', 'grafana-dashboard.json')|from_json}}"
|
@@ -1,17 +1,6 @@
|
|||||||
#- file:
|
- name: run influxdb in docker container
|
||||||
# path: "/container/volumes/influxdb-backup/"
|
docker_container:
|
||||||
# state: directory
|
name: ed-influxdb
|
||||||
# owner: "{{unpriv_user}}"
|
|
||||||
# group: docker
|
|
||||||
|
|
||||||
#- copy:
|
|
||||||
# src: influxdb-dashboard-cobald.json
|
|
||||||
# dest: /container/volumes/influxdb-backup/dash-cobald.json
|
|
||||||
# owner: "{{unpriv_user}}"
|
|
||||||
# group: docker
|
|
||||||
|
|
||||||
- docker_container:
|
|
||||||
name: ed-influxdb-2 # -2 FIXME
|
|
||||||
image: influxdb
|
image: influxdb
|
||||||
hostname: "{{influx_hostname}}"
|
hostname: "{{influx_hostname}}"
|
||||||
domainname: "{{influx_domainname}}"
|
domainname: "{{influx_domainname}}"
|
||||||
@@ -20,7 +9,8 @@
|
|||||||
published_ports:
|
published_ports:
|
||||||
- "{{influx_pubport}}:8086"
|
- "{{influx_pubport}}:8086"
|
||||||
volumes:
|
volumes:
|
||||||
- "ed-influxdb-data-2:/var/lib/influxdb2" # -2 FIXME
|
- "ed-influxdb-data:/var/lib/influxdb2"
|
||||||
|
- "ed-influxdb-config:/etc/influxdb2"
|
||||||
- "/container/volumes/influxdb-backup/:/backup"
|
- "/container/volumes/influxdb-backup/:/backup"
|
||||||
env:
|
env:
|
||||||
DOCKER_INFLUXDB_INIT_MODE: setup
|
DOCKER_INFLUXDB_INIT_MODE: setup
|
||||||
@@ -34,39 +24,44 @@
|
|||||||
networks_cli_compatible: True
|
networks_cli_compatible: True
|
||||||
|
|
||||||
- add_host:
|
- add_host:
|
||||||
name: ed-influxdb-2
|
name: ed-influxdb
|
||||||
ansible_connection: docker
|
ansible_connection: docker
|
||||||
# ansible_docker_extra_args: "-H=ssh://ed-c7-1.virt.magni.thoto.net" # FIXME
|
# ansible_docker_extra_args: "-H=ssh://ed-c7-1.virt.magni.thoto.net" # FIXME
|
||||||
ansible_docker_extra_args: "-H=ssh://{{ansible_host}}" # FIXME
|
ansible_docker_extra_args: "-H=ssh://{{ansible_host}}" # FIXME
|
||||||
changed_when: False
|
changed_when: False
|
||||||
|
|
||||||
- wait_for: # FIXME: does not work right -> fetch token fails
|
- name: wait for influx to run
|
||||||
port: "{{influx_pubport}}"
|
raw: until curl http://localhost:8086 ; do sleep 1 ; done
|
||||||
|
changed_when: False
|
||||||
|
delegate_to: ed-influxdb
|
||||||
|
|
||||||
- name: "fetch auth token"
|
- name: fetch auth token
|
||||||
raw: influx auth list --user my-user --hide-headers --json
|
raw: influx auth list --user my-user --hide-headers --json
|
||||||
register: influx_token_fetch
|
register: influx_token_fetch
|
||||||
changed_when: False
|
changed_when: False
|
||||||
delegate_to: ed-influxdb-2
|
delegate_to: ed-influxdb
|
||||||
|
|
||||||
- set_fact:
|
- name: set admin token
|
||||||
|
set_fact:
|
||||||
influx_admin_token:
|
influx_admin_token:
|
||||||
"{{(influx_token_fetch.stdout | from_json | first).token}}"
|
"{{(influx_token_fetch.stdout | from_json | first).token}}"
|
||||||
|
|
||||||
- influx_bucket:
|
- name: create bucket for cobald
|
||||||
|
influx_bucket:
|
||||||
base: "http://localhost:{{influx_pubport}}"
|
base: "http://localhost:{{influx_pubport}}"
|
||||||
org: "my-org"
|
org: "my-org"
|
||||||
auth_token: "{{influx_admin_token}}"
|
auth_token: "{{influx_admin_token}}"
|
||||||
name: "{{influx_bucket}}"
|
name: "{{influx_bucket}}"
|
||||||
|
|
||||||
- name: "create dashboard"
|
- name: create dashboard
|
||||||
influx_dashboard:
|
influx_dashboard:
|
||||||
base: "http://localhost:{{influx_pubport}}"
|
base: "http://localhost:{{influx_pubport}}"
|
||||||
org: "my-org"
|
org: "my-org"
|
||||||
auth_token: "{{influx_admin_token}}"
|
auth_token: "{{influx_admin_token}}"
|
||||||
data: "{{lookup('file', 'influxdb-dashboard-cobald.json')}}"
|
data: "{{lookup('file', 'influxdb-dashboard-cobald.json')}}"
|
||||||
|
|
||||||
- influx_token:
|
- name: create token for telegraf
|
||||||
|
influx_token:
|
||||||
base: "http://localhost:{{influx_pubport}}"
|
base: "http://localhost:{{influx_pubport}}"
|
||||||
org: "my-org"
|
org: "my-org"
|
||||||
auth_token: "{{influx_admin_token}}"
|
auth_token: "{{influx_admin_token}}"
|
||||||
|
@@ -38,9 +38,6 @@
|
|||||||
group: docker
|
group: docker
|
||||||
when: False
|
when: False
|
||||||
|
|
||||||
- set_fact:
|
|
||||||
docker_network: slurm
|
|
||||||
|
|
||||||
- docker_network:
|
- docker_network:
|
||||||
name: "{{docker_network}}"
|
name: "{{docker_network}}"
|
||||||
state: present
|
state: present
|
||||||
@@ -51,10 +48,21 @@
|
|||||||
name: git
|
name: git
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
- file:
|
||||||
|
path: "{{item}}"
|
||||||
|
owner: "{{unpriv_user}}"
|
||||||
|
group: "{{unpriv_user}}"
|
||||||
|
mode: "a=rx,u=rwx"
|
||||||
|
state: directory
|
||||||
|
with_items:
|
||||||
|
- "~{{unpriv_user}}/cobald/modules"
|
||||||
|
- "~{{unpriv_user}}/cobald"
|
||||||
|
|
||||||
- git:
|
- git:
|
||||||
repo: https://github.com/thoto/cobald
|
repo: https://github.com/thoto/cobald
|
||||||
dest: "~{{unpriv_user}}/cobald-src"
|
dest: "~{{unpriv_user}}/cobald-src"
|
||||||
version: bugfix/mixed_construction_methods
|
version: bugfix/mixed_construction_methods
|
||||||
|
update: no
|
||||||
become: yes
|
become: yes
|
||||||
become_user: "{{unpriv_user}}"
|
become_user: "{{unpriv_user}}"
|
||||||
register: cobald_git_pull
|
register: cobald_git_pull
|
||||||
@@ -72,10 +80,6 @@
|
|||||||
database: passwd
|
database: passwd
|
||||||
key: "{{unpriv_user}}"
|
key: "{{unpriv_user}}"
|
||||||
|
|
||||||
- import_tasks: telegraf.yml
|
|
||||||
vars:
|
|
||||||
docker_network: cobald
|
|
||||||
|
|
||||||
- name: run pip install
|
- name: run pip install
|
||||||
docker_container:
|
docker_container:
|
||||||
image: cobald
|
image: cobald
|
||||||
@@ -96,10 +100,18 @@
|
|||||||
run: "{{tardis_git_pull.changed}}"
|
run: "{{tardis_git_pull.changed}}"
|
||||||
when: item.run
|
when: item.run
|
||||||
|
|
||||||
|
- import_tasks: telegraf.yml
|
||||||
|
|
||||||
|
- docker_container_info:
|
||||||
|
name: cobald
|
||||||
|
register: cobald_container_info
|
||||||
|
|
||||||
- docker_container:
|
- docker_container:
|
||||||
name: cobald
|
name: cobald
|
||||||
image: cobald
|
image: cobald
|
||||||
hostname: cobald
|
hostname: |-
|
||||||
|
{{cobald_container_info.container.Config.Hostname | default('cobald-'+
|
||||||
|
lookup('password', '/dev/null chars=ascii_lowercase length=6')) }}
|
||||||
domainname: cobald.local
|
domainname: cobald.local
|
||||||
volumes:
|
volumes:
|
||||||
- "~{{unpriv_user}}/cobald:/etc/cobald"
|
- "~{{unpriv_user}}/cobald:/etc/cobald"
|
||||||
@@ -113,4 +125,6 @@
|
|||||||
detach: True
|
detach: True
|
||||||
cleanup: True
|
cleanup: True
|
||||||
interactive: True
|
interactive: True
|
||||||
command: /bin/bash
|
# command: /bin/bash
|
||||||
|
# python3 -m cobald.daemon /etc/cobald/config.yaml
|
||||||
|
command: python3 -m cobald.daemon /etc/cobald/config.yaml
|
||||||
|
@@ -20,7 +20,8 @@
|
|||||||
owner: "{{unpriv_user}}"
|
owner: "{{unpriv_user}}"
|
||||||
group: docker
|
group: docker
|
||||||
|
|
||||||
- docker_image:
|
- name: docker image for telegraf
|
||||||
|
docker_image:
|
||||||
name: "ed-telegraf"
|
name: "ed-telegraf"
|
||||||
build:
|
build:
|
||||||
pull: False
|
pull: False
|
||||||
@@ -28,25 +29,32 @@
|
|||||||
source: build
|
source: build
|
||||||
force_source: "{{cobald_cp_telegraf_dockerfile.changed}}"
|
force_source: "{{cobald_cp_telegraf_dockerfile.changed}}"
|
||||||
|
|
||||||
- block:
|
- set_fact:
|
||||||
|
influx_hostname: "ed-influxdb"
|
||||||
|
influx_domainname: "cobald.local"
|
||||||
|
influx_bucket: batleth
|
||||||
|
tags: influxdb
|
||||||
|
|
||||||
- import_tasks: influxdb.yml
|
- import_tasks: influxdb.yml
|
||||||
tags: influxdb
|
tags: influxdb
|
||||||
|
|
||||||
- template:
|
- set_fact:
|
||||||
|
# influx_url: "http://{{influx_hostname}}.{{influx_domainname}}:8086"
|
||||||
|
influx_url: "http://{{influx_hostname}}:8086"
|
||||||
|
tags: influxdb
|
||||||
|
|
||||||
|
- name: generate telegraf config
|
||||||
|
template:
|
||||||
src: telegraf.conf.j2
|
src: telegraf.conf.j2
|
||||||
dest: /container/volumes/telegraf/telegraf.conf
|
dest: /container/volumes/telegraf/telegraf.conf
|
||||||
owner: "{{unpriv_user}}"
|
owner: "{{unpriv_user}}"
|
||||||
group: docker
|
group: docker
|
||||||
vars:
|
vars:
|
||||||
# influx_url: "http://{{influx_hostname}}.{{influx_domainname}}:8086"
|
|
||||||
influx_url: "http://{{influx_hostname}}:8086"
|
|
||||||
influx_token: "{{influx_telegraf_token.token}}"
|
influx_token: "{{influx_telegraf_token.token}}"
|
||||||
vars:
|
register: telegraf_config_gen
|
||||||
influx_hostname: "ed-influxdb"
|
|
||||||
influx_domainname: "cobald.local"
|
|
||||||
influx_bucket: batleth
|
|
||||||
|
|
||||||
- docker_container:
|
- name: run telegraf container
|
||||||
|
docker_container:
|
||||||
name: ed-telegraf
|
name: ed-telegraf
|
||||||
image: ed-telegraf
|
image: ed-telegraf
|
||||||
hostname: telegraf
|
hostname: telegraf
|
||||||
@@ -56,7 +64,10 @@
|
|||||||
volumes:
|
volumes:
|
||||||
- "/container/volumes/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro"
|
- "/container/volumes/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro"
|
||||||
state: started
|
state: started
|
||||||
|
recreate: "{{ telegraf_config_gen.changed | default(False) | bool }}"
|
||||||
detach: True
|
detach: True
|
||||||
# cleanup: True
|
# cleanup: True
|
||||||
networks_cli_compatible: True
|
networks_cli_compatible: True
|
||||||
|
|
||||||
|
- import_tasks: grafana.yml
|
||||||
|
tags: influxdb
|
||||||
|
Reference in New Issue
Block a user