diff --git a/deploy/asapo_orchestration_docker/scripts/asapo.auto.tfvars b/deploy/asapo_orchestration_docker/scripts/asapo.auto.tfvars index 78479b1e0c134913db2e63f1619843b977ce903e..6c4e698619f8966693a002d3fca2e3250ec7ff67 100644 --- a/deploy/asapo_orchestration_docker/scripts/asapo.auto.tfvars +++ b/deploy/asapo_orchestration_docker/scripts/asapo.auto.tfvars @@ -8,7 +8,7 @@ nginx_port = 8401 nginx_port_stream = 8402 nginx_version = "1.14" -influxdb_total_memory_size = "256" +influxdb_total_memory_size = "1024" influxdb_version = "latest" telegraf_total_memory_size = "256" diff --git a/deploy/asapo_orchestration_docker/scripts/fluent-bit-cluster-custom-parsers.conf b/deploy/asapo_orchestration_docker/scripts/fluent-bit-cluster-custom-parsers.conf new file mode 100644 index 0000000000000000000000000000000000000000..e06d8994dfb0d7adb5c61c0c6a413731eb31ee60 --- /dev/null +++ b/deploy/asapo_orchestration_docker/scripts/fluent-bit-cluster-custom-parsers.conf @@ -0,0 +1,5 @@ +[PARSER] + Name level + Format regex + # from https://github.com/grafana/grafana/blob/917860c4d396cf9ce22127fb39159fe2a1e09a5e/packages/grafana-data/src/types/logs.ts + Regex (?i)^(?<log>.*?\b(?<level>trace|dbug|debug|notice|info|warn|warning|err|eror|error|crit|critical|emerg|alert|exception)\b.*) diff --git a/deploy/asapo_orchestration_docker/scripts/fluent-bit-cluster.conf.tpl b/deploy/asapo_orchestration_docker/scripts/fluent-bit-cluster.conf.tpl new file mode 100644 index 0000000000000000000000000000000000000000..8cd64e714b4dbd89e24a43ca6d2e1bd4bcac253b --- /dev/null +++ b/deploy/asapo_orchestration_docker/scripts/fluent-bit-cluster.conf.tpl @@ -0,0 +1,68 @@ +[SERVICE] + Parsers_File /etc/td-agent-bit/parsers.conf + Parsers_File /var/run/asapo/fluent-bit-cluster-custom-parsers.conf + +{{ range ("nomad consul supervisord" | split " ") }} +[INPUT] + Name tail + Path /var/log/supervisord/{{.}}*.log + Tag asapo.{{.}} + # Tag_Regex .*/(?<service>[^-.]*)(-(?<channel>stderr|stdout))?.* + DB ${NOMAD_TASK_DIR}/logs.db + Parser level +{{ end }} + +{{ range ("influxdb grafana" | split " ") }} +[INPUT] + Name tail + Path ${NOMAD_ALLOC_DIR}/${NOMAD_ALLOC_ID}/alloc/logs/{{.}}*.0 + Tag asapo.{{.}} + # Tag_Regex .*/(?<service>.*).(?<channel>stderr|stdout).* + DB ${NOMAD_TASK_DIR}/logs.db + Parser level +{{ end }} + +[FILTER] + Name modify + Match * + Condition Key_value_matches level (?i)^d.* + Set level DEBUG + +[FILTER] + Name modify + Match * + Condition Key_value_matches level (?i)^(i.*|no.*) + Set level INFO + +[FILTER] + Name modify + Match * + Condition Key_value_matches level (?i)^w.* + Set level WARNING + +[FILTER] + Name modify + Match * + Condition Key_value_matches level (?i)^er.* + Set level ERROR + +[FILTER] + Name modify + Match * + Condition Key_value_matches level (?i)^(c.*|a.*|emerg|exception) + Set level CRITICAL + +[FILTER] + Name modify + Match * + Add level UNKNOWN + +{{ range service "influxdb" }} +[OUTPUT] + Name influxdb + Match * + Host {{ .Address }} + Port {{ .Port }} + Database logs + Tag_Keys level +{{ end }} diff --git a/deploy/asapo_orchestration_docker/scripts/fluent-bit-nginx.conf.tpl b/deploy/asapo_orchestration_docker/scripts/fluent-bit-nginx.conf.tpl new file mode 100644 index 0000000000000000000000000000000000000000..b407e0e3798dda4b247c097758232cdeaa7b1daa --- /dev/null +++ b/deploy/asapo_orchestration_docker/scripts/fluent-bit-nginx.conf.tpl @@ -0,0 +1,55 @@ +[SERVICE] + Parsers_File /etc/td-agent-bit/parsers.conf + Parsers_File /var/run/asapo/fluent-bit-cluster-custom-parsers.conf + +[INPUT] + Name tail + Path ${NOMAD_ALLOC_DIR}/${NOMAD_ALLOC_ID}/alloc/logs/nginx*.0 + Tag asapo.nginx + DB ${NOMAD_TASK_DIR}/logs.db + Parser level + +[FILTER] + Name modify + Match * + Condition Key_value_matches level (?i)^d.* + Set level DEBUG + +[FILTER] + Name modify + Match * + Condition Key_value_matches level (?i)^(i.*|no.*) + Set level INFO + +[FILTER] + Name modify + Match * + Condition Key_value_matches level (?i)^w.* + Set level WARNING + +[FILTER] + Name modify + Match * + Condition Key_value_matches level (?i)^er.* + Set level ERROR + +[FILTER] + Name modify + Match * + Condition Key_value_matches level (?i)^(c.*|a.*|emerg|exception) + Set level CRITICAL + +[FILTER] + Name modify + Match * + Add level UNKNOWN + +{{ range service "influxdb" }} +[OUTPUT] + Name influxdb + Match * + Host {{ .Address }} + Port {{ .Port }} + Database logs + Tag_Keys level +{{ end }} diff --git a/deploy/asapo_orchestration_docker/scripts/grafana/dashboards/grafana.json b/deploy/asapo_orchestration_docker/scripts/grafana/dashboards/grafana.json index 2bf30cbb561b5c1c37ae7d8e4a8ebdcec6dfe86f..b528d8ec3b59fdba5a3efff9ef7718098edb813f 100644 --- a/deploy/asapo_orchestration_docker/scripts/grafana/dashboards/grafana.json +++ b/deploy/asapo_orchestration_docker/scripts/grafana/dashboards/grafana.json @@ -15,139 +15,35 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 1, - "iteration": 1575563736443, + "id": 2, + "iteration": 1584466187479, "links": [], "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "InfluxDB", - "fill": 1, - "fillGradient": 0, + "collapsed": false, + "datasource": null, "gridPos": { - "h": 8, - "w": 22, + "h": 1, + "w": 24, "x": 0, "y": 0 }, - "hiddenSeries": false, - "id": 6, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "linear" - ], - "type": "fill" - } - ], - "measurement": "nomad_client_allocs", - "orderByTime": "ASC", - "policy": "default", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "memory_rss" - ], - "type": "field" - }, - { - "params": [], - "type": "sum" - } - ] - ], - "tags": [ - { - "key": "task", - "operator": "=~", - "value": "/^$task$/" - } - ] + "id": 2, + "panels": [], + "repeat": "task", + "scopedVars": { + "task": { + "selected": false, + "text": "asapo-averager", + "value": "asapo-averager" } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Total Memory Usage", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] }, - "yaxes": [ - { - "format": "decbytes", - "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 - } + "title": "$task", + "type": "row" }, { "cacheTimeout": null, "colorBackground": true, - "colorPostfix": false, - "colorPrefix": false, "colorValue": false, "colors": [ "#d44a3a", @@ -155,7 +51,6 @@ "#299c46" ], "datasource": "InfluxDB", - "description": "", "format": "none", "gauge": { "maxValue": 100, @@ -166,11 +61,11 @@ }, "gridPos": { "h": 5, - "w": 4, - "x": 1, - "y": 8 + "w": 3, + "x": 0, + "y": 1 }, - "id": 13, + "id": 30, "interval": null, "links": [], "mappingType": 1, @@ -187,7 +82,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, - "options": {}, + "pluginVersion": "6.6.2", "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -199,6 +94,13 @@ "to": "null" } ], + "scopedVars": { + "task": { + "selected": false, + "text": "asapo-averager", + "value": "asapo-averager" + } + }, "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, @@ -210,20 +112,7 @@ "tableColumn": "", "targets": [ { - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], + "groupBy": [], "measurement": "consul_health_checks", "orderByTime": "ASC", "policy": "default", @@ -239,58 +128,50 @@ }, { "params": [], - "type": "mean" + "type": "last" } ] ], "tags": [ { "key": "service_name", - "operator": "=", - "value": "telegraf" + "operator": "=~", + "value": "/^$task$/" } ] } ], - "thresholds": "1,1", - "timeFrom": "20s", + "thresholds": "0.5,0.5", + "timeFrom": null, "timeShift": null, - "title": "Telegraf", + "title": "Status", "type": "singlestat", "valueFontSize": "80%", "valueMaps": [ { "op": "=", - "text": "Not running", - "value": "0" - }, - { - "op": "=", - "text": "Running", + "text": "running", "value": "1" }, { "op": "=", - "text": "", - "value": "null" + "text": "not running", + "value": "0" } ], - "valueName": "current" + "valueName": "avg" }, { "cacheTimeout": null, - "colorBackground": true, - "colorPostfix": false, - "colorPrefix": false, - "colorValue": false, + "colorBackground": false, + "colorValue": true, "colors": [ - "#d44a3a", + "#299c46", "rgba(237, 129, 40, 0.89)", - "#299c46" + "#d44a3a" ], "datasource": "InfluxDB", - "description": "", - "format": "none", + "format": "percent", "gauge": { "maxValue": 100, "minValue": 0, @@ -300,11 +181,11 @@ }, "gridPos": { "h": 5, - "w": 4, - "x": 7, - "y": 8 + "w": 3, + "x": 3, + "y": 1 }, - "id": 15, + "id": 12, "interval": null, "links": [], "mappingType": 1, @@ -321,7 +202,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, - "options": {}, + "pluginVersion": "6.6.2", "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -333,17 +214,25 @@ "to": "null" } ], + "scopedVars": { + "task": { + "selected": false, + "text": "asapo-averager", + "value": "asapo-averager" + } + }, "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, + "full": true, "lineColor": "rgb(31, 120, 193)", - "show": false, + "show": true, "ymax": null, "ymin": null }, "tableColumn": "", "targets": [ { + "alias": "CPU", "groupBy": [ { "params": [ @@ -358,7 +247,7 @@ "type": "fill" } ], - "measurement": "consul_health_checks", + "measurement": "nomad_client_allocs", "orderByTime": "ASC", "policy": "default", "refId": "A", @@ -367,7 +256,7 @@ [ { "params": [ - "passing" + "cpu_total_percent" ], "type": "field" }, @@ -379,52 +268,39 @@ ], "tags": [ { - "key": "service_name", - "operator": "=", - "value": "influxdb" + "key": "task", + "operator": "=~", + "value": "/^$task$/" } ] } ], - "thresholds": "1,1", - "timeFrom": "20s", + "thresholds": "", + "timeFrom": null, "timeShift": null, - "title": "InfluxDB", + "title": "CPU", "type": "singlestat", - "valueFontSize": "80%", + "valueFontSize": "200%", "valueMaps": [ { "op": "=", - "text": "Not running", - "value": "0" - }, - { - "op": "=", - "text": "Running", - "value": "1" - }, - { - "op": "=", - "text": "", + "text": "N/A", "value": "null" } ], - "valueName": "current" + "valueName": "avg" }, { "cacheTimeout": null, - "colorBackground": true, - "colorPostfix": false, - "colorPrefix": false, - "colorValue": false, + "colorBackground": false, + "colorValue": true, "colors": [ - "#d44a3a", + "#299c46", "rgba(237, 129, 40, 0.89)", - "#299c46" + "#d44a3a" ], "datasource": "InfluxDB", - "description": "", - "format": "none", + "format": "percent", "gauge": { "maxValue": 100, "minValue": 0, @@ -434,14 +310,14 @@ }, "gridPos": { "h": 5, - "w": 4, - "x": 12, - "y": 8 + "w": 3, + "x": 6, + "y": 1 }, - "id": 17, + "id": 31, "interval": null, "links": [], - "mappingType": 2, + "mappingType": 1, "mappingTypes": [ { "name": "value to text", @@ -455,7 +331,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, - "options": {}, + "pluginVersion": "6.6.2", "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -465,24 +341,27 @@ "from": "null", "text": "N/A", "to": "null" - }, - { - "from": "0", - "text": "", - "to": "0" } ], + "scopedVars": { + "task": { + "selected": false, + "text": "asapo-averager", + "value": "asapo-averager" + } + }, "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, + "full": true, "lineColor": "rgb(31, 120, 193)", - "show": false, + "show": true, "ymax": null, "ymin": null }, "tableColumn": "", "targets": [ { + "alias": "RAM", "groupBy": [ { "params": [ @@ -497,7 +376,7 @@ "type": "fill" } ], - "measurement": "consul_health_checks", + "measurement": "nomad_client_allocs", "orderByTime": "ASC", "policy": "default", "refId": "A", @@ -506,117 +385,3236 @@ [ { "params": [ - "passing" + "memory_rss" ], "type": "field" }, { "params": [], - "type": "sum" + "type": "mean" + }, + { + "params": [ + " /mean(memory_allocated) * 100" + ], + "type": "math" } ] ], "tags": [ { - "key": "service_name", - "operator": "=", - "value": "nginx" + "key": "task", + "operator": "=~", + "value": "/^$task$/" } ] } ], - "thresholds": "1,1", - "timeFrom": "20s", + "thresholds": "", + "timeFrom": null, "timeShift": null, - "title": "Nginx", + "title": "RAM", "type": "singlestat", - "valueFontSize": "80%", + "valueFontSize": "200%", "valueMaps": [ { "op": "=", - "text": "Not running", - "value": "0" - }, - { - "op": "=", - "text": "Running", - "value": "1" - }, - { - "op": "=", - "text": "", + "text": "N/A", "value": "null" } ], - "valueName": "total" + "valueName": "current" }, { - "cacheTimeout": null, - "colorBackground": true, - "colorPostfix": false, - "colorPrefix": false, - "colorValue": false, - "colors": [ - "#d44a3a", - "rgba(237, 129, 40, 0.89)", - "#299c46" - ], - "datasource": "InfluxDB", - "description": "", - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB-logs", + "fill": 1, + "fillGradient": 0, "gridPos": { "h": 5, - "w": 4, - "x": 1, - "y": 13 + "w": 7, + "x": 9, + "y": 1 }, - "id": 14, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ + "hiddenSeries": false, + "id": 53, + "interval": "5m", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": false, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "scopedVars": { + "task": { + "selected": false, + "text": "asapo-averager", + "value": "asapo-averager" + } + }, + "seriesOverrides": [ { - "name": "value to text", - "value": 1 + "alias": "ERROR", + "color": "#F2495C" }, { - "name": "range to text", + "alias": "WARNING", + "color": "#FADE2A" + }, + { + "alias": "INFO", + "color": "#73BF69" + }, + { + "alias": "UNKNOWN", + "color": "rgb(125, 125, 125)" + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "alias": "$tag_level", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "level" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "limit": "", + "measurement": "/^.*$task$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "log" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "slimit": "", + "tags": [] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Log Count", + "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 + } + }, + { + "datasource": "InfluxDB-logs", + "gridPos": { + "h": 5, + "w": 8, + "x": 16, + "y": 1 + }, + "id": 80, + "options": { + "showLabels": false, + "showTime": true, + "sortOrder": "Descending", + "wrapLogMessage": true + }, + "scopedVars": { + "task": { + "selected": false, + "text": "asapo-averager", + "value": "asapo-averager" + } + }, + "targets": [ + { + "groupBy": [], + "limit": "100", + "measurement": "/^.*$task$/", + "orderByTime": "DESC", + "policy": "default", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "log" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Log Messages", + "type": "logs" + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 6 + }, + "id": 147, + "panels": [], + "repeat": null, + "repeatIteration": 1584466187479, + "repeatPanelId": 2, + "scopedVars": { + "task": { + "selected": false, + "text": "asapo-nexus-writer", + "value": "asapo-nexus-writer" + } + }, + "title": "$task", + "type": "row" + }, + { + "cacheTimeout": null, + "colorBackground": true, + "colorValue": false, + "colors": [ + "#d44a3a", + "rgba(237, 129, 40, 0.89)", + "#299c46" + ], + "datasource": "InfluxDB", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 0, + "y": 7 + }, + "id": 148, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.6.2", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "repeatIteration": 1584466187479, + "repeatPanelId": 30, + "repeatedByRow": true, + "scopedVars": { + "task": { + "selected": false, + "text": "asapo-nexus-writer", + "value": "asapo-nexus-writer" + } + }, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [], + "measurement": "consul_health_checks", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "passing" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [ + { + "key": "service_name", + "operator": "=~", + "value": "/^$task$/" + } + ] + } + ], + "thresholds": "0.5,0.5", + "timeFrom": null, + "timeShift": null, + "title": "Status", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "running", + "value": "1" + }, + { + "op": "=", + "text": "not running", + "value": "0" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 3, + "y": 7 + }, + "id": 149, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.6.2", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "repeatIteration": 1584466187479, + "repeatPanelId": 12, + "repeatedByRow": true, + "scopedVars": { + "task": { + "selected": false, + "text": "asapo-nexus-writer", + "value": "asapo-nexus-writer" + } + }, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": true, + "lineColor": "rgb(31, 120, 193)", + "show": true, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "alias": "CPU", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "nomad_client_allocs", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "cpu_total_percent" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "key": "task", + "operator": "=~", + "value": "/^$task$/" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "CPU", + "type": "singlestat", + "valueFontSize": "200%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 6, + "y": 7 + }, + "id": 150, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.6.2", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "repeatIteration": 1584466187479, + "repeatPanelId": 31, + "repeatedByRow": true, + "scopedVars": { + "task": { + "selected": false, + "text": "asapo-nexus-writer", + "value": "asapo-nexus-writer" + } + }, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": true, + "lineColor": "rgb(31, 120, 193)", + "show": true, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "alias": "RAM", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "nomad_client_allocs", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "memory_rss" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + " /mean(memory_allocated) * 100" + ], + "type": "math" + } + ] + ], + "tags": [ + { + "key": "task", + "operator": "=~", + "value": "/^$task$/" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "RAM", + "type": "singlestat", + "valueFontSize": "200%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB-logs", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 7, + "x": 9, + "y": 7 + }, + "hiddenSeries": false, + "id": 151, + "interval": "5m", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": false, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "repeatIteration": 1584466187479, + "repeatPanelId": 53, + "repeatedByRow": true, + "scopedVars": { + "task": { + "selected": false, + "text": "asapo-nexus-writer", + "value": "asapo-nexus-writer" + } + }, + "seriesOverrides": [ + { + "alias": "ERROR", + "color": "#F2495C" + }, + { + "alias": "WARNING", + "color": "#FADE2A" + }, + { + "alias": "INFO", + "color": "#73BF69" + }, + { + "alias": "UNKNOWN", + "color": "rgb(125, 125, 125)" + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "alias": "$tag_level", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "level" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "limit": "", + "measurement": "/^.*$task$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "log" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "slimit": "", + "tags": [] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Log Count", + "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 + } + }, + { + "datasource": "InfluxDB-logs", + "gridPos": { + "h": 5, + "w": 8, + "x": 16, + "y": 7 + }, + "id": 152, + "options": { + "showLabels": false, + "showTime": true, + "sortOrder": "Descending", + "wrapLogMessage": true + }, + "repeatIteration": 1584466187479, + "repeatPanelId": 80, + "repeatedByRow": true, + "scopedVars": { + "task": { + "selected": false, + "text": "asapo-nexus-writer", + "value": "asapo-nexus-writer" + } + }, + "targets": [ + { + "groupBy": [], + "limit": "100", + "measurement": "/^.*$task$/", + "orderByTime": "DESC", + "policy": "default", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "log" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Log Messages", + "type": "logs" + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 153, + "panels": [], + "repeat": null, + "repeatIteration": 1584466187479, + "repeatPanelId": 2, + "scopedVars": { + "task": { + "selected": false, + "text": "grafana", + "value": "grafana" + } + }, + "title": "$task", + "type": "row" + }, + { + "cacheTimeout": null, + "colorBackground": true, + "colorValue": false, + "colors": [ + "#d44a3a", + "rgba(237, 129, 40, 0.89)", + "#299c46" + ], + "datasource": "InfluxDB", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 0, + "y": 13 + }, + "id": 154, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.6.2", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "repeatIteration": 1584466187479, + "repeatPanelId": 30, + "repeatedByRow": true, + "scopedVars": { + "task": { + "selected": false, + "text": "grafana", + "value": "grafana" + } + }, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [], + "measurement": "consul_health_checks", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "passing" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [ + { + "key": "service_name", + "operator": "=~", + "value": "/^$task$/" + } + ] + } + ], + "thresholds": "0.5,0.5", + "timeFrom": null, + "timeShift": null, + "title": "Status", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "running", + "value": "1" + }, + { + "op": "=", + "text": "not running", + "value": "0" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 3, + "y": 13 + }, + "id": 155, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.6.2", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "repeatIteration": 1584466187479, + "repeatPanelId": 12, + "repeatedByRow": true, + "scopedVars": { + "task": { + "selected": false, + "text": "grafana", + "value": "grafana" + } + }, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": true, + "lineColor": "rgb(31, 120, 193)", + "show": true, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "alias": "CPU", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "nomad_client_allocs", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "cpu_total_percent" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "key": "task", + "operator": "=~", + "value": "/^$task$/" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "CPU", + "type": "singlestat", + "valueFontSize": "200%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 6, + "y": 13 + }, + "id": 156, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.6.2", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "repeatIteration": 1584466187479, + "repeatPanelId": 31, + "repeatedByRow": true, + "scopedVars": { + "task": { + "selected": false, + "text": "grafana", + "value": "grafana" + } + }, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": true, + "lineColor": "rgb(31, 120, 193)", + "show": true, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "alias": "RAM", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "nomad_client_allocs", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "memory_rss" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + " /mean(memory_allocated) * 100" + ], + "type": "math" + } + ] + ], + "tags": [ + { + "key": "task", + "operator": "=~", + "value": "/^$task$/" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "RAM", + "type": "singlestat", + "valueFontSize": "200%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB-logs", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 7, + "x": 9, + "y": 13 + }, + "hiddenSeries": false, + "id": 157, + "interval": "5m", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": false, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "repeatIteration": 1584466187479, + "repeatPanelId": 53, + "repeatedByRow": true, + "scopedVars": { + "task": { + "selected": false, + "text": "grafana", + "value": "grafana" + } + }, + "seriesOverrides": [ + { + "alias": "ERROR", + "color": "#F2495C" + }, + { + "alias": "WARNING", + "color": "#FADE2A" + }, + { + "alias": "INFO", + "color": "#73BF69" + }, + { + "alias": "UNKNOWN", + "color": "rgb(125, 125, 125)" + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "alias": "$tag_level", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "level" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "limit": "", + "measurement": "/^.*$task$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "log" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "slimit": "", + "tags": [] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Log Count", + "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 + } + }, + { + "datasource": "InfluxDB-logs", + "gridPos": { + "h": 5, + "w": 8, + "x": 16, + "y": 13 + }, + "id": 158, + "options": { + "showLabels": false, + "showTime": true, + "sortOrder": "Descending", + "wrapLogMessage": true + }, + "repeatIteration": 1584466187479, + "repeatPanelId": 80, + "repeatedByRow": true, + "scopedVars": { + "task": { + "selected": false, + "text": "grafana", + "value": "grafana" + } + }, + "targets": [ + { + "groupBy": [], + "limit": "100", + "measurement": "/^.*$task$/", + "orderByTime": "DESC", + "policy": "default", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "log" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Log Messages", + "type": "logs" + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 18 + }, + "id": 159, + "panels": [], + "repeat": null, + "repeatIteration": 1584466187479, + "repeatPanelId": 2, + "scopedVars": { + "task": { + "selected": false, + "text": "influxdb", + "value": "influxdb" + } + }, + "title": "$task", + "type": "row" + }, + { + "cacheTimeout": null, + "colorBackground": true, + "colorValue": false, + "colors": [ + "#d44a3a", + "rgba(237, 129, 40, 0.89)", + "#299c46" + ], + "datasource": "InfluxDB", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 0, + "y": 19 + }, + "id": 160, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.6.2", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "repeatIteration": 1584466187479, + "repeatPanelId": 30, + "repeatedByRow": true, + "scopedVars": { + "task": { + "selected": false, + "text": "influxdb", + "value": "influxdb" + } + }, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [], + "measurement": "consul_health_checks", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "passing" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [ + { + "key": "service_name", + "operator": "=~", + "value": "/^$task$/" + } + ] + } + ], + "thresholds": "0.5,0.5", + "timeFrom": null, + "timeShift": null, + "title": "Status", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "running", + "value": "1" + }, + { + "op": "=", + "text": "not running", + "value": "0" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 3, + "y": 19 + }, + "id": 161, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.6.2", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "repeatIteration": 1584466187479, + "repeatPanelId": 12, + "repeatedByRow": true, + "scopedVars": { + "task": { + "selected": false, + "text": "influxdb", + "value": "influxdb" + } + }, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": true, + "lineColor": "rgb(31, 120, 193)", + "show": true, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "alias": "CPU", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "nomad_client_allocs", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "cpu_total_percent" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "key": "task", + "operator": "=~", + "value": "/^$task$/" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "CPU", + "type": "singlestat", + "valueFontSize": "200%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 6, + "y": 19 + }, + "id": 162, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.6.2", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "repeatIteration": 1584466187479, + "repeatPanelId": 31, + "repeatedByRow": true, + "scopedVars": { + "task": { + "selected": false, + "text": "influxdb", + "value": "influxdb" + } + }, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": true, + "lineColor": "rgb(31, 120, 193)", + "show": true, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "alias": "RAM", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "nomad_client_allocs", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "memory_rss" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + " /mean(memory_allocated) * 100" + ], + "type": "math" + } + ] + ], + "tags": [ + { + "key": "task", + "operator": "=~", + "value": "/^$task$/" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "RAM", + "type": "singlestat", + "valueFontSize": "200%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB-logs", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 7, + "x": 9, + "y": 19 + }, + "hiddenSeries": false, + "id": 163, + "interval": "5m", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": false, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "repeatIteration": 1584466187479, + "repeatPanelId": 53, + "repeatedByRow": true, + "scopedVars": { + "task": { + "selected": false, + "text": "influxdb", + "value": "influxdb" + } + }, + "seriesOverrides": [ + { + "alias": "ERROR", + "color": "#F2495C" + }, + { + "alias": "WARNING", + "color": "#FADE2A" + }, + { + "alias": "INFO", + "color": "#73BF69" + }, + { + "alias": "UNKNOWN", + "color": "rgb(125, 125, 125)" + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "alias": "$tag_level", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "level" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "limit": "", + "measurement": "/^.*$task$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "log" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "slimit": "", + "tags": [] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Log Count", + "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 + } + }, + { + "datasource": "InfluxDB-logs", + "gridPos": { + "h": 5, + "w": 8, + "x": 16, + "y": 19 + }, + "id": 164, + "options": { + "showLabels": false, + "showTime": true, + "sortOrder": "Descending", + "wrapLogMessage": true + }, + "repeatIteration": 1584466187479, + "repeatPanelId": 80, + "repeatedByRow": true, + "scopedVars": { + "task": { + "selected": false, + "text": "influxdb", + "value": "influxdb" + } + }, + "targets": [ + { + "groupBy": [], + "limit": "100", + "measurement": "/^.*$task$/", + "orderByTime": "DESC", + "policy": "default", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "log" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Log Messages", + "type": "logs" + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 24 + }, + "id": 165, + "panels": [], + "repeat": null, + "repeatIteration": 1584466187479, + "repeatPanelId": 2, + "scopedVars": { + "task": { + "selected": false, + "text": "nginx", + "value": "nginx" + } + }, + "title": "$task", + "type": "row" + }, + { + "cacheTimeout": null, + "colorBackground": true, + "colorValue": false, + "colors": [ + "#d44a3a", + "rgba(237, 129, 40, 0.89)", + "#299c46" + ], + "datasource": "InfluxDB", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 0, + "y": 25 + }, + "id": 166, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.6.2", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "repeatIteration": 1584466187479, + "repeatPanelId": 30, + "repeatedByRow": true, + "scopedVars": { + "task": { + "selected": false, + "text": "nginx", + "value": "nginx" + } + }, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [], + "measurement": "consul_health_checks", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "passing" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [ + { + "key": "service_name", + "operator": "=~", + "value": "/^$task$/" + } + ] + } + ], + "thresholds": "0.5,0.5", + "timeFrom": null, + "timeShift": null, + "title": "Status", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "running", + "value": "1" + }, + { + "op": "=", + "text": "not running", + "value": "0" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 3, + "y": 25 + }, + "id": 167, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.6.2", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "repeatIteration": 1584466187479, + "repeatPanelId": 12, + "repeatedByRow": true, + "scopedVars": { + "task": { + "selected": false, + "text": "nginx", + "value": "nginx" + } + }, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": true, + "lineColor": "rgb(31, 120, 193)", + "show": true, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "alias": "CPU", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "nomad_client_allocs", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "cpu_total_percent" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "key": "task", + "operator": "=~", + "value": "/^$task$/" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "CPU", + "type": "singlestat", + "valueFontSize": "200%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 6, + "y": 25 + }, + "id": 168, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.6.2", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "repeatIteration": 1584466187479, + "repeatPanelId": 31, + "repeatedByRow": true, + "scopedVars": { + "task": { + "selected": false, + "text": "nginx", + "value": "nginx" + } + }, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": true, + "lineColor": "rgb(31, 120, 193)", + "show": true, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "alias": "RAM", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "nomad_client_allocs", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "memory_rss" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + " /mean(memory_allocated) * 100" + ], + "type": "math" + } + ] + ], + "tags": [ + { + "key": "task", + "operator": "=~", + "value": "/^$task$/" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "RAM", + "type": "singlestat", + "valueFontSize": "200%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB-logs", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 7, + "x": 9, + "y": 25 + }, + "hiddenSeries": false, + "id": 169, + "interval": "5m", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": false, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "repeatIteration": 1584466187479, + "repeatPanelId": 53, + "repeatedByRow": true, + "scopedVars": { + "task": { + "selected": false, + "text": "nginx", + "value": "nginx" + } + }, + "seriesOverrides": [ + { + "alias": "ERROR", + "color": "#F2495C" + }, + { + "alias": "WARNING", + "color": "#FADE2A" + }, + { + "alias": "INFO", + "color": "#73BF69" + }, + { + "alias": "UNKNOWN", + "color": "rgb(125, 125, 125)" + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "alias": "$tag_level", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "level" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "limit": "", + "measurement": "/^.*$task$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "log" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "slimit": "", + "tags": [] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Log Count", + "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 + } + }, + { + "datasource": "InfluxDB-logs", + "gridPos": { + "h": 5, + "w": 8, + "x": 16, + "y": 25 + }, + "id": 170, + "options": { + "showLabels": false, + "showTime": true, + "sortOrder": "Descending", + "wrapLogMessage": true + }, + "repeatIteration": 1584466187479, + "repeatPanelId": 80, + "repeatedByRow": true, + "scopedVars": { + "task": { + "selected": false, + "text": "nginx", + "value": "nginx" + } + }, + "targets": [ + { + "groupBy": [], + "limit": "100", + "measurement": "/^.*$task$/", + "orderByTime": "DESC", + "policy": "default", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "log" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Log Messages", + "type": "logs" + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 30 + }, + "id": 171, + "panels": [], + "repeat": null, + "repeatIteration": 1584466187479, + "repeatPanelId": 2, + "scopedVars": { + "task": { + "selected": false, + "text": "telegraf", + "value": "telegraf" + } + }, + "title": "$task", + "type": "row" + }, + { + "cacheTimeout": null, + "colorBackground": true, + "colorValue": false, + "colors": [ + "#d44a3a", + "rgba(237, 129, 40, 0.89)", + "#299c46" + ], + "datasource": "InfluxDB", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 0, + "y": 31 + }, + "id": 172, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.6.2", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "repeatIteration": 1584466187479, + "repeatPanelId": 30, + "repeatedByRow": true, + "scopedVars": { + "task": { + "selected": false, + "text": "telegraf", + "value": "telegraf" + } + }, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [], + "measurement": "consul_health_checks", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "passing" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [ + { + "key": "service_name", + "operator": "=~", + "value": "/^$task$/" + } + ] + } + ], + "thresholds": "0.5,0.5", + "timeFrom": null, + "timeShift": null, + "title": "Status", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "running", + "value": "1" + }, + { + "op": "=", + "text": "not running", + "value": "0" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 3, + "y": 31 + }, + "id": 173, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.6.2", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "repeatIteration": 1584466187479, + "repeatPanelId": 12, + "repeatedByRow": true, + "scopedVars": { + "task": { + "selected": false, + "text": "telegraf", + "value": "telegraf" + } + }, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": true, + "lineColor": "rgb(31, 120, 193)", + "show": true, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "alias": "CPU", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "nomad_client_allocs", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "cpu_total_percent" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "key": "task", + "operator": "=~", + "value": "/^$task$/" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "CPU", + "type": "singlestat", + "valueFontSize": "200%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 6, + "y": 31 + }, + "id": 174, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", "value": 2 } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "options": {}, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.6.2", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "repeatIteration": 1584466187479, + "repeatPanelId": 31, + "repeatedByRow": true, + "scopedVars": { + "task": { + "selected": false, + "text": "telegraf", + "value": "telegraf" + } + }, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": true, + "lineColor": "rgb(31, 120, 193)", + "show": true, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "alias": "RAM", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "nomad_client_allocs", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "memory_rss" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + " /mean(memory_allocated) * 100" + ], + "type": "math" + } + ] + ], + "tags": [ + { + "key": "task", + "operator": "=~", + "value": "/^$task$/" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "RAM", + "type": "singlestat", + "valueFontSize": "200%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB-logs", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 7, + "x": 9, + "y": 31 + }, + "hiddenSeries": false, + "id": 175, + "interval": "5m", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": false, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "repeatIteration": 1584466187479, + "repeatPanelId": 53, + "repeatedByRow": true, + "scopedVars": { + "task": { + "selected": false, + "text": "telegraf", + "value": "telegraf" + } + }, + "seriesOverrides": [ { - "from": "null", - "text": "N/A", - "to": "null" + "alias": "ERROR", + "color": "#F2495C" + }, + { + "alias": "WARNING", + "color": "#FADE2A" + }, + { + "alias": "INFO", + "color": "#73BF69" + }, + { + "alias": "UNKNOWN", + "color": "rgb(125, 125, 125)" } ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false, - "ymax": null, - "ymin": null - }, - "tableColumn": "", + "spaceLength": 10, + "stack": true, + "steppedLine": false, "targets": [ { + "alias": "$tag_level", "groupBy": [ { "params": [ @@ -624,6 +3622,12 @@ ], "type": "time" }, + { + "params": [ + "level" + ], + "type": "tag" + }, { "params": [ "null" @@ -631,7 +3635,8 @@ "type": "fill" } ], - "measurement": "consul_health_checks", + "limit": "", + "measurement": "/^.*$task$/", "orderByTime": "ASC", "policy": "default", "refId": "A", @@ -640,92 +3645,187 @@ [ { "params": [ - "passing" + "log" ], "type": "field" }, { "params": [], - "type": "mean" + "type": "count" } ] ], - "tags": [ - { - "key": "service_name", - "operator": "=", - "value": "grafana" - } - ] + "slimit": "", + "tags": [] } ], - "thresholds": "1,1", - "timeFrom": "20s", + "thresholds": [], + "timeFrom": null, + "timeRegions": [], "timeShift": null, - "title": "Grafana", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "Not running", - "value": "0" - }, + "title": "Log Count", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ { - "op": "=", - "text": "Running", - "value": "1" + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true }, { - "op": "=", - "text": "", - "value": "null" + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true } ], - "valueName": "current" + "yaxis": { + "align": false, + "alignLevel": null + } }, { - "datasource": "InfluxDB", + "datasource": "InfluxDB-logs", "gridPos": { "h": 5, - "w": 4, - "x": 6, - "y": 13 + "w": 8, + "x": 16, + "y": 31 }, - "hideTimeOverride": true, - "id": 4, + "id": 176, "options": { - "fieldOptions": { - "calcs": [ - "mean" - ], - "defaults": { - "mappings": [], - "max": 100, - "min": 0, - "thresholds": [ - { - "color": "green", - "value": null - }, + "showLabels": false, + "showTime": true, + "sortOrder": "Descending", + "wrapLogMessage": true + }, + "repeatIteration": 1584466187479, + "repeatPanelId": 80, + "repeatedByRow": true, + "scopedVars": { + "task": { + "selected": false, + "text": "telegraf", + "value": "telegraf" + } + }, + "targets": [ + { + "groupBy": [], + "limit": "100", + "measurement": "/^.*$task$/", + "orderByTime": "DESC", + "policy": "default", + "refId": "A", + "resultFormat": "table", + "select": [ + [ { - "color": "red", - "value": 80 + "params": [ + "log" + ], + "type": "field" } - ], - "title": "", - "unit": "percent" - }, - "override": {}, - "values": false - }, - "orientation": "horizontal", - "showThresholdLabels": false, - "showThresholdMarkers": true + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Log Messages", + "type": "logs" + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 36 + }, + "id": 112, + "panels": [], + "title": "Nomad", + "type": "row" + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB-logs", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 37 + }, + "hiddenSeries": false, + "id": 144, + "interval": "5m", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": false, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [] }, - "pluginVersion": "6.5.1", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "ERROR", + "color": "#F2495C" + }, + { + "alias": "WARNING", + "color": "#FADE2A" + }, + { + "alias": "INFO", + "color": "#73BF69" + }, + { + "alias": "UNKNOWN", + "color": "rgb(150, 150, 150)" + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, "targets": [ { + "alias": "$tag_level", "groupBy": [ { "params": [ @@ -733,6 +3833,12 @@ ], "type": "time" }, + { + "params": [ + "level" + ], + "type": "tag" + }, { "params": [ "null" @@ -740,137 +3846,114 @@ "type": "fill" } ], - "measurement": "nomad_client_allocs", + "limit": "", + "measurement": "asapo.nomad", "orderByTime": "ASC", "policy": "default", - "query": "SELECT mean(\"memory_rss\") /mean([[memory_allocated]]) * 100 FROM \"nomad_client_allocs\" WHERE (\"task\" = 'grafana') AND $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": false, "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ - "memory_rss" + "log" ], "type": "field" }, { "params": [], - "type": "mean" - }, - { - "params": [ - "/mean(\"memory_allocated\") * 100" - ], - "type": "math" + "type": "count" } ] ], - "tags": [ - { - "key": "task", - "operator": "=", - "value": "grafana" - } - ] + "tags": [] } ], - "timeFrom": "20s", + "thresholds": [], + "timeFrom": null, + "timeRegions": [], "timeShift": null, - "title": "Memory Usage", - "transparent": true, - "type": "gauge" + "title": "Log Count", + "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 + } }, { - "datasource": "InfluxDB", + "datasource": "InfluxDB-logs", "gridPos": { - "h": 5, - "w": 4, - "x": 11, - "y": 13 + "h": 8, + "w": 12, + "x": 12, + "y": 37 }, - "hideTimeOverride": true, - "id": 9, + "id": 146, "options": { - "fieldOptions": { - "calcs": [ - "mean" - ], - "defaults": { - "mappings": [], - "max": 1600, - "min": 0, - "thresholds": [ - { - "color": "green", - "value": null - } - ], - "title": "", - "unit": "percent" - }, - "override": {}, - "values": false - }, - "orientation": "horizontal", - "showThresholdLabels": false, - "showThresholdMarkers": true + "showLabels": false, + "showTime": true, + "sortOrder": "Descending", + "wrapLogMessage": true }, - "pluginVersion": "6.5.1", "targets": [ { - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "measurement": "nomad_client_allocs", - "orderByTime": "ASC", + "groupBy": [], + "limit": "100", + "measurement": "asapo.nomad", + "orderByTime": "DESC", "policy": "default", "refId": "A", - "resultFormat": "time_series", + "resultFormat": "table", "select": [ [ { "params": [ - "cpu_total_percent" + "log" ], "type": "field" - }, - { - "params": [], - "type": "max" } ] ], - "tags": [ - { - "key": "task", - "operator": "=", - "value": "grafana" - } - ] + "tags": [] } ], - "timeFrom": "20s", + "timeFrom": null, "timeShift": null, - "title": "CPU Usage", - "transparent": true, - "type": "gauge" + "title": "Log Messages", + "type": "logs" } ], - "refresh": "10s", - "schemaVersion": 21, + "schemaVersion": 22, "style": "dark", "tags": [], "templating": { @@ -878,24 +3961,60 @@ { "allValue": null, "current": { + "selected": true, "text": "All", - "value": [ - "$__all" - ] + "value": "$__all" }, "datasource": "InfluxDB", - "definition": "SHOW TAG VALUES WITH KEY = \"task\"", - "hide": 0, + "definition": "show tag values with key = task", + "hide": 2, "includeAll": true, + "index": -1, "label": null, - "multi": true, + "multi": false, "name": "task", - "options": [], - "query": "SHOW TAG VALUES WITH KEY = \"task\"", - "refresh": 2, - "regex": "", + "options": [ + { + "selected": true, + "text": "All", + "value": "$__all" + }, + { + "selected": false, + "text": "asapo-averager", + "value": "asapo-averager" + }, + { + "selected": false, + "text": "asapo-nexus-writer", + "value": "asapo-nexus-writer" + }, + { + "selected": false, + "text": "grafana", + "value": "grafana" + }, + { + "selected": false, + "text": "influxdb", + "value": "influxdb" + }, + { + "selected": false, + "text": "nginx", + "value": "nginx" + }, + { + "selected": false, + "text": "telegraf", + "value": "telegraf" + } + ], + "query": "show tag values with key = task", + "refresh": 0, + "regex": "^((?!default|fluent-bit).*)$", "skipUrlSync": false, - "sort": 5, + "sort": 1, "tagValuesQuery": "", "tags": [], "tagsQuery": "", @@ -905,7 +4024,7 @@ ] }, "time": { - "from": "now-15m", + "from": "now-3h", "to": "now" }, "timepicker": { @@ -923,7 +4042,10 @@ ] }, "timezone": "", - "title": "Asapo Client Monitor", - "uid": "acm", - "version": 5 + "title": "Cluster Overview", + "uid": "oteVAnuWz", + "variables": { + "list": [] + }, + "version": 7 } \ No newline at end of file diff --git a/deploy/asapo_orchestration_docker/scripts/grafana/provisioning/datasources/datasources.yaml.tpl b/deploy/asapo_orchestration_docker/scripts/grafana/provisioning/datasources/datasources.yaml.tpl index f5bba7c336f48e86b95926bd21e4655c88c4428c..2d608cb47c862f23623dee1ab0e147a13b559cff 100644 --- a/deploy/asapo_orchestration_docker/scripts/grafana/provisioning/datasources/datasources.yaml.tpl +++ b/deploy/asapo_orchestration_docker/scripts/grafana/provisioning/datasources/datasources.yaml.tpl @@ -8,3 +8,10 @@ datasources: url: http://localhost:{{ env "NOMAD_META_nginx_port" }}/influxdb jsonData: httpMode: GET + - name: InfluxDB-logs + type: influxdb + access: proxy + database: logs + url: http://localhost:{{ env "NOMAD_META_nginx_port" }}/influxdb + jsonData: + httpMode: GET diff --git a/deploy/asapo_orchestration_docker/scripts/influxdb/create_db_logs.sh.tpl b/deploy/asapo_orchestration_docker/scripts/influxdb/create_db_logs.sh.tpl new file mode 100644 index 0000000000000000000000000000000000000000..52a7b788da2c397338f79b58a9b0b56cddac4952 --- /dev/null +++ b/deploy/asapo_orchestration_docker/scripts/influxdb/create_db_logs.sh.tpl @@ -0,0 +1,3 @@ +set -x + +influx -execute "CREATE DATABASE logs" diff --git a/deploy/asapo_orchestration_docker/scripts/monitoring.nmd.tpl b/deploy/asapo_orchestration_docker/scripts/monitoring.nmd.tpl index e0282a8db0df8e44932a7ab0d56958d2e437e70b..a86149f7da62c3ff68816eac8df86165fa716a01 100644 --- a/deploy/asapo_orchestration_docker/scripts/monitoring.nmd.tpl +++ b/deploy/asapo_orchestration_docker/scripts/monitoring.nmd.tpl @@ -30,15 +30,17 @@ job "monitoring" { driver = "docker" user = "${asapo_user}" config { - network_mode = "host" + network_mode = "bridge" security_opt = ["no-new-privileges"] userns_mode = "host" image = "influxdb:${influxdb_version}" - volumes = ["/${service_dir}/influxdb:/var/lib/influxdb"] + volumes = [ + "/${service_dir}/influxdb:/var/lib/influxdb", + "local/influxdb:/docker-entrypoint-initdb.d"] + command = "influxd" } env { - PRE_CREATE_DB="asapo_receivers;asapo_brokers" INFLUXDB_BIND_ADDRESS="127.0.0.1:$${NOMAD_PORT_influxdb_rpc}" INFLUXDB_HTTP_BIND_ADDRESS=":$${NOMAD_PORT_influxdb}" } @@ -70,6 +72,10 @@ job "monitoring" { } } + template { + source = "${scripts_dir}/influxdb/create_db_logs.sh.tpl" + destination = "local/influxdb/create_db_logs.sh" + } } #influxdb @@ -190,5 +196,19 @@ job "monitoring" { } #telegraf + task "fluent-bit-cluster" { + driver = "raw_exec" + + config { + command = "/opt/td-agent-bit/bin/td-agent-bit" + args = ["-c", "local/fluent-bit.conf"] + } + + template { + source = "${scripts_dir}/fluent-bit-cluster.conf.tpl" + destination = "local/fluent-bit.conf" + change_mode = "restart" + } + } # fluent-bit-cluster } } diff --git a/deploy/asapo_orchestration_docker/scripts/nginx.nmd.tpl b/deploy/asapo_orchestration_docker/scripts/nginx.nmd.tpl index 7039978756e409bb3b15b2b12861226ccf390c5b..72c13ddeda606b5764ad7155610bfb70ec998696 100644 --- a/deploy/asapo_orchestration_docker/scripts/nginx.nmd.tpl +++ b/deploy/asapo_orchestration_docker/scripts/nginx.nmd.tpl @@ -67,5 +67,20 @@ job "asapo-nginx" { change_signal = "SIGHUP" } } + + task "fluent-bit" { + driver = "raw_exec" + + config { + command = "/opt/td-agent-bit/bin/td-agent-bit" + args = ["-c", "local/fluent-bit.conf"] + } + + template { + source = "${scripts_dir}/fluent-bit-nginx.conf.tpl" + destination = "local/fluent-bit.conf" + change_mode = "restart" + } + } # fluent-bit } } diff --git a/deploy/nomad_consul_docker/Dockerfile b/deploy/nomad_consul_docker/Dockerfile index e5b1ae786d356341898e4c1c24eff61240881ed5..dd939b5966fdb8c4664399870f957c2949840fb1 100644 --- a/deploy/nomad_consul_docker/Dockerfile +++ b/deploy/nomad_consul_docker/Dockerfile @@ -9,14 +9,19 @@ RUN apt-get update && apt-get install -y supervisor apt-transport-https \ software-properties-common dnsutils -RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - +RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \ + curl -fsSL https://packages.fluentbit.io/fluentbit.key | apt-key add - RUN add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ - stable" + stable" && \ + add-apt-repository \ + "deb [arch=amd64] https://packages.fluentbit.io/ubuntu/$(lsb_release -cs) \ + $(lsb_release -cs) \ + main" -RUN apt-get update && apt-get install -y docker-ce-cli wget unzip iproute2 vim +RUN apt-get update && apt-get install -y docker-ce-cli wget unzip iproute2 vim td-agent-bit ENV CONSUL_VERSION=1.6.0 diff --git a/deploy/nomad_consul_docker/nomad.hcl.tpl b/deploy/nomad_consul_docker/nomad.hcl.tpl index 56cf2b426c46855258eff35cfc32a2acad9bb9aa..1d67eb3f695986732be629468f657b7c75b58d39 100644 --- a/deploy/nomad_consul_docker/nomad.hcl.tpl +++ b/deploy/nomad_consul_docker/nomad.hcl.tpl @@ -39,6 +39,12 @@ plugin "docker" { } } +plugin "raw_exec" { + config { + enabled = true + } +} + telemetry { publish_allocation_metrics = $use_telemetry publish_node_metrics = $use_telemetry