diff --git a/storage/dev/_4NK_modules/grafana/dashboards/_4NK-certificator.json b/storage/dev/_4NK_modules/grafana/dashboards/_4NK-certificator.json index d8e4806..e9f8ceb 100644 --- a/storage/dev/_4NK_modules/grafana/dashboards/_4NK-certificator.json +++ b/storage/dev/_4NK_modules/grafana/dashboards/_4NK-certificator.json @@ -88,7 +88,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$_4NK_CERTIFICATOR_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "expr": "sum(rate({container=\"_4nk_certificator\"} |= \"INFO\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -175,7 +175,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$_4NK_CERTIFICATOR_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "expr": "sum(rate({container=\"_4nk_certificator\"} |= \"ERROR\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -239,7 +239,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "count_over_time({container=\"$_4NK_CERTIFICATOR_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "expr": "count_over_time({container=\"_4nk_certificator\"} |= \"ERROR\" [1h])", "queryType": "", "refId": "A" } @@ -276,7 +276,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "{container=\"$_4NK_CERTIFICATOR_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "expr": "{container=\"_4nk_certificator\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", "queryType": "", "refId": "A" } diff --git a/storage/dev/_4NK_modules/grafana/dashboards/_4NK-miner.json b/storage/dev/_4NK_modules/grafana/dashboards/_4NK-miner.json index 54cc4f6..3d72b73 100644 --- a/storage/dev/_4NK_modules/grafana/dashboards/_4NK-miner.json +++ b/storage/dev/_4NK_modules/grafana/dashboards/_4NK-miner.json @@ -88,7 +88,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$_4NK_MINER_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "expr": "sum(rate({container=\"_4nk_miner\"} |= \"INFO\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -175,7 +175,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$_4NK_MINER_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "expr": "sum(rate({container=\"_4nk_miner\"} |= \"ERROR\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -239,7 +239,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "count_over_time({container=\"$_4NK_MINER_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "expr": "count_over_time({container=\"_4nk_miner\"} |= \"ERROR\" [1h])", "queryType": "", "refId": "A" } @@ -276,7 +276,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "{container=\"$_4NK_MINER_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "expr": "{container=\"_4nk_miner\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", "queryType": "", "refId": "A" } diff --git a/storage/dev/_4NK_modules/grafana/dashboards/_4NK-vault.json b/storage/dev/_4NK_modules/grafana/dashboards/_4NK-vault.json index a541dac..c7f949e 100644 --- a/storage/dev/_4NK_modules/grafana/dashboards/_4NK-vault.json +++ b/storage/dev/_4NK_modules/grafana/dashboards/_4NK-vault.json @@ -88,7 +88,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$_4NK_VAULT_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "expr": "sum(rate({container=\"_4nk_vault\"} |= \"INFO\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -175,7 +175,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$_4NK_VAULT_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "expr": "sum(rate({container=\"_4nk_vault\"} |= \"ERROR\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -239,7 +239,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "count_over_time({container=\"$_4NK_VAULT_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "expr": "count_over_time({container=\"_4nk_vault\"} |= \"ERROR\" [1h])", "queryType": "", "refId": "A" } @@ -276,7 +276,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "{container=\"$_4NK_VAULT_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "expr": "{container=\"_4nk_vault\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", "queryType": "", "refId": "A" } diff --git a/storage/dev/_4NK_modules/grafana/dashboards/_4NK-web-status.json b/storage/dev/_4NK_modules/grafana/dashboards/_4NK-web-status.json index d1fff44..35bd75d 100644 --- a/storage/dev/_4NK_modules/grafana/dashboards/_4NK-web-status.json +++ b/storage/dev/_4NK_modules/grafana/dashboards/_4NK-web-status.json @@ -88,7 +88,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$_4NK_WEB_STATUS_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "expr": "sum(rate({container=\"_4nk_web_status\"} |= \"INFO\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -175,7 +175,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$_4NK_WEB_STATUS_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "expr": "sum(rate({container=\"_4nk_web_status\"} |= \"ERROR\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -239,7 +239,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "count_over_time({container=\"$_4NK_WEB_STATUS_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "expr": "count_over_time({container=\"_4nk_web_status\"} |= \"ERROR\" [1h])", "queryType": "", "refId": "A" } @@ -276,7 +276,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "{container=\"$_4NK_WEB_STATUS_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "expr": "{container=\"_4nk_web_status\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", "queryType": "", "refId": "A" } diff --git a/storage/dev/_4NK_modules/grafana/dashboards/bitcoin.json b/storage/dev/_4NK_modules/grafana/dashboards/bitcoin.json index 76ee3a5..886bcae 100644 --- a/storage/dev/_4NK_modules/grafana/dashboards/bitcoin.json +++ b/storage/dev/_4NK_modules/grafana/dashboards/bitcoin.json @@ -88,7 +88,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$BITCOIN_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "expr": "sum(rate({container=\"bitcoin\"} |= \"INFO\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -175,7 +175,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$BITCOIN_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "expr": "sum(rate({container=\"bitcoin\"} |= \"ERROR\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -239,7 +239,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "count_over_time({container=\"$BITCOIN_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "expr": "count_over_time({container=\"bitcoin\"} |= \"ERROR\" [1h])", "queryType": "", "refId": "A" } @@ -276,7 +276,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "{container=\"$BITCOIN_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "expr": "{container=\"bitcoin\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", "queryType": "", "refId": "A" } diff --git a/storage/dev/_4NK_modules/grafana/dashboards/blindbit-oracle.json b/storage/dev/_4NK_modules/grafana/dashboards/blindbit-oracle.json index 9d0a0fa..5798568 100644 --- a/storage/dev/_4NK_modules/grafana/dashboards/blindbit-oracle.json +++ b/storage/dev/_4NK_modules/grafana/dashboards/blindbit-oracle.json @@ -1,28 +1,66 @@ { "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] + "list": [] }, "editable": true, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": null, "links": [], + "liveNow": false, "panels": [ { - "datasource": "Loki", + "datasource": { + "type": "loki", + "uid": "loki" + }, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } }, "overrides": [] }, @@ -34,25 +72,82 @@ }, "id": 1, "options": { - "showLabels": false, - "showTime": false, - "sortOrder": "Descending", - "wrapLogMessage": false + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } }, "targets": [ { - "expr": "{job=\"blindbit\"} |= \"Host configuration loaded\"", + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"blindbit_oracle\"} |= \"INFO\" [5m])) by (container)", + "queryType": "", "refId": "A" } ], - "title": "BlindBit Oracle - Configuration Loaded", - "type": "logs" + "title": "Logs INFO - blindbit-oracle", + "type": "timeseries" }, { - "datasource": "Loki", + "datasource": { + "type": "loki", + "uid": "loki" + }, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } }, "overrides": [] }, @@ -64,117 +159,138 @@ }, "id": 2, "options": { - "showLabels": false, - "showTime": false, - "sortOrder": "Descending", - "wrapLogMessage": false + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } }, "targets": [ { - "expr": "{job=\"blindbit\"} |= \"Sync took\"", + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"blindbit_oracle\"} |= \"ERROR\" [5m])) by (container)", + "queryType": "", "refId": "A" } ], - "title": "BlindBit Oracle - Synchronization", - "type": "logs" + "title": "Erreurs - blindbit-oracle", + "type": "timeseries" }, { - "datasource": "Loki", + "datasource": { + "type": "loki", + "uid": "loki" + }, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } }, "overrides": [] }, "gridPos": { - "h": 8, - "w": 24, + "h": 4, + "w": 6, "x": 0, "y": 8 }, "id": 3, "options": { - "showLabels": false, - "showTime": false, - "sortOrder": "Descending", - "wrapLogMessage": false + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" }, + "pluginVersion": "10.0.0", "targets": [ { - "expr": "{job=\"blindbit\"} |= \"successfully processed block\"", + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "count_over_time({container=\"blindbit_oracle\"} |= \"ERROR\" [1h])", + "queryType": "", "refId": "A" } ], - "title": "BlindBit Oracle - Block Processing", - "type": "logs" + "title": "Erreurs (1h)", + "type": "stat" }, { - "datasource": "Loki", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] + "datasource": { + "type": "loki", + "uid": "loki" }, "gridPos": { "h": 8, - "w": 12, + "w": 24, "x": 0, - "y": 16 + "y": 12 }, "id": 4, "options": { - "showLabels": false, "showTime": false, - "sortOrder": "Descending", - "wrapLogMessage": false + "showLabels": false, + "showCommonLabels": false, + "wrapLogMessage": false, + "prettifyLogMessage": false, + "enableLogDetails": true, + "dedupStrategy": "none", + "sortOrder": "Descending" }, "targets": [ { - "expr": "{job=\"blindbit\"} |= \"GET\" |~ \"/tweaks/\"", + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "{container=\"blindbit_oracle\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "queryType": "", "refId": "A" } ], - "title": "BlindBit Oracle - API Requests", - "type": "logs" - }, - { - "datasource": "Loki", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 16 - }, - "id": 5, - "options": { - "showLabels": false, - "showTime": false, - "sortOrder": "Descending", - "wrapLogMessage": false - }, - "targets": [ - { - "expr": "{job=\"blindbit\"} |~ \"ERROR|error|Error\"", - "refId": "A" - } - ], - "title": "BlindBit Oracle - Errors", + "title": "Logs d'Erreur - blindbit-oracle", "type": "logs" } ], - "schemaVersion": 27, + "refresh": "5s", + "schemaVersion": 37, "style": "dark", "tags": [ - "blindbit", - "oracle", - "blockchain" + "blindbit-oracle", + "auto-generated" ], "templating": { "list": [] @@ -185,8 +301,8 @@ }, "timepicker": {}, "timezone": "", - "title": "BlindBit Oracle Dashboard", + "title": "blindbit-oracle - Monitoring", "uid": "blindbit-oracle", - "version": 1 + "version": 1, + "weekStart": "" } - diff --git a/storage/dev/_4NK_modules/grafana/dashboards/grafana.json b/storage/dev/_4NK_modules/grafana/dashboards/grafana.json index ce220cd..9eb69d9 100644 --- a/storage/dev/_4NK_modules/grafana/dashboards/grafana.json +++ b/storage/dev/_4NK_modules/grafana/dashboards/grafana.json @@ -88,7 +88,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$GRAFANA_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "expr": "sum(rate({container=\"grafana\"} |= \"INFO\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -175,7 +175,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$GRAFANA_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "expr": "sum(rate({container=\"grafana\"} |= \"ERROR\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -239,7 +239,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "count_over_time({container=\"$GRAFANA_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "expr": "count_over_time({container=\"grafana\"} |= \"ERROR\" [1h])", "queryType": "", "refId": "A" } @@ -276,7 +276,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "{container=\"$GRAFANA_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "expr": "{container=\"grafana\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", "queryType": "", "refId": "A" } diff --git a/storage/dev/_4NK_modules/grafana/dashboards/ihm-client.json b/storage/dev/_4NK_modules/grafana/dashboards/ihm-client.json index 5e4be65..275ff01 100644 --- a/storage/dev/_4NK_modules/grafana/dashboards/ihm-client.json +++ b/storage/dev/_4NK_modules/grafana/dashboards/ihm-client.json @@ -88,7 +88,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$IHM_CLIENT_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "expr": "sum(rate({container=\"ihm_client\"} |= \"INFO\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -175,7 +175,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$IHM_CLIENT_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "expr": "sum(rate({container=\"ihm_client\"} |= \"ERROR\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -239,7 +239,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "count_over_time({container=\"$IHM_CLIENT_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "expr": "count_over_time({container=\"ihm_client\"} |= \"ERROR\" [1h])", "queryType": "", "refId": "A" } @@ -276,7 +276,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "{container=\"$IHM_CLIENT_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "expr": "{container=\"ihm_client\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", "queryType": "", "refId": "A" } diff --git a/storage/dev/_4NK_modules/grafana/dashboards/lecoffre-front.json b/storage/dev/_4NK_modules/grafana/dashboards/lecoffre-front.json index a82acdd..6ffd04c 100644 --- a/storage/dev/_4NK_modules/grafana/dashboards/lecoffre-front.json +++ b/storage/dev/_4NK_modules/grafana/dashboards/lecoffre-front.json @@ -88,7 +88,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$LECOFFRE_FRONT_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "expr": "sum(rate({container=\"lecoffre_front\"} |= \"INFO\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -175,7 +175,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$LECOFFRE_FRONT_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "expr": "sum(rate({container=\"lecoffre_front\"} |= \"ERROR\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -239,7 +239,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "count_over_time({container=\"$LECOFFRE_FRONT_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "expr": "count_over_time({container=\"lecoffre_front\"} |= \"ERROR\" [1h])", "queryType": "", "refId": "A" } @@ -276,7 +276,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "{container=\"$LECOFFRE_FRONT_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "expr": "{container=\"lecoffre_front\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", "queryType": "", "refId": "A" } diff --git a/storage/dev/_4NK_modules/grafana/dashboards/loki.json b/storage/dev/_4NK_modules/grafana/dashboards/loki.json index 61cf966..c98a0db 100644 --- a/storage/dev/_4NK_modules/grafana/dashboards/loki.json +++ b/storage/dev/_4NK_modules/grafana/dashboards/loki.json @@ -88,7 +88,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$LOKI_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "expr": "sum(rate({container=\"loki\"} |= \"INFO\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -175,7 +175,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$LOKI_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "expr": "sum(rate({container=\"loki\"} |= \"ERROR\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -239,7 +239,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "count_over_time({container=\"$LOKI_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "expr": "count_over_time({container=\"loki\"} |= \"ERROR\" [1h])", "queryType": "", "refId": "A" } @@ -276,7 +276,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "{container=\"$LOKI_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "expr": "{container=\"loki\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", "queryType": "", "refId": "A" } diff --git a/storage/dev/_4NK_modules/grafana/dashboards/ngnix.json b/storage/dev/_4NK_modules/grafana/dashboards/ngnix.json index 5e8b3ef..c0b40be 100644 --- a/storage/dev/_4NK_modules/grafana/dashboards/ngnix.json +++ b/storage/dev/_4NK_modules/grafana/dashboards/ngnix.json @@ -88,7 +88,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$NGNIX_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "expr": "sum(rate({container=\"ngnix\"} |= \"INFO\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -175,7 +175,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$NGNIX_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "expr": "sum(rate({container=\"ngnix\"} |= \"ERROR\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -239,7 +239,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "count_over_time({container=\"$NGNIX_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "expr": "count_over_time({container=\"ngnix\"} |= \"ERROR\" [1h])", "queryType": "", "refId": "A" } @@ -276,7 +276,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "{container=\"$NGNIX_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "expr": "{container=\"ngnix\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", "queryType": "", "refId": "A" } diff --git a/storage/dev/_4NK_modules/grafana/dashboards/postgresql.json b/storage/dev/_4NK_modules/grafana/dashboards/postgresql.json index 5ae1014..129f667 100644 --- a/storage/dev/_4NK_modules/grafana/dashboards/postgresql.json +++ b/storage/dev/_4NK_modules/grafana/dashboards/postgresql.json @@ -88,7 +88,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$POSTGRESQL_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "expr": "sum(rate({container=\"postgresql\"} |= \"INFO\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -175,7 +175,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$POSTGRESQL_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "expr": "sum(rate({container=\"postgresql\"} |= \"ERROR\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -239,7 +239,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "count_over_time({container=\"$POSTGRESQL_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "expr": "count_over_time({container=\"postgresql\"} |= \"ERROR\" [1h])", "queryType": "", "refId": "A" } @@ -276,7 +276,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "{container=\"$POSTGRESQL_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "expr": "{container=\"postgresql\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", "queryType": "", "refId": "A" } diff --git a/storage/dev/_4NK_modules/grafana/dashboards/promtail.json b/storage/dev/_4NK_modules/grafana/dashboards/promtail.json index f2cef80..d6c7cae 100644 --- a/storage/dev/_4NK_modules/grafana/dashboards/promtail.json +++ b/storage/dev/_4NK_modules/grafana/dashboards/promtail.json @@ -88,7 +88,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$PROMTAIL_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "expr": "sum(rate({container=\"promtail\"} |= \"INFO\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -175,7 +175,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$PROMTAIL_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "expr": "sum(rate({container=\"promtail\"} |= \"ERROR\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -239,7 +239,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "count_over_time({container=\"$PROMTAIL_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "expr": "count_over_time({container=\"promtail\"} |= \"ERROR\" [1h])", "queryType": "", "refId": "A" } @@ -276,7 +276,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "{container=\"$PROMTAIL_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "expr": "{container=\"promtail\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", "queryType": "", "refId": "A" } diff --git a/storage/dev/_4NK_modules/grafana/dashboards/redis.json b/storage/dev/_4NK_modules/grafana/dashboards/redis.json index e6ef3ee..ec4e750 100644 --- a/storage/dev/_4NK_modules/grafana/dashboards/redis.json +++ b/storage/dev/_4NK_modules/grafana/dashboards/redis.json @@ -88,7 +88,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$REDIS_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "expr": "sum(rate({container=\"redis\"} |= \"INFO\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -175,7 +175,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$REDIS_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "expr": "sum(rate({container=\"redis\"} |= \"ERROR\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -239,7 +239,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "count_over_time({container=\"$REDIS_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "expr": "count_over_time({container=\"redis\"} |= \"ERROR\" [1h])", "queryType": "", "refId": "A" } @@ -276,7 +276,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "{container=\"$REDIS_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "expr": "{container=\"redis\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", "queryType": "", "refId": "A" } diff --git a/storage/dev/_4NK_modules/grafana/dashboards/sdk-relay.json b/storage/dev/_4NK_modules/grafana/dashboards/sdk-relay.json index 27e2083..85562e6 100644 --- a/storage/dev/_4NK_modules/grafana/dashboards/sdk-relay.json +++ b/storage/dev/_4NK_modules/grafana/dashboards/sdk-relay.json @@ -88,7 +88,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$SDK_RELAY_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "expr": "sum(rate({container=\"sdk_relay\"} |= \"INFO\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -175,7 +175,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$SDK_RELAY_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "expr": "sum(rate({container=\"sdk_relay\"} |= \"ERROR\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -239,7 +239,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "count_over_time({container=\"$SDK_RELAY_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "expr": "count_over_time({container=\"sdk_relay\"} |= \"ERROR\" [1h])", "queryType": "", "refId": "A" } @@ -276,7 +276,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "{container=\"$SDK_RELAY_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "expr": "{container=\"sdk_relay\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", "queryType": "", "refId": "A" } diff --git a/storage/dev/_4NK_modules/grafana/dashboards/sdk-storage.json b/storage/dev/_4NK_modules/grafana/dashboards/sdk-storage.json index 38bffe1..3cbdc50 100644 --- a/storage/dev/_4NK_modules/grafana/dashboards/sdk-storage.json +++ b/storage/dev/_4NK_modules/grafana/dashboards/sdk-storage.json @@ -88,7 +88,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$SDK_STORAGE_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "expr": "sum(rate({container=\"sdk_storage\"} |= \"INFO\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -175,7 +175,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$SDK_STORAGE_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "expr": "sum(rate({container=\"sdk_storage\"} |= \"ERROR\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -239,7 +239,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "count_over_time({container=\"$SDK_STORAGE_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "expr": "count_over_time({container=\"sdk_storage\"} |= \"ERROR\" [1h])", "queryType": "", "refId": "A" } @@ -276,7 +276,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "{container=\"$SDK_STORAGE_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "expr": "{container=\"sdk_storage\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", "queryType": "", "refId": "A" } diff --git a/storage/dev/_4NK_modules/grafana/dashboards/services-overview.json b/storage/dev/_4NK_modules/grafana/dashboards/services-overview.json index b27238f..5d872fb 100644 --- a/storage/dev/_4NK_modules/grafana/dashboards/services-overview.json +++ b/storage/dev/_4NK_modules/grafana/dashboards/services-overview.json @@ -1,25 +1,6 @@ { "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] + "list": [] }, "editable": true, "fiscalYearStartMonth": 0, @@ -86,7 +67,7 @@ }, "gridPos": { "h": 8, - "w": 6, + "w": 24, "x": 0, "y": 0 }, @@ -102,83 +83,6 @@ "sort": "none" } }, - "title": "LeCoffre Backend - Volume Logs", - "type": "timeseries" - }, - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 2, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, "targets": [ { "datasource": { @@ -186,222 +90,19 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum by (service) (count_over_time({job=\"lecoffre-front\"} [5m]))", + "expr": "sum by (container) (count_over_time({container=~\"|-oracle_DOCKER_NAME||||-front_DOCKER_NAME\"} |= \"ERROR\" [5m]))", "queryType": "", "refId": "A" } ], - "title": "LeCoffre Frontend - Volume Logs", + "title": "Erreurs par Service (5 dernières minutes)", "type": "timeseries" - }, - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 3, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "editorMode": "code", - "expr": "sum by (service) (count_over_time({job=\"ihm_client\"} [5m]))", - "queryType": "", - "refId": "A" - } - ], - "title": "IHM Client - Volume Logs", - "type": "timeseries" - }, - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 4, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "editorMode": "code", - "expr": "sum by (service) (count_over_time({job=\"sdk_relay\"} [5m]))", - "queryType": "", - "refId": "A" - } - ], - "title": "SDK Relay - Volume Logs", - "type": "timeseries" - }, - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "gridPos": { - "h": 12, - "w": 24, - "x": 0, - "y": 8 - }, - "id": 5, - "options": { - "showTime": false, - "showLabels": false, - "showCommonLabels": false, - "wrapLogMessage": false, - "prettifyLogMessage": false, - "enableLogDetails": true, - "dedupStrategy": "none", - "sortOrder": "Descending" - }, - "title": "Logs d'Erreur - Services Applications", - "type": "logs" } ], "refresh": "30s", "schemaVersion": 36, "style": "dark", - "tags": ["services", "applications"], + "tags": ["overview", "auto-generated"], "templating": { "list": [] }, @@ -411,8 +112,8 @@ }, "timepicker": {}, "timezone": "", - "title": "Services Applications - Monitoring", - "uid": "services-overview", + "title": "Services Overview - Auto Generated", + "uid": "services-overview-auto", "version": 1, "weekStart": "" } diff --git a/storage/dev/_4NK_modules/grafana/dashboards/tor.json b/storage/dev/_4NK_modules/grafana/dashboards/tor.json index a461b10..406aaf5 100644 --- a/storage/dev/_4NK_modules/grafana/dashboards/tor.json +++ b/storage/dev/_4NK_modules/grafana/dashboards/tor.json @@ -88,7 +88,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$TOR_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "expr": "sum(rate({container=\"tor\"} |= \"INFO\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -175,7 +175,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"$TOR_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "expr": "sum(rate({container=\"tor\"} |= \"ERROR\" [5m])) by (container)", "queryType": "", "refId": "A" } @@ -239,7 +239,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "count_over_time({container=\"$TOR_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "expr": "count_over_time({container=\"tor\"} |= \"ERROR\" [1h])", "queryType": "", "refId": "A" } @@ -276,7 +276,7 @@ "uid": "loki" }, "editorMode": "code", - "expr": "{container=\"$TOR_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "expr": "{container=\"tor\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", "queryType": "", "refId": "A" } diff --git a/storage/dev/_4NK_modules/promtail/promtail.yml b/storage/dev/_4NK_modules/promtail/promtail.yml index b51fb6d..5c6bac9 100644 --- a/storage/dev/_4NK_modules/promtail/promtail.yml +++ b/storage/dev/_4NK_modules/promtail/promtail.yml @@ -1,107 +1,334 @@ server: - http_listen_port: 8090:8090 + http_listen_port: 9080 grpc_listen_port: 0 positions: filename: /tmp/positions.yaml clients: - - url: http://:/loki/api/v1/push + - url: http://loki:3100/loki/api/v1/push scrape_configs: - # Bitcoin Signet Logs - - job_name: bitcoin - static_configs: - - targets: - - localhost - labels: - job: bitcoin - service: bitcoin-signet - __path__: /home/debian/_4NK_env/projects/lecoffre/lecoffre_node/logs/bitcoin/*.log - # Blindbit Oracle Logs - - job_name: blindbit + - job_name: 'REDIS' static_configs: - targets: - localhost labels: - job: blindbit - service: blindbit-oracle - __path__: /home/debian/_4NK_env/projects/lecoffre/lecoffre_node/logs/blindbit_oracle/*.log + job: REDIS + __path__: /home/debian/_4NK_env/projects/lecoffre/lecoffre_node/logs/redis/*.log + pipeline_stages: + - match: + selector: '{job="REDIS"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' - # SDK Relay Logs - - job_name: sdk_relay + - job_name: 'POSTGRESQL' static_configs: - targets: - localhost labels: - job: sdk_relay - service: sdk_relay - __path__: /home/debian/_4NK_env/projects/lecoffre/lecoffre_node/logs/sdk_relay/*.log + job: POSTGRESQL + __path__: /home/debian/_4NK_env/projects/lecoffre/lecoffre_node/logs/postgresql/*.log + pipeline_stages: + - match: + selector: '{job="POSTGRESQL"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' - # SDK Storage Logs - - job_name: sdk_storage + - job_name: 'LOKI' static_configs: - targets: - localhost labels: - job: sdk_storage - service: sdk_storage - __path__: /home/debian/_4NK_env/projects/lecoffre/lecoffre_node/logs/sdk_storage/*.log + job: LOKI + __path__: /home/debian/_4NK_env/projects/lecoffre/lecoffre_node/logs/loki/*.log + pipeline_stages: + - match: + selector: '{job="LOKI"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' - # LeCoffre Frontend Logs - - job_name: lecoffre-front + - job_name: 'PROMTAIL' static_configs: - targets: - localhost labels: - job: lecoffre-front - service: lecoffre-front - __path__: /home/debian/_4NK_env/projects/lecoffre/lecoffre_node/logs/lecoffre_front/*.log + job: PROMTAIL + __path__: /home/debian/_4NK_env/projects/lecoffre/lecoffre_node/logs/promtail/*.log + pipeline_stages: + - match: + selector: '{job="PROMTAIL"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' - # IHM Client Logs - - job_name: ihm_client + - job_name: 'GRAFANA' static_configs: - targets: - localhost labels: - job: ihm_client - service: ihm_client - __path__: /home/debian/_4NK_env/projects/lecoffre/lecoffre_node/logs/ihm_client/*.log + job: GRAFANA + __path__: /home/debian/_4NK_env/projects/lecoffre/lecoffre_node/logs/grafana/*.log + pipeline_stages: + - match: + selector: '{job="GRAFANA"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' - # Miner Logs - - job_name: miner + - job_name: 'NGNIX' static_configs: - targets: - localhost labels: - job: miner - service: signet_miner - __path__: /*.log + job: NGNIX + __path__: /home/debian/_4NK_env/projects/lecoffre/lecoffre_node/logs/ngnix/*.log + pipeline_stages: + - match: + selector: '{job="NGNIX"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' - # Tor Logs - - job_name: tor + - job_name: 'TOR' static_configs: - targets: - localhost labels: - job: tor - service: tor-proxy + job: TOR __path__: /home/debian/_4NK_env/projects/lecoffre/lecoffre_node/logs/tor/*.log + pipeline_stages: + - match: + selector: '{job="TOR"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' - # Docker Container Logs - - job_name: docker - docker_sd_configs: - - host: unix:///var/run/docker.sock - refresh_interval: 5s - filters: - - name: label - values: ["com.centurylinklabs.watchtower.enable=true"] - relabel_configs: - - source_labels: ['__meta_docker_container_name'] - regex: '/?(.*)' - target_label: 'container_name' - - source_labels: ['__meta_docker_container_log_stream'] - target_label: 'logstream' - - source_labels: ['__meta_docker_container_label_logging_job_name'] - target_label: 'job' + - job_name: '_4NK_VAULT' + static_configs: + - targets: + - localhost + labels: + job: _4NK_VAULT + __path__: /home/debian/_4NK_env/projects/lecoffre/lecoffre_node/logs/_4nk_vault/*.log + pipeline_stages: + - match: + selector: '{job="_4NK_VAULT"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' + + - job_name: 'BITCOIN' + static_configs: + - targets: + - localhost + labels: + job: BITCOIN + __path__: /home/debian/_4NK_env/projects/lecoffre/lecoffre_node/logs/bitcoin/*.log + pipeline_stages: + - match: + selector: '{job="BITCOIN"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' + + - job_name: 'BLINDBIT_ORACLE' + static_configs: + - targets: + - localhost + labels: + job: BLINDBIT_ORACLE + __path__: /home/debian/_4NK_env/projects/lecoffre/lecoffre_node/logs/blindbit_oracle/*.log + pipeline_stages: + - match: + selector: '{job="BLINDBIT_ORACLE"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' + + - job_name: 'SDK_RELAY' + static_configs: + - targets: + - localhost + labels: + job: SDK_RELAY + __path__: /home/debian/_4NK_env/projects/lecoffre/lecoffre_node/logs/sdk_relay/*.log + pipeline_stages: + - match: + selector: '{job="SDK_RELAY"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' + + - job_name: 'SDK_STORAGE' + static_configs: + - targets: + - localhost + labels: + job: SDK_STORAGE + __path__: /home/debian/_4NK_env/projects/lecoffre/lecoffre_node/logs/sdk_storage/*.log + pipeline_stages: + - match: + selector: '{job="SDK_STORAGE"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' + + - job_name: 'IHM_CLIENT' + static_configs: + - targets: + - localhost + labels: + job: IHM_CLIENT + __path__: /home/debian/_4NK_env/projects/lecoffre/lecoffre_node/logs/ihm_client/*.log + pipeline_stages: + - match: + selector: '{job="IHM_CLIENT"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' + + - job_name: '_4NK_CERTIFICATOR' + static_configs: + - targets: + - localhost + labels: + job: _4NK_CERTIFICATOR + __path__: /home/debian/_4NK_env/projects/lecoffre/lecoffre_node/logs/_4nk_certificator/*.log + pipeline_stages: + - match: + selector: '{job="_4NK_CERTIFICATOR"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' + + - job_name: '_4NK_MINER' + static_configs: + - targets: + - localhost + labels: + job: _4NK_MINER + __path__: /home/debian/_4NK_env/projects/lecoffre/lecoffre_node/logs/_4nk_miner/*.log + pipeline_stages: + - match: + selector: '{job="_4NK_MINER"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' + + - job_name: 'LECOFFRE_FRONT' + static_configs: + - targets: + - localhost + labels: + job: LECOFFRE_FRONT + __path__: /home/debian/_4NK_env/projects/lecoffre/lecoffre_node/logs/lecoffre_front/*.log + pipeline_stages: + - match: + selector: '{job="LECOFFRE_FRONT"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' + + - job_name: '_4NK_WEB_STATUS' + static_configs: + - targets: + - localhost + labels: + job: _4NK_WEB_STATUS + __path__: /home/debian/_4NK_env/projects/lecoffre/lecoffre_node/logs/_4nk_web_status/*.log + pipeline_stages: + - match: + selector: '{job="_4NK_WEB_STATUS"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' diff --git a/storage/dev/nginx/BITCOIN_https.conf b/storage/dev/nginx/BITCOIN_https.conf index 1212d22..d80eb90 100644 --- a/storage/dev/nginx/BITCOIN_https.conf +++ b/storage/dev/nginx/BITCOIN_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour BITCOIN -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/storage/dev/nginx/BLINDBIT_ORACLE_https.conf b/storage/dev/nginx/BLINDBIT_ORACLE_https.conf index 99a9520..3ce4a00 100644 --- a/storage/dev/nginx/BLINDBIT_ORACLE_https.conf +++ b/storage/dev/nginx/BLINDBIT_ORACLE_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour BLINDBIT_ORACLE -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/storage/dev/nginx/GRAFANA_https.conf b/storage/dev/nginx/GRAFANA_https.conf index 7507888..4f59745 100644 --- a/storage/dev/nginx/GRAFANA_https.conf +++ b/storage/dev/nginx/GRAFANA_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour GRAFANA -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/storage/dev/nginx/IHM_CLIENT_https.conf b/storage/dev/nginx/IHM_CLIENT_https.conf index 57b7c19..b9b26f8 100644 --- a/storage/dev/nginx/IHM_CLIENT_https.conf +++ b/storage/dev/nginx/IHM_CLIENT_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour IHM_CLIENT -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/storage/dev/nginx/LECOFFRE_FRONT_https.conf b/storage/dev/nginx/LECOFFRE_FRONT_https.conf index ce04c42..8fcc069 100644 --- a/storage/dev/nginx/LECOFFRE_FRONT_https.conf +++ b/storage/dev/nginx/LECOFFRE_FRONT_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour LECOFFRE_FRONT -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/storage/dev/nginx/LOKI_https.conf b/storage/dev/nginx/LOKI_https.conf index c987465..c0436d7 100644 --- a/storage/dev/nginx/LOKI_https.conf +++ b/storage/dev/nginx/LOKI_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour LOKI -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/storage/dev/nginx/NGNIX_https.conf b/storage/dev/nginx/NGNIX_https.conf index d882b71..1f52c7e 100644 --- a/storage/dev/nginx/NGNIX_https.conf +++ b/storage/dev/nginx/NGNIX_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour NGNIX -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/storage/dev/nginx/POSTGRESQL_https.conf b/storage/dev/nginx/POSTGRESQL_https.conf index d89cd79..012d98a 100644 --- a/storage/dev/nginx/POSTGRESQL_https.conf +++ b/storage/dev/nginx/POSTGRESQL_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour POSTGRESQL -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/storage/dev/nginx/PROMTAIL_https.conf b/storage/dev/nginx/PROMTAIL_https.conf index 60cf191..b0d8246 100644 --- a/storage/dev/nginx/PROMTAIL_https.conf +++ b/storage/dev/nginx/PROMTAIL_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour PROMTAIL -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/storage/dev/nginx/REDIS_https.conf b/storage/dev/nginx/REDIS_https.conf index 6117d1f..436149a 100644 --- a/storage/dev/nginx/REDIS_https.conf +++ b/storage/dev/nginx/REDIS_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour REDIS -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/storage/dev/nginx/SDK_RELAY_https.conf b/storage/dev/nginx/SDK_RELAY_https.conf index b29cf41..439ca11 100644 --- a/storage/dev/nginx/SDK_RELAY_https.conf +++ b/storage/dev/nginx/SDK_RELAY_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour SDK_RELAY -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/storage/dev/nginx/SDK_STORAGE_https.conf b/storage/dev/nginx/SDK_STORAGE_https.conf index d494c6a..d1262a4 100644 --- a/storage/dev/nginx/SDK_STORAGE_https.conf +++ b/storage/dev/nginx/SDK_STORAGE_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour SDK_STORAGE -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/storage/dev/nginx/TOR_https.conf b/storage/dev/nginx/TOR_https.conf index 63855f4..8e78d7d 100644 --- a/storage/dev/nginx/TOR_https.conf +++ b/storage/dev/nginx/TOR_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour TOR -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/storage/dev/nginx/_4NK_CERTIFICATOR_https.conf b/storage/dev/nginx/_4NK_CERTIFICATOR_https.conf index 36f0550..14bf053 100644 --- a/storage/dev/nginx/_4NK_CERTIFICATOR_https.conf +++ b/storage/dev/nginx/_4NK_CERTIFICATOR_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour _4NK_CERTIFICATOR -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/storage/dev/nginx/_4NK_MINER_https.conf b/storage/dev/nginx/_4NK_MINER_https.conf index 916f2c6..e8a024c 100644 --- a/storage/dev/nginx/_4NK_MINER_https.conf +++ b/storage/dev/nginx/_4NK_MINER_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour _4NK_MINER -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/storage/dev/nginx/_4NK_VAULT_https.conf b/storage/dev/nginx/_4NK_VAULT_https.conf index 83adcf1..77f9f60 100644 --- a/storage/dev/nginx/_4NK_VAULT_https.conf +++ b/storage/dev/nginx/_4NK_VAULT_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour _4NK_VAULT -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/storage/dev/nginx/_4NK_WEB_STATUS_https.conf b/storage/dev/nginx/_4NK_WEB_STATUS_https.conf index b76b875..c1ee2be 100644 --- a/storage/dev/nginx/_4NK_WEB_STATUS_https.conf +++ b/storage/dev/nginx/_4NK_WEB_STATUS_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour _4NK_WEB_STATUS -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/templates/dev/.env.post b/templates/dev/.env.post index dd4e48e..9f71eb2 100644 --- a/templates/dev/.env.post +++ b/templates/dev/.env.post @@ -3,7 +3,7 @@ SDK_RELAY_BOOSTRAP_URL=$BOOSTRAP_URL_WS_EXTERNAL RELAY_URLS=$SDK_RELAY_URL,$SDK_RELAY_BOOSTRAP_URL BITCOIN_RPC_URL=http://$BITCOIN_DOCKER_NAME:$BITCOIN_SIGNET_RPC_PORT -BITCOIN_COOKIE_DIR= +BITCOIN_COOKIE_DIR=$BITCOIN_DATA_DIR/signet/.cookie ZMQ_URL=tcp://$BITCOIN_DOCKER_NAME:$BITCOIN_ZMQPBUBHASHBLOCK_PORT # DB diff --git a/templates/dev/_4NK_modules/grafana/dashboards/frontend-services.json b/templates/dev/_4NK_modules/grafana/dashboards/_4NK-certificator.json similarity index 50% rename from templates/dev/_4NK_modules/grafana/dashboards/frontend-services.json rename to templates/dev/_4NK_modules/grafana/dashboards/_4NK-certificator.json index 262feb0..d8e4806 100644 --- a/templates/dev/_4NK_modules/grafana/dashboards/frontend-services.json +++ b/templates/dev/_4NK_modules/grafana/dashboards/_4NK-certificator.json @@ -88,12 +88,12 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=~\"lecoffre-front|ihm_client\"} |= \"GET\" [5m])) by (container)", + "expr": "sum(rate({container=\"$_4NK_CERTIFICATOR_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", "queryType": "", "refId": "A" } ], - "title": "Requêtes HTTP par Frontend", + "title": "Logs INFO - _4NK-certificator", "type": "timeseries" }, { @@ -175,12 +175,12 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"ihm_client\"} |= \"vite\" [5m])) by (container)", + "expr": "sum(rate({container=\"$_4NK_CERTIFICATOR_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", "queryType": "", "refId": "A" } ], - "title": "Activité Vite (IHM Client)", + "title": "Erreurs - _4NK-certificator", "type": "timeseries" }, { @@ -239,12 +239,12 @@ "uid": "loki" }, "editorMode": "code", - "expr": "count_over_time({container=\"lecoffre-front\"} |= \"ERROR\" [1h])", + "expr": "count_over_time({container=\"$_4NK_CERTIFICATOR_DOCKER_NAME\"} |= \"ERROR\" [1h])", "queryType": "", "refId": "A" } ], - "title": "Erreurs LeCoffre Front (1h)", + "title": "Erreurs (1h)", "type": "stat" }, { @@ -252,244 +252,23 @@ "type": "loki", "uid": "loki" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 6, - "y": 8 - }, - "id": 4, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "editorMode": "code", - "expr": "count_over_time({container=\"ihm_client\"} |= \"ERROR\" [1h])", - "queryType": "", - "refId": "A" - } - ], - "title": "Erreurs IHM Client (1h)", - "type": "stat" - }, - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 12, - "y": 8 - }, - "id": 5, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "editorMode": "code", - "expr": "sum(count_over_time({container=~\"lecoffre-front|ihm_client\"} [1h]))", - "queryType": "", - "refId": "A" - } - ], - "title": "Total Logs Frontend (1h)", - "type": "stat" - }, - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 18, - "y": 8 - }, - "id": 6, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "editorMode": "code", - "expr": "count_over_time({container=\"ihm_client\"} |= \"Pre-transform error\" [1h])", - "queryType": "", - "refId": "A" - } - ], - "title": "Erreurs Vite (1h)", - "type": "stat" - }, - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, "gridPos": { "h": 8, "w": 24, "x": 0, "y": 12 }, - "id": 7, + "id": 4, "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true + "showTime": false, + "showLabels": false, + "showCommonLabels": false, + "wrapLogMessage": false, + "prettifyLogMessage": false, + "enableLogDetails": true, + "dedupStrategy": "none", + "sortOrder": "Descending" }, - "pluginVersion": "10.0.0", "targets": [ { "datasource": { @@ -497,23 +276,21 @@ "uid": "loki" }, "editorMode": "code", - "expr": "{container=~\"lecoffre-front|ihm_client\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.container}} - {{.message}}\"", + "expr": "{container=\"$_4NK_CERTIFICATOR_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", "queryType": "", "refId": "A" } ], - "title": "Erreurs Récentes Frontend", - "type": "table" + "title": "Logs d'Erreur - _4NK-certificator", + "type": "logs" } ], "refresh": "5s", "schemaVersion": 37, "style": "dark", "tags": [ - "frontend", - "lecoffre", - "ihm", - "client" + "_4NK-certificator", + "auto-generated" ], "templating": { "list": [] @@ -524,9 +301,8 @@ }, "timepicker": {}, "timezone": "", - "title": "Frontend Services - Monitoring", - "uid": "frontend-services", + "title": "_4NK-certificator - Monitoring", + "uid": "-4nk-certificator", "version": 1, "weekStart": "" } - diff --git a/templates/dev/_4NK_modules/grafana/dashboards/bitcoin-services.json b/templates/dev/_4NK_modules/grafana/dashboards/_4NK-miner.json similarity index 50% rename from templates/dev/_4NK_modules/grafana/dashboards/bitcoin-services.json rename to templates/dev/_4NK_modules/grafana/dashboards/_4NK-miner.json index 2abf2d2..54cc4f6 100644 --- a/templates/dev/_4NK_modules/grafana/dashboards/bitcoin-services.json +++ b/templates/dev/_4NK_modules/grafana/dashboards/_4NK-miner.json @@ -88,12 +88,12 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"bitcoin-signet\"} |= \"UpdateTip\" [5m])) by (container)", + "expr": "sum(rate({container=\"$_4NK_MINER_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", "queryType": "", "refId": "A" } ], - "title": "Mises à Jour de la Chaîne Bitcoin", + "title": "Logs INFO - _4NK-miner", "type": "timeseries" }, { @@ -175,12 +175,12 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"blindbit-oracle\"} |= \"tweak\" [5m])) by (container)", + "expr": "sum(rate({container=\"$_4NK_MINER_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", "queryType": "", "refId": "A" } ], - "title": "Détection de Tweak (BlindBit)", + "title": "Erreurs - _4NK-miner", "type": "timeseries" }, { @@ -239,12 +239,12 @@ "uid": "loki" }, "editorMode": "code", - "expr": "count_over_time({container=\"bitcoin-signet\"} |= \"ERROR\" [1h])", + "expr": "count_over_time({container=\"$_4NK_MINER_DOCKER_NAME\"} |= \"ERROR\" [1h])", "queryType": "", "refId": "A" } ], - "title": "Erreurs Bitcoin (1h)", + "title": "Erreurs (1h)", "type": "stat" }, { @@ -252,244 +252,23 @@ "type": "loki", "uid": "loki" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 6, - "y": 8 - }, - "id": 4, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "editorMode": "code", - "expr": "count_over_time({container=\"blindbit-oracle\"} |= \"ERROR\" [1h])", - "queryType": "", - "refId": "A" - } - ], - "title": "Erreurs BlindBit (1h)", - "type": "stat" - }, - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 12, - "y": 8 - }, - "id": 5, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "editorMode": "code", - "expr": "count_over_time({container=\"bitcoin-signet\"} |= \"New block\" [1h])", - "queryType": "", - "refId": "A" - } - ], - "title": "Nouveaux Blocs (1h)", - "type": "stat" - }, - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 18, - "y": 8 - }, - "id": 6, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "editorMode": "code", - "expr": "count_over_time({container=\"blindbit-oracle\"} |= \"Silent payment\" [1h])", - "queryType": "", - "refId": "A" - } - ], - "title": "Silent Payments (1h)", - "type": "stat" - }, - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, "gridPos": { "h": 8, "w": 24, "x": 0, "y": 12 }, - "id": 7, + "id": 4, "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true + "showTime": false, + "showLabels": false, + "showCommonLabels": false, + "wrapLogMessage": false, + "prettifyLogMessage": false, + "enableLogDetails": true, + "dedupStrategy": "none", + "sortOrder": "Descending" }, - "pluginVersion": "10.0.0", "targets": [ { "datasource": { @@ -497,23 +276,21 @@ "uid": "loki" }, "editorMode": "code", - "expr": "{container=~\"bitcoin-signet|blindbit-oracle\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.container}} - {{.message}}\"", + "expr": "{container=\"$_4NK_MINER_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", "queryType": "", "refId": "A" } ], - "title": "Erreurs Bitcoin Services", - "type": "table" + "title": "Logs d'Erreur - _4NK-miner", + "type": "logs" } ], "refresh": "5s", "schemaVersion": 37, "style": "dark", "tags": [ - "bitcoin", - "signet", - "blindbit", - "oracle" + "_4NK-miner", + "auto-generated" ], "templating": { "list": [] @@ -524,9 +301,8 @@ }, "timepicker": {}, "timezone": "", - "title": "Bitcoin Services - Monitoring", - "uid": "bitcoin-services", + "title": "_4NK-miner - Monitoring", + "uid": "-4nk-miner", "version": 1, "weekStart": "" } - diff --git a/templates/dev/_4NK_modules/grafana/dashboards/_4NK-vault.json b/templates/dev/_4NK_modules/grafana/dashboards/_4NK-vault.json new file mode 100644 index 0000000..a541dac --- /dev/null +++ b/templates/dev/_4NK_modules/grafana/dashboards/_4NK-vault.json @@ -0,0 +1,308 @@ +{ + "annotations": { + "list": [] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$_4NK_VAULT_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "queryType": "", + "refId": "A" + } + ], + "title": "Logs INFO - _4NK-vault", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$_4NK_VAULT_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "queryType": "", + "refId": "A" + } + ], + "title": "Erreurs - _4NK-vault", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 8 + }, + "id": 3, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "count_over_time({container=\"$_4NK_VAULT_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "queryType": "", + "refId": "A" + } + ], + "title": "Erreurs (1h)", + "type": "stat" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 4, + "options": { + "showTime": false, + "showLabels": false, + "showCommonLabels": false, + "wrapLogMessage": false, + "prettifyLogMessage": false, + "enableLogDetails": true, + "dedupStrategy": "none", + "sortOrder": "Descending" + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "{container=\"$_4NK_VAULT_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "queryType": "", + "refId": "A" + } + ], + "title": "Logs d'Erreur - _4NK-vault", + "type": "logs" + } + ], + "refresh": "5s", + "schemaVersion": 37, + "style": "dark", + "tags": [ + "_4NK-vault", + "auto-generated" + ], + "templating": { + "list": [] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "_4NK-vault - Monitoring", + "uid": "-4nk-vault", + "version": 1, + "weekStart": "" +} diff --git a/templates/dev/_4NK_modules/grafana/dashboards/_4NK-web-status.json b/templates/dev/_4NK_modules/grafana/dashboards/_4NK-web-status.json new file mode 100644 index 0000000..d1fff44 --- /dev/null +++ b/templates/dev/_4NK_modules/grafana/dashboards/_4NK-web-status.json @@ -0,0 +1,308 @@ +{ + "annotations": { + "list": [] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$_4NK_WEB_STATUS_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "queryType": "", + "refId": "A" + } + ], + "title": "Logs INFO - _4NK-web-status", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$_4NK_WEB_STATUS_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "queryType": "", + "refId": "A" + } + ], + "title": "Erreurs - _4NK-web-status", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 8 + }, + "id": 3, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "count_over_time({container=\"$_4NK_WEB_STATUS_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "queryType": "", + "refId": "A" + } + ], + "title": "Erreurs (1h)", + "type": "stat" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 4, + "options": { + "showTime": false, + "showLabels": false, + "showCommonLabels": false, + "wrapLogMessage": false, + "prettifyLogMessage": false, + "enableLogDetails": true, + "dedupStrategy": "none", + "sortOrder": "Descending" + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "{container=\"$_4NK_WEB_STATUS_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "queryType": "", + "refId": "A" + } + ], + "title": "Logs d'Erreur - _4NK-web-status", + "type": "logs" + } + ], + "refresh": "5s", + "schemaVersion": 37, + "style": "dark", + "tags": [ + "_4NK-web-status", + "auto-generated" + ], + "templating": { + "list": [] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "_4NK-web-status - Monitoring", + "uid": "-4nk-web-status", + "version": 1, + "weekStart": "" +} diff --git a/templates/dev/_4NK_modules/grafana/dashboards/bitcoin-miner.json b/templates/dev/_4NK_modules/grafana/dashboards/bitcoin-miner.json deleted file mode 100644 index ed0bd13..0000000 --- a/templates/dev/_4NK_modules/grafana/dashboards/bitcoin-miner.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 0 - }, - "id": 1, - "options": { - "showTime": false, - "showLabels": false, - "showCommonLabels": false, - "wrapLogMessage": false, - "prettifyLogMessage": false, - "enableLogDetails": true, - "dedupStrategy": "none", - "sortOrder": "Descending" - }, - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "editorMode": "code", - "expr": "{job=\"bitcoin\"} |= \"block\" | logfmt", - "queryType": "", - "refId": "A" - } - ], - "title": "Bitcoin - Nouveaux Blocs", - "type": "logs" - }, - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 0 - }, - "id": 2, - "options": { - "showTime": false, - "showLabels": false, - "showCommonLabels": false, - "wrapLogMessage": false, - "prettifyLogMessage": false, - "enableLogDetails": true, - "dedupStrategy": "none", - "sortOrder": "Descending" - }, - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "editorMode": "code", - "expr": "{job=\"miner\"} |= \"mined\" | logfmt", - "queryType": "", - "refId": "A" - } - ], - "title": "Miner - Blocs Minés", - "type": "logs" - }, - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 8 - }, - "id": 3, - "options": { - "showTime": false, - "showLabels": false, - "showCommonLabels": false, - "wrapLogMessage": false, - "prettifyLogMessage": false, - "enableLogDetails": true, - "dedupStrategy": "none", - "sortOrder": "Descending" - }, - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "editorMode": "code", - "expr": "{job=~\"bitcoin|miner|blindbit\"} |= \"error\" | logfmt", - "queryType": "", - "refId": "A" - } - ], - "title": "Bitcoin/Miner/Blindbit - Erreurs", - "type": "logs" - } - ], - "refresh": "30s", - "schemaVersion": 36, - "style": "dark", - "tags": ["bitcoin", "miner", "blockchain"], - "templating": { - "list": [] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Bitcoin & Miner Monitoring", - "uid": "bitcoin-miner", - "version": 1, - "weekStart": "" -} diff --git a/templates/dev/_4NK_modules/grafana/dashboards/bitcoin-miner-detailed.json b/templates/dev/_4NK_modules/grafana/dashboards/bitcoin.json similarity index 67% rename from templates/dev/_4NK_modules/grafana/dashboards/bitcoin-miner-detailed.json rename to templates/dev/_4NK_modules/grafana/dashboards/bitcoin.json index c8469f9..76ee3a5 100644 --- a/templates/dev/_4NK_modules/grafana/dashboards/bitcoin-miner-detailed.json +++ b/templates/dev/_4NK_modules/grafana/dashboards/bitcoin.json @@ -88,12 +88,12 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"signet_miner\"} |= \"Block mined\" [5m])) by (container)", + "expr": "sum(rate({container=\"$BITCOIN_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", "queryType": "", "refId": "A" } ], - "title": "Blocs Minés par Minute", + "title": "Logs INFO - bitcoin", "type": "timeseries" }, { @@ -175,12 +175,12 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum(rate({container=\"signet_miner\"} |= \"Hashrate\" [5m])) by (container)", + "expr": "sum(rate({container=\"$BITCOIN_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", "queryType": "", "refId": "A" } ], - "title": "Hashrate du Mineur", + "title": "Erreurs - bitcoin", "type": "timeseries" }, { @@ -211,8 +211,8 @@ "overrides": [] }, "gridPos": { - "h": 8, - "w": 8, + "h": 4, + "w": 6, "x": 0, "y": 8 }, @@ -239,12 +239,12 @@ "uid": "loki" }, "editorMode": "code", - "expr": "count_over_time({container=\"signet_miner\"} |= \"ERROR\" [1h])", + "expr": "count_over_time({container=\"$BITCOIN_DOCKER_NAME\"} |= \"ERROR\" [1h])", "queryType": "", "refId": "A" } ], - "title": "Erreurs du Mineur (1h)", + "title": "Erreurs (1h)", "type": "stat" }, { @@ -252,112 +252,23 @@ "type": "loki", "uid": "loki" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - } - }, - "mappings": [] - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 16, - "x": 8, - "y": 8 - }, - "id": 4, - "options": { - "legend": { - "displayMode": "list", - "placement": "right" - }, - "pieType": "pie", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "editorMode": "code", - "expr": "sum by (level) (count_over_time({container=\"signet_miner\"} | json | level != \"\" [1h]))", - "queryType": "", - "refId": "A" - } - ], - "title": "Distribution des Niveaux de Log", - "type": "piechart" - }, - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, "gridPos": { "h": 8, "w": 24, "x": 0, - "y": 16 + "y": 12 }, - "id": 5, + "id": 4, "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true + "showTime": false, + "showLabels": false, + "showCommonLabels": false, + "wrapLogMessage": false, + "prettifyLogMessage": false, + "enableLogDetails": true, + "dedupStrategy": "none", + "sortOrder": "Descending" }, - "pluginVersion": "10.0.0", "targets": [ { "datasource": { @@ -365,13 +276,13 @@ "uid": "loki" }, "editorMode": "code", - "expr": "{container=\"signet_miner\"} |= \"Block mined\" | json | line_format \"{{.timestamp}} - Bloc {{.height}} miné - Hash: {{.hash}}\"", + "expr": "{container=\"$BITCOIN_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", "queryType": "", "refId": "A" } ], - "title": "Historique des Blocs Minés", - "type": "table" + "title": "Logs d'Erreur - bitcoin", + "type": "logs" } ], "refresh": "5s", @@ -379,8 +290,7 @@ "style": "dark", "tags": [ "bitcoin", - "miner", - "signet" + "auto-generated" ], "templating": { "list": [] @@ -391,9 +301,8 @@ }, "timepicker": {}, "timezone": "", - "title": "Bitcoin Miner - Détails", - "uid": "bitcoin-miner-detailed", + "title": "bitcoin - Monitoring", + "uid": "bitcoin", "version": 1, "weekStart": "" } - diff --git a/templates/dev/_4NK_modules/grafana/dashboards/blindbit-oracle.json b/templates/dev/_4NK_modules/grafana/dashboards/blindbit-oracle.json index 9d0a0fa..45766ab 100644 --- a/templates/dev/_4NK_modules/grafana/dashboards/blindbit-oracle.json +++ b/templates/dev/_4NK_modules/grafana/dashboards/blindbit-oracle.json @@ -1,28 +1,66 @@ { "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] + "list": [] }, "editable": true, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": null, "links": [], + "liveNow": false, "panels": [ { - "datasource": "Loki", + "datasource": { + "type": "loki", + "uid": "loki" + }, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } }, "overrides": [] }, @@ -34,25 +72,82 @@ }, "id": 1, "options": { - "showLabels": false, - "showTime": false, - "sortOrder": "Descending", - "wrapLogMessage": false + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } }, "targets": [ { - "expr": "{job=\"blindbit\"} |= \"Host configuration loaded\"", + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$BLINDBIT_ORACLE_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "queryType": "", "refId": "A" } ], - "title": "BlindBit Oracle - Configuration Loaded", - "type": "logs" + "title": "Logs INFO - blindbit-oracle", + "type": "timeseries" }, { - "datasource": "Loki", + "datasource": { + "type": "loki", + "uid": "loki" + }, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } }, "overrides": [] }, @@ -64,117 +159,138 @@ }, "id": 2, "options": { - "showLabels": false, - "showTime": false, - "sortOrder": "Descending", - "wrapLogMessage": false + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } }, "targets": [ { - "expr": "{job=\"blindbit\"} |= \"Sync took\"", + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$BLINDBIT_ORACLE_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "queryType": "", "refId": "A" } ], - "title": "BlindBit Oracle - Synchronization", - "type": "logs" + "title": "Erreurs - blindbit-oracle", + "type": "timeseries" }, { - "datasource": "Loki", + "datasource": { + "type": "loki", + "uid": "loki" + }, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } }, "overrides": [] }, "gridPos": { - "h": 8, - "w": 24, + "h": 4, + "w": 6, "x": 0, "y": 8 }, "id": 3, "options": { - "showLabels": false, - "showTime": false, - "sortOrder": "Descending", - "wrapLogMessage": false + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" }, + "pluginVersion": "10.0.0", "targets": [ { - "expr": "{job=\"blindbit\"} |= \"successfully processed block\"", + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "count_over_time({container=\"$BLINDBIT_ORACLE_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "queryType": "", "refId": "A" } ], - "title": "BlindBit Oracle - Block Processing", - "type": "logs" + "title": "Erreurs (1h)", + "type": "stat" }, { - "datasource": "Loki", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] + "datasource": { + "type": "loki", + "uid": "loki" }, "gridPos": { "h": 8, - "w": 12, + "w": 24, "x": 0, - "y": 16 + "y": 12 }, "id": 4, "options": { - "showLabels": false, "showTime": false, - "sortOrder": "Descending", - "wrapLogMessage": false + "showLabels": false, + "showCommonLabels": false, + "wrapLogMessage": false, + "prettifyLogMessage": false, + "enableLogDetails": true, + "dedupStrategy": "none", + "sortOrder": "Descending" }, "targets": [ { - "expr": "{job=\"blindbit\"} |= \"GET\" |~ \"/tweaks/\"", + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "{container=\"$BLINDBIT_ORACLE_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "queryType": "", "refId": "A" } ], - "title": "BlindBit Oracle - API Requests", - "type": "logs" - }, - { - "datasource": "Loki", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 16 - }, - "id": 5, - "options": { - "showLabels": false, - "showTime": false, - "sortOrder": "Descending", - "wrapLogMessage": false - }, - "targets": [ - { - "expr": "{job=\"blindbit\"} |~ \"ERROR|error|Error\"", - "refId": "A" - } - ], - "title": "BlindBit Oracle - Errors", + "title": "Logs d'Erreur - blindbit-oracle", "type": "logs" } ], - "schemaVersion": 27, + "refresh": "5s", + "schemaVersion": 37, "style": "dark", "tags": [ - "blindbit", - "oracle", - "blockchain" + "blindbit-oracle", + "auto-generated" ], "templating": { "list": [] @@ -185,8 +301,8 @@ }, "timepicker": {}, "timezone": "", - "title": "BlindBit Oracle Dashboard", + "title": "blindbit-oracle - Monitoring", "uid": "blindbit-oracle", - "version": 1 + "version": 1, + "weekStart": "" } - diff --git a/templates/dev/_4NK_modules/grafana/dashboards/grafana.json b/templates/dev/_4NK_modules/grafana/dashboards/grafana.json new file mode 100644 index 0000000..ce220cd --- /dev/null +++ b/templates/dev/_4NK_modules/grafana/dashboards/grafana.json @@ -0,0 +1,308 @@ +{ + "annotations": { + "list": [] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$GRAFANA_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "queryType": "", + "refId": "A" + } + ], + "title": "Logs INFO - grafana", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$GRAFANA_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "queryType": "", + "refId": "A" + } + ], + "title": "Erreurs - grafana", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 8 + }, + "id": 3, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "count_over_time({container=\"$GRAFANA_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "queryType": "", + "refId": "A" + } + ], + "title": "Erreurs (1h)", + "type": "stat" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 4, + "options": { + "showTime": false, + "showLabels": false, + "showCommonLabels": false, + "wrapLogMessage": false, + "prettifyLogMessage": false, + "enableLogDetails": true, + "dedupStrategy": "none", + "sortOrder": "Descending" + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "{container=\"$GRAFANA_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "queryType": "", + "refId": "A" + } + ], + "title": "Logs d'Erreur - grafana", + "type": "logs" + } + ], + "refresh": "5s", + "schemaVersion": 37, + "style": "dark", + "tags": [ + "grafana", + "auto-generated" + ], + "templating": { + "list": [] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "grafana - Monitoring", + "uid": "grafana", + "version": 1, + "weekStart": "" +} diff --git a/templates/dev/_4NK_modules/grafana/dashboards/ihm-client.json b/templates/dev/_4NK_modules/grafana/dashboards/ihm-client.json new file mode 100644 index 0000000..5e4be65 --- /dev/null +++ b/templates/dev/_4NK_modules/grafana/dashboards/ihm-client.json @@ -0,0 +1,308 @@ +{ + "annotations": { + "list": [] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$IHM_CLIENT_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "queryType": "", + "refId": "A" + } + ], + "title": "Logs INFO - ihm-client", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$IHM_CLIENT_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "queryType": "", + "refId": "A" + } + ], + "title": "Erreurs - ihm-client", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 8 + }, + "id": 3, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "count_over_time({container=\"$IHM_CLIENT_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "queryType": "", + "refId": "A" + } + ], + "title": "Erreurs (1h)", + "type": "stat" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 4, + "options": { + "showTime": false, + "showLabels": false, + "showCommonLabels": false, + "wrapLogMessage": false, + "prettifyLogMessage": false, + "enableLogDetails": true, + "dedupStrategy": "none", + "sortOrder": "Descending" + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "{container=\"$IHM_CLIENT_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "queryType": "", + "refId": "A" + } + ], + "title": "Logs d'Erreur - ihm-client", + "type": "logs" + } + ], + "refresh": "5s", + "schemaVersion": 37, + "style": "dark", + "tags": [ + "ihm-client", + "auto-generated" + ], + "templating": { + "list": [] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "ihm-client - Monitoring", + "uid": "ihm-client", + "version": 1, + "weekStart": "" +} diff --git a/templates/dev/_4NK_modules/grafana/dashboards/lecoffre-front.json b/templates/dev/_4NK_modules/grafana/dashboards/lecoffre-front.json new file mode 100644 index 0000000..a82acdd --- /dev/null +++ b/templates/dev/_4NK_modules/grafana/dashboards/lecoffre-front.json @@ -0,0 +1,308 @@ +{ + "annotations": { + "list": [] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$LECOFFRE_FRONT_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "queryType": "", + "refId": "A" + } + ], + "title": "Logs INFO - lecoffre-front", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$LECOFFRE_FRONT_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "queryType": "", + "refId": "A" + } + ], + "title": "Erreurs - lecoffre-front", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 8 + }, + "id": 3, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "count_over_time({container=\"$LECOFFRE_FRONT_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "queryType": "", + "refId": "A" + } + ], + "title": "Erreurs (1h)", + "type": "stat" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 4, + "options": { + "showTime": false, + "showLabels": false, + "showCommonLabels": false, + "wrapLogMessage": false, + "prettifyLogMessage": false, + "enableLogDetails": true, + "dedupStrategy": "none", + "sortOrder": "Descending" + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "{container=\"$LECOFFRE_FRONT_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "queryType": "", + "refId": "A" + } + ], + "title": "Logs d'Erreur - lecoffre-front", + "type": "logs" + } + ], + "refresh": "5s", + "schemaVersion": 37, + "style": "dark", + "tags": [ + "lecoffre-front", + "auto-generated" + ], + "templating": { + "list": [] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "lecoffre-front - Monitoring", + "uid": "lecoffre-front", + "version": 1, + "weekStart": "" +} diff --git a/templates/dev/_4NK_modules/grafana/dashboards/loki.json b/templates/dev/_4NK_modules/grafana/dashboards/loki.json new file mode 100644 index 0000000..61cf966 --- /dev/null +++ b/templates/dev/_4NK_modules/grafana/dashboards/loki.json @@ -0,0 +1,308 @@ +{ + "annotations": { + "list": [] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$LOKI_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "queryType": "", + "refId": "A" + } + ], + "title": "Logs INFO - loki", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$LOKI_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "queryType": "", + "refId": "A" + } + ], + "title": "Erreurs - loki", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 8 + }, + "id": 3, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "count_over_time({container=\"$LOKI_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "queryType": "", + "refId": "A" + } + ], + "title": "Erreurs (1h)", + "type": "stat" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 4, + "options": { + "showTime": false, + "showLabels": false, + "showCommonLabels": false, + "wrapLogMessage": false, + "prettifyLogMessage": false, + "enableLogDetails": true, + "dedupStrategy": "none", + "sortOrder": "Descending" + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "{container=\"$LOKI_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "queryType": "", + "refId": "A" + } + ], + "title": "Logs d'Erreur - loki", + "type": "logs" + } + ], + "refresh": "5s", + "schemaVersion": 37, + "style": "dark", + "tags": [ + "loki", + "auto-generated" + ], + "templating": { + "list": [] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "loki - Monitoring", + "uid": "loki", + "version": 1, + "weekStart": "" +} diff --git a/templates/dev/_4NK_modules/grafana/dashboards/ngnix.json b/templates/dev/_4NK_modules/grafana/dashboards/ngnix.json new file mode 100644 index 0000000..5e8b3ef --- /dev/null +++ b/templates/dev/_4NK_modules/grafana/dashboards/ngnix.json @@ -0,0 +1,308 @@ +{ + "annotations": { + "list": [] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$NGNIX_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "queryType": "", + "refId": "A" + } + ], + "title": "Logs INFO - ngnix", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$NGNIX_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "queryType": "", + "refId": "A" + } + ], + "title": "Erreurs - ngnix", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 8 + }, + "id": 3, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "count_over_time({container=\"$NGNIX_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "queryType": "", + "refId": "A" + } + ], + "title": "Erreurs (1h)", + "type": "stat" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 4, + "options": { + "showTime": false, + "showLabels": false, + "showCommonLabels": false, + "wrapLogMessage": false, + "prettifyLogMessage": false, + "enableLogDetails": true, + "dedupStrategy": "none", + "sortOrder": "Descending" + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "{container=\"$NGNIX_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "queryType": "", + "refId": "A" + } + ], + "title": "Logs d'Erreur - ngnix", + "type": "logs" + } + ], + "refresh": "5s", + "schemaVersion": 37, + "style": "dark", + "tags": [ + "ngnix", + "auto-generated" + ], + "templating": { + "list": [] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "ngnix - Monitoring", + "uid": "ngnix", + "version": 1, + "weekStart": "" +} diff --git a/templates/dev/_4NK_modules/grafana/dashboards/postgresql.json b/templates/dev/_4NK_modules/grafana/dashboards/postgresql.json new file mode 100644 index 0000000..5ae1014 --- /dev/null +++ b/templates/dev/_4NK_modules/grafana/dashboards/postgresql.json @@ -0,0 +1,308 @@ +{ + "annotations": { + "list": [] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$POSTGRESQL_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "queryType": "", + "refId": "A" + } + ], + "title": "Logs INFO - postgresql", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$POSTGRESQL_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "queryType": "", + "refId": "A" + } + ], + "title": "Erreurs - postgresql", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 8 + }, + "id": 3, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "count_over_time({container=\"$POSTGRESQL_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "queryType": "", + "refId": "A" + } + ], + "title": "Erreurs (1h)", + "type": "stat" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 4, + "options": { + "showTime": false, + "showLabels": false, + "showCommonLabels": false, + "wrapLogMessage": false, + "prettifyLogMessage": false, + "enableLogDetails": true, + "dedupStrategy": "none", + "sortOrder": "Descending" + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "{container=\"$POSTGRESQL_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "queryType": "", + "refId": "A" + } + ], + "title": "Logs d'Erreur - postgresql", + "type": "logs" + } + ], + "refresh": "5s", + "schemaVersion": 37, + "style": "dark", + "tags": [ + "postgresql", + "auto-generated" + ], + "templating": { + "list": [] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "postgresql - Monitoring", + "uid": "postgresql", + "version": 1, + "weekStart": "" +} diff --git a/templates/dev/_4NK_modules/grafana/dashboards/promtail.json b/templates/dev/_4NK_modules/grafana/dashboards/promtail.json new file mode 100644 index 0000000..f2cef80 --- /dev/null +++ b/templates/dev/_4NK_modules/grafana/dashboards/promtail.json @@ -0,0 +1,308 @@ +{ + "annotations": { + "list": [] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$PROMTAIL_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "queryType": "", + "refId": "A" + } + ], + "title": "Logs INFO - promtail", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$PROMTAIL_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "queryType": "", + "refId": "A" + } + ], + "title": "Erreurs - promtail", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 8 + }, + "id": 3, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "count_over_time({container=\"$PROMTAIL_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "queryType": "", + "refId": "A" + } + ], + "title": "Erreurs (1h)", + "type": "stat" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 4, + "options": { + "showTime": false, + "showLabels": false, + "showCommonLabels": false, + "wrapLogMessage": false, + "prettifyLogMessage": false, + "enableLogDetails": true, + "dedupStrategy": "none", + "sortOrder": "Descending" + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "{container=\"$PROMTAIL_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "queryType": "", + "refId": "A" + } + ], + "title": "Logs d'Erreur - promtail", + "type": "logs" + } + ], + "refresh": "5s", + "schemaVersion": 37, + "style": "dark", + "tags": [ + "promtail", + "auto-generated" + ], + "templating": { + "list": [] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "promtail - Monitoring", + "uid": "promtail", + "version": 1, + "weekStart": "" +} diff --git a/templates/dev/_4NK_modules/grafana/dashboards/redis.json b/templates/dev/_4NK_modules/grafana/dashboards/redis.json new file mode 100644 index 0000000..e6ef3ee --- /dev/null +++ b/templates/dev/_4NK_modules/grafana/dashboards/redis.json @@ -0,0 +1,308 @@ +{ + "annotations": { + "list": [] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$REDIS_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "queryType": "", + "refId": "A" + } + ], + "title": "Logs INFO - redis", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$REDIS_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "queryType": "", + "refId": "A" + } + ], + "title": "Erreurs - redis", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 8 + }, + "id": 3, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "count_over_time({container=\"$REDIS_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "queryType": "", + "refId": "A" + } + ], + "title": "Erreurs (1h)", + "type": "stat" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 4, + "options": { + "showTime": false, + "showLabels": false, + "showCommonLabels": false, + "wrapLogMessage": false, + "prettifyLogMessage": false, + "enableLogDetails": true, + "dedupStrategy": "none", + "sortOrder": "Descending" + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "{container=\"$REDIS_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "queryType": "", + "refId": "A" + } + ], + "title": "Logs d'Erreur - redis", + "type": "logs" + } + ], + "refresh": "5s", + "schemaVersion": 37, + "style": "dark", + "tags": [ + "redis", + "auto-generated" + ], + "templating": { + "list": [] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "redis - Monitoring", + "uid": "redis", + "version": 1, + "weekStart": "" +} diff --git a/templates/dev/_4NK_modules/grafana/dashboards/sdk-relay.json b/templates/dev/_4NK_modules/grafana/dashboards/sdk-relay.json new file mode 100644 index 0000000..27e2083 --- /dev/null +++ b/templates/dev/_4NK_modules/grafana/dashboards/sdk-relay.json @@ -0,0 +1,308 @@ +{ + "annotations": { + "list": [] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$SDK_RELAY_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "queryType": "", + "refId": "A" + } + ], + "title": "Logs INFO - sdk-relay", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$SDK_RELAY_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "queryType": "", + "refId": "A" + } + ], + "title": "Erreurs - sdk-relay", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 8 + }, + "id": 3, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "count_over_time({container=\"$SDK_RELAY_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "queryType": "", + "refId": "A" + } + ], + "title": "Erreurs (1h)", + "type": "stat" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 4, + "options": { + "showTime": false, + "showLabels": false, + "showCommonLabels": false, + "wrapLogMessage": false, + "prettifyLogMessage": false, + "enableLogDetails": true, + "dedupStrategy": "none", + "sortOrder": "Descending" + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "{container=\"$SDK_RELAY_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "queryType": "", + "refId": "A" + } + ], + "title": "Logs d'Erreur - sdk-relay", + "type": "logs" + } + ], + "refresh": "5s", + "schemaVersion": 37, + "style": "dark", + "tags": [ + "sdk-relay", + "auto-generated" + ], + "templating": { + "list": [] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "sdk-relay - Monitoring", + "uid": "sdk-relay", + "version": 1, + "weekStart": "" +} diff --git a/templates/dev/_4NK_modules/grafana/dashboards/sdk-services.json b/templates/dev/_4NK_modules/grafana/dashboards/sdk-services.json deleted file mode 100644 index 112fa6a..0000000 --- a/templates/dev/_4NK_modules/grafana/dashboards/sdk-services.json +++ /dev/null @@ -1,594 +0,0 @@ -{ - "annotations": { - "list": [] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 0, - "y": 0 - }, - "id": 1, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "editorMode": "code", - "expr": "sum(rate({container=~\"sdk_.*\"} |= \"message\" [5m])) by (container)", - "queryType": "", - "refId": "A" - } - ], - "title": "Messages par Service SDK", - "type": "timeseries" - }, - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 8, - "y": 0 - }, - "id": 2, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "editorMode": "code", - "expr": "sum(rate({container=\"sdk_relay\"} |= \"transaction\" [5m])) by (container)", - "queryType": "", - "refId": "A" - } - ], - "title": "Transactions Relay", - "type": "timeseries" - }, - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 16, - "y": 0 - }, - "id": 3, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "title": "Signatures Signer", - "type": "timeseries" - }, - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 0, - "y": 8 - }, - "id": 4, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "editorMode": "code", - "expr": "count_over_time({container=\"sdk_relay\"} |= \"ERROR\" [1h])", - "queryType": "", - "refId": "A" - } - ], - "title": "Erreurs Relay (1h)", - "type": "stat" - }, - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 6, - "y": 8 - }, - "id": 5, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "title": "Erreurs Signer (1h)", - "type": "stat" - }, - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 12, - "y": 8 - }, - "id": 6, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "editorMode": "code", - "expr": "count_over_time({container=\"sdk_storage\"} |= \"ERROR\" [1h])", - "queryType": "", - "refId": "A" - } - ], - "title": "Erreurs Storage (1h)", - "type": "stat" - }, - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 18, - "y": 8 - }, - "id": 7, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "editorMode": "code", - "expr": "sum(count_over_time({container=~\"sdk_.*\"} [1h]))", - "queryType": "", - "refId": "A" - } - ], - "title": "Total Logs SDK (1h)", - "type": "stat" - }, - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 12 - }, - "id": 8, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.0.0", - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "editorMode": "code", - "expr": "{container=~\"sdk_.*\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.container}} - {{.message}}\"", - "queryType": "", - "refId": "A" - } - ], - "title": "Erreurs Récentes SDK", - "type": "table" - } - ], - "refresh": "5s", - "schemaVersion": 37, - "style": "dark", - "tags": [ - "sdk", - "relay", - "signer", - "storage" - ], - "templating": { - "list": [] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "SDK Services - Monitoring", - "uid": "sdk-services", - "version": 1, - "weekStart": "" -} diff --git a/templates/dev/_4NK_modules/grafana/dashboards/sdk-storage.json b/templates/dev/_4NK_modules/grafana/dashboards/sdk-storage.json new file mode 100644 index 0000000..38bffe1 --- /dev/null +++ b/templates/dev/_4NK_modules/grafana/dashboards/sdk-storage.json @@ -0,0 +1,308 @@ +{ + "annotations": { + "list": [] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$SDK_STORAGE_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", + "queryType": "", + "refId": "A" + } + ], + "title": "Logs INFO - sdk-storage", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "vis": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "sum(rate({container=\"$SDK_STORAGE_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", + "queryType": "", + "refId": "A" + } + ], + "title": "Erreurs - sdk-storage", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 8 + }, + "id": 3, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "count_over_time({container=\"$SDK_STORAGE_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "queryType": "", + "refId": "A" + } + ], + "title": "Erreurs (1h)", + "type": "stat" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 4, + "options": { + "showTime": false, + "showLabels": false, + "showCommonLabels": false, + "wrapLogMessage": false, + "prettifyLogMessage": false, + "enableLogDetails": true, + "dedupStrategy": "none", + "sortOrder": "Descending" + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "{container=\"$SDK_STORAGE_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "queryType": "", + "refId": "A" + } + ], + "title": "Logs d'Erreur - sdk-storage", + "type": "logs" + } + ], + "refresh": "5s", + "schemaVersion": 37, + "style": "dark", + "tags": [ + "sdk-storage", + "auto-generated" + ], + "templating": { + "list": [] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "sdk-storage - Monitoring", + "uid": "sdk-storage", + "version": 1, + "weekStart": "" +} diff --git a/templates/dev/_4NK_modules/grafana/dashboards/services-overview.json b/templates/dev/_4NK_modules/grafana/dashboards/services-overview.json index b27238f..a4bb478 100644 --- a/templates/dev/_4NK_modules/grafana/dashboards/services-overview.json +++ b/templates/dev/_4NK_modules/grafana/dashboards/services-overview.json @@ -1,25 +1,6 @@ { "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] + "list": [] }, "editable": true, "fiscalYearStartMonth": 0, @@ -86,7 +67,7 @@ }, "gridPos": { "h": 8, - "w": 6, + "w": 24, "x": 0, "y": 0 }, @@ -102,83 +83,6 @@ "sort": "none" } }, - "title": "LeCoffre Backend - Volume Logs", - "type": "timeseries" - }, - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 2, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, "targets": [ { "datasource": { @@ -186,222 +90,19 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum by (service) (count_over_time({job=\"lecoffre-front\"} [5m]))", + "expr": "sum by (container) (count_over_time({container=~\"$bitcoin_DOCKER_NAME|$blindbit-oracle_DOCKER_NAME|$sdk_relay_DOCKER_NAME|$sdk_storage_DOCKER_NAME|$ihm_client_DOCKER_NAME|$lecoffre-front_DOCKER_NAME\"} |= \"ERROR\" [5m]))", "queryType": "", "refId": "A" } ], - "title": "LeCoffre Frontend - Volume Logs", + "title": "Erreurs par Service (5 dernières minutes)", "type": "timeseries" - }, - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 3, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "editorMode": "code", - "expr": "sum by (service) (count_over_time({job=\"ihm_client\"} [5m]))", - "queryType": "", - "refId": "A" - } - ], - "title": "IHM Client - Volume Logs", - "type": "timeseries" - }, - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "vis": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 4, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "editorMode": "code", - "expr": "sum by (service) (count_over_time({job=\"sdk_relay\"} [5m]))", - "queryType": "", - "refId": "A" - } - ], - "title": "SDK Relay - Volume Logs", - "type": "timeseries" - }, - { - "datasource": { - "type": "loki", - "uid": "loki" - }, - "gridPos": { - "h": 12, - "w": 24, - "x": 0, - "y": 8 - }, - "id": 5, - "options": { - "showTime": false, - "showLabels": false, - "showCommonLabels": false, - "wrapLogMessage": false, - "prettifyLogMessage": false, - "enableLogDetails": true, - "dedupStrategy": "none", - "sortOrder": "Descending" - }, - "title": "Logs d'Erreur - Services Applications", - "type": "logs" } ], "refresh": "30s", "schemaVersion": 36, "style": "dark", - "tags": ["services", "applications"], + "tags": ["overview", "auto-generated"], "templating": { "list": [] }, @@ -411,8 +112,8 @@ }, "timepicker": {}, "timezone": "", - "title": "Services Applications - Monitoring", - "uid": "services-overview", + "title": "Services Overview - Auto Generated", + "uid": "services-overview-auto", "version": 1, "weekStart": "" } diff --git a/templates/dev/_4NK_modules/grafana/dashboards/lecoffre-overview.json b/templates/dev/_4NK_modules/grafana/dashboards/tor.json similarity index 67% rename from templates/dev/_4NK_modules/grafana/dashboards/lecoffre-overview.json rename to templates/dev/_4NK_modules/grafana/dashboards/tor.json index 9ecf781..a461b10 100644 --- a/templates/dev/_4NK_modules/grafana/dashboards/lecoffre-overview.json +++ b/templates/dev/_4NK_modules/grafana/dashboards/tor.json @@ -1,25 +1,6 @@ { "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] + "list": [] }, "editable": true, "fiscalYearStartMonth": 0, @@ -79,8 +60,7 @@ "value": 80 } ] - }, - "unit": "short" + } }, "overrides": [] }, @@ -98,8 +78,7 @@ "placement": "bottom" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "single" } }, "targets": [ @@ -109,12 +88,12 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum by (service) (count_over_time({job=~\".*\"} |= \"error\" [5m]))", + "expr": "sum(rate({container=\"$TOR_DOCKER_NAME\"} |= \"INFO\" [5m])) by (container)", "queryType": "", "refId": "A" } ], - "title": "Erreurs par Service (5 dernières minutes)", + "title": "Logs INFO - tor", "type": "timeseries" }, { @@ -168,8 +147,7 @@ "value": 80 } ] - }, - "unit": "short" + } }, "overrides": [] }, @@ -187,8 +165,7 @@ "placement": "bottom" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "single" } }, "targets": [ @@ -198,12 +175,12 @@ "uid": "loki" }, "editorMode": "code", - "expr": "sum by (service) (count_over_time({job=~\".*\"} [5m]))", + "expr": "sum(rate({container=\"$TOR_DOCKER_NAME\"} |= \"ERROR\" [5m])) by (container)", "queryType": "", "refId": "A" } ], - "title": "Volume de Logs par Service (5 dernières minutes)", + "title": "Erreurs - tor", "type": "timeseries" }, { @@ -211,13 +188,77 @@ "type": "loki", "uid": "loki" }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, "gridPos": { - "h": 12, - "w": 24, + "h": 4, + "w": 6, "x": 0, "y": 8 }, "id": 3, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "count_over_time({container=\"$TOR_DOCKER_NAME\"} |= \"ERROR\" [1h])", + "queryType": "", + "refId": "A" + } + ], + "title": "Erreurs (1h)", + "type": "stat" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 4, "options": { "showTime": false, "showLabels": false, @@ -228,14 +269,29 @@ "dedupStrategy": "none", "sortOrder": "Descending" }, - "title": "Logs d'Erreur - Tous Services", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "editorMode": "code", + "expr": "{container=\"$TOR_DOCKER_NAME\"} |= \"ERROR\" | line_format \"{{.timestamp}} - {{.message}}\"", + "queryType": "", + "refId": "A" + } + ], + "title": "Logs d'Erreur - tor", "type": "logs" } ], - "refresh": "30s", - "schemaVersion": 36, + "refresh": "5s", + "schemaVersion": 37, "style": "dark", - "tags": ["lecoffre", "monitoring"], + "tags": [ + "tor", + "auto-generated" + ], "templating": { "list": [] }, @@ -245,8 +301,8 @@ }, "timepicker": {}, "timezone": "", - "title": "LeCoffre Node - Vue d'ensemble", - "uid": "lecoffre-overview", + "title": "tor - Monitoring", + "uid": "tor", "version": 1, "weekStart": "" } diff --git a/templates/dev/_4NK_modules/promtail/promtail.yml b/templates/dev/_4NK_modules/promtail/promtail.yml index 40d27ea..5377b26 100644 --- a/templates/dev/_4NK_modules/promtail/promtail.yml +++ b/templates/dev/_4NK_modules/promtail/promtail.yml @@ -1,107 +1,334 @@ server: - http_listen_port: $PROMTAIL_PORT + http_listen_port: 9080 grpc_listen_port: 0 positions: filename: /tmp/positions.yaml clients: - - url: $LOKI_URL/loki/api/v1/push + - url: http://loki:3100/loki/api/v1/push scrape_configs: - # Bitcoin Signet Logs - - job_name: bitcoin - static_configs: - - targets: - - localhost - labels: - job: bitcoin - service: bitcoin-signet - __path__: $BITCOIN_LOGS_DIR/*.log - # Blindbit Oracle Logs - - job_name: blindbit + - job_name: 'REDIS' static_configs: - targets: - localhost labels: - job: blindbit - service: blindbit-oracle - __path__: $BLINDBIT_LOGS_DIR/*.log + job: REDIS + __path__: $REDIS_LOGS_DIR/*.log + pipeline_stages: + - match: + selector: '{job="REDIS"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' - # SDK Relay Logs - - job_name: sdk_relay + - job_name: 'POSTGRESQL' static_configs: - targets: - localhost labels: - job: sdk_relay - service: sdk_relay - __path__: $SDK_RELAY_LOGS_DIR/*.log + job: POSTGRESQL + __path__: $POSTGRESQL_LOGS_DIR/*.log + pipeline_stages: + - match: + selector: '{job="POSTGRESQL"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' - # SDK Storage Logs - - job_name: sdk_storage + - job_name: 'LOKI' static_configs: - targets: - localhost labels: - job: sdk_storage - service: sdk_storage - __path__: $SDK_STORAGE_LOGS_DIR/*.log + job: LOKI + __path__: $LOKI_LOGS_DIR/*.log + pipeline_stages: + - match: + selector: '{job="LOKI"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' - # LeCoffre Frontend Logs - - job_name: lecoffre-front + - job_name: 'PROMTAIL' static_configs: - targets: - localhost labels: - job: lecoffre-front - service: lecoffre-front - __path__: $LECOFFRE_FRONT_LOGS_DIR/*.log + job: PROMTAIL + __path__: $PROMTAIL_LOGS_DIR/*.log + pipeline_stages: + - match: + selector: '{job="PROMTAIL"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' - # IHM Client Logs - - job_name: ihm_client + - job_name: 'GRAFANA' static_configs: - targets: - localhost labels: - job: ihm_client - service: ihm_client - __path__: $IHM_CLIENT_LOGS_DIR/*.log + job: GRAFANA + __path__: $GRAFANA_LOGS_DIR/*.log + pipeline_stages: + - match: + selector: '{job="GRAFANA"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' - # Miner Logs - - job_name: miner + - job_name: 'NGNIX' static_configs: - targets: - localhost labels: - job: miner - service: signet_miner - __path__: $MINER_LOGS_DIR/*.log + job: NGNIX + __path__: $NGNIX_LOGS_DIR/*.log + pipeline_stages: + - match: + selector: '{job="NGNIX"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' - # Tor Logs - - job_name: tor + - job_name: 'TOR' static_configs: - targets: - localhost labels: - job: tor - service: tor-proxy + job: TOR __path__: $TOR_LOGS_DIR/*.log + pipeline_stages: + - match: + selector: '{job="TOR"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' - # Docker Container Logs - - job_name: docker - docker_sd_configs: - - host: unix:///var/run/docker.sock - refresh_interval: 5s - filters: - - name: label - values: ["com.centurylinklabs.watchtower.enable=true"] - relabel_configs: - - source_labels: ['__meta_docker_container_name'] - regex: '/?(.*)' - target_label: 'container_name' - - source_labels: ['__meta_docker_container_log_stream'] - target_label: 'logstream' - - source_labels: ['__meta_docker_container_label_logging_job_name'] - target_label: 'job' + - job_name: '_4NK_VAULT' + static_configs: + - targets: + - localhost + labels: + job: _4NK_VAULT + __path__: $_4NK_VAULT_LOGS_DIR/*.log + pipeline_stages: + - match: + selector: '{job="_4NK_VAULT"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' + + - job_name: 'BITCOIN' + static_configs: + - targets: + - localhost + labels: + job: BITCOIN + __path__: $BITCOIN_LOGS_DIR/*.log + pipeline_stages: + - match: + selector: '{job="BITCOIN"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' + + - job_name: 'BLINDBIT_ORACLE' + static_configs: + - targets: + - localhost + labels: + job: BLINDBIT_ORACLE + __path__: $BLINDBIT_ORACLE_LOGS_DIR/*.log + pipeline_stages: + - match: + selector: '{job="BLINDBIT_ORACLE"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' + + - job_name: 'SDK_RELAY' + static_configs: + - targets: + - localhost + labels: + job: SDK_RELAY + __path__: $SDK_RELAY_LOGS_DIR/*.log + pipeline_stages: + - match: + selector: '{job="SDK_RELAY"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' + + - job_name: 'SDK_STORAGE' + static_configs: + - targets: + - localhost + labels: + job: SDK_STORAGE + __path__: $SDK_STORAGE_LOGS_DIR/*.log + pipeline_stages: + - match: + selector: '{job="SDK_STORAGE"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' + + - job_name: 'IHM_CLIENT' + static_configs: + - targets: + - localhost + labels: + job: IHM_CLIENT + __path__: $IHM_CLIENT_LOGS_DIR/*.log + pipeline_stages: + - match: + selector: '{job="IHM_CLIENT"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' + + - job_name: '_4NK_CERTIFICATOR' + static_configs: + - targets: + - localhost + labels: + job: _4NK_CERTIFICATOR + __path__: $_4NK_CERTIFICATOR_LOGS_DIR/*.log + pipeline_stages: + - match: + selector: '{job="_4NK_CERTIFICATOR"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' + + - job_name: '_4NK_MINER' + static_configs: + - targets: + - localhost + labels: + job: _4NK_MINER + __path__: $_4NK_MINER_LOGS_DIR/*.log + pipeline_stages: + - match: + selector: '{job="_4NK_MINER"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' + + - job_name: 'LECOFFRE_FRONT' + static_configs: + - targets: + - localhost + labels: + job: LECOFFRE_FRONT + __path__: $LECOFFRE_FRONT_LOGS_DIR/*.log + pipeline_stages: + - match: + selector: '{job="LECOFFRE_FRONT"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' + + - job_name: '_4NK_WEB_STATUS' + static_configs: + - targets: + - localhost + labels: + job: _4NK_WEB_STATUS + __path__: $_4NK_WEB_STATUS_LOGS_DIR/*.log + pipeline_stages: + - match: + selector: '{job="_4NK_WEB_STATUS"}' + stages: + - regex: + expression: '^(?P\S+\s\S+)\s+(?P\S+)\s+(?P.*)' + - labels: + level: + - timestamp: + source: timestamp + format: '2006-01-02 15:04:05' diff --git a/templates/dev/generate.sh b/templates/dev/generate.sh index ea0a487..0121e60 100755 --- a/templates/dev/generate.sh +++ b/templates/dev/generate.sh @@ -157,8 +157,8 @@ show_summary() { echo -e "\n${CYAN}📁 Fichiers générés:${NC}" echo -e " • ${GREEN}docker-compose.yml.auto${NC} - Configuration Docker" echo -e " • ${GREEN}.env.auto${NC} - Variables d'environnement" - echo -e " • ${GREEN}4NK_modules/grafana/dashboards/${NC} - Dashboards Grafana" - echo -e " • ${GREEN}4NK_modules/promtail/promtail.yml${NC} - Configuration Promtail" + echo -e " • ${GREEN}_4NK_modules/grafana/dashboards/${NC} - Dashboards Grafana" + echo -e " • ${GREEN}_4NK_modules/promtail/promtail.yml${NC} - Configuration Promtail" echo -e " • ${GREEN}logrotade/${NC} - Configurations Logrotate" echo -e " • ${GREEN}nginx/${NC} - Configurations Nginx" @@ -271,7 +271,7 @@ main() { if execute_script "generate_grafana_dashboards.sh" "./generate_grafana_dashboards.sh" "Génère les dashboards Grafana"; then print_success "Dashboards Grafana générés avec succès" print_info "Fichiers créés:" - [ -d "4NK_modules/grafana/dashboards" ] && echo " • 4NK_modules/grafana/dashboards/ (dashboards)" + [ -d "4NK_modules/grafana/dashboards" ] && echo " • _4NK_modules/grafana/dashboards/ (dashboards)" else print_error "Échec de la génération des dashboards Grafana" fi @@ -281,7 +281,7 @@ main() { if execute_script "generate_promtail_config.sh" "./generate_promtail_config.sh" "Génère la configuration Promtail"; then print_success "Configuration Promtail générée avec succès" print_info "Fichiers créés:" - [ -f "4NK_modules/promtail/promtail.yml" ] && echo " • 4NK_modules/promtail/promtail.yml" + [ -f "4NK_modules/promtail/promtail.yml" ] && echo " • _4NK_modules/promtail/promtail.yml" else print_error "Échec de la génération de la configuration Promtail" fi diff --git a/templates/dev/generate_grafana_dashboards.sh b/templates/dev/generate_grafana_dashboards.sh index 85b70cd..1c03e8d 100755 --- a/templates/dev/generate_grafana_dashboards.sh +++ b/templates/dev/generate_grafana_dashboards.sh @@ -26,10 +26,10 @@ generate_service_dashboard() { echo "🔧 Génération du dashboard pour $SERVICE ($SERVICE_NAME)" # Créer le répertoire si nécessaire - mkdir -p "4NK_modules/grafana/dashboards" + mkdir -p "_4NK_modules/grafana/dashboards" # Générer le nom du fichier - local DASHBOARD_FILE="4NK_modules/grafana/dashboards/${SERVICE_NAME}.json" + local DASHBOARD_FILE="_4NK_modules/grafana/dashboards/${SERVICE_NAME}.json" # Générer le contenu JSON du dashboard cat > "$DASHBOARD_FILE" << EOF @@ -350,9 +350,9 @@ EOF generate_overview_dashboard() { echo "🔧 Génération du dashboard overview" - mkdir -p "4NK_modules/grafana/dashboards" + mkdir -p "_4NK_modules/grafana/dashboards" - cat > "4NK_modules/grafana/dashboards/services-overview.json" << EOF + cat > "_4NK_modules/grafana/dashboards/services-overview.json" << EOF { "annotations": { "list": [] @@ -518,10 +518,10 @@ main() { load_env_files # Supprimer les fichiers de sortie existants (remplacer complètement) - rm -f "4NK_modules/grafana/dashboards"/*.json 2>/dev/null || true + rm -f "_4NK_modules/grafana/dashboards"/*.json 2>/dev/null || true # Créer le répertoire des dashboards - mkdir -p "4NK_modules/grafana/dashboards" + mkdir -p "_4NK_modules/grafana/dashboards" echo "📋 Génération des dashboards pour ${#SERVICES[@]} services..." @@ -543,7 +543,7 @@ main() { echo "" echo "✅ GÉNÉRATION TERMINÉE !" - echo "📁 Dashboards générés dans: 4NK_modules/grafana/dashboards/" + echo "📁 Dashboards générés dans: _4NK_modules/grafana/dashboards/" echo "🔧 Les dashboards utilisent les variables d'environnement pour les noms de containers" echo "📊 Services traités: ${#SERVICES[@]}" } diff --git a/templates/dev/generate_promtail_config.sh b/templates/dev/generate_promtail_config.sh index 1d49b78..4c54877 100755 --- a/templates/dev/generate_promtail_config.sh +++ b/templates/dev/generate_promtail_config.sh @@ -38,10 +38,10 @@ generate_promtail_config() { echo "🔧 Génération de la configuration Promtail" # Créer le répertoire si nécessaire - mkdir -p "4NK_modules/promtail" + mkdir -p "_4NK_modules/promtail" # Générer le fichier promtail.yml - cat > "4NK_modules/promtail/promtail.yml" << EOF + cat > "_4NK_modules/promtail/promtail.yml" << EOF server: http_listen_port: 9080 grpc_listen_port: 0 @@ -59,7 +59,7 @@ EOF for SERVICE_VAR in "${SERVICES[@]}"; do echo " 🔄 Ajout config Promtail pour $SERVICE_VAR" - cat >> "4NK_modules/promtail/promtail.yml" << EOF + cat >> "_4NK_modules/promtail/promtail.yml" << EOF - job_name: '$SERVICE_VAR' static_configs: @@ -94,10 +94,10 @@ main() { load_env_files # Supprimer le fichier de sortie existant (remplacer complètement) - rm -f "4NK_modules/promtail/promtail.yml" 2>/dev/null || true + rm -f "_4NK_modules/promtail/promtail.yml" 2>/dev/null || true # Créer le répertoire si nécessaire - mkdir -p "4NK_modules/promtail" + mkdir -p "_4NK_modules/promtail" # Vérifier que SERVICES est défini if [ -z "${SERVICES[*]:-}" ]; then @@ -112,7 +112,7 @@ main() { echo "" echo "✅ GÉNÉRATION TERMINÉE !" - echo "📁 Configuration générée: 4NK_modules/promtail/promtail.yml" + echo "📁 Configuration générée: _4NK_modules/promtail/promtail.yml" echo "🔧 Configuration Promtail pour ${#SERVICES[@]} services" echo "📊 Services traités: ${#SERVICES[@]}" } diff --git a/templates/dev/nginx/BITCOIN_https.conf b/templates/dev/nginx/BITCOIN_https.conf index f7bc870..c867da1 100644 --- a/templates/dev/nginx/BITCOIN_https.conf +++ b/templates/dev/nginx/BITCOIN_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour BITCOIN -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/templates/dev/nginx/BLINDBIT_ORACLE_https.conf b/templates/dev/nginx/BLINDBIT_ORACLE_https.conf index 41b5a47..f5301c9 100644 --- a/templates/dev/nginx/BLINDBIT_ORACLE_https.conf +++ b/templates/dev/nginx/BLINDBIT_ORACLE_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour BLINDBIT_ORACLE -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/templates/dev/nginx/GRAFANA_https.conf b/templates/dev/nginx/GRAFANA_https.conf index fd95d00..98cd5cb 100644 --- a/templates/dev/nginx/GRAFANA_https.conf +++ b/templates/dev/nginx/GRAFANA_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour GRAFANA -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/templates/dev/nginx/IHM_CLIENT_https.conf b/templates/dev/nginx/IHM_CLIENT_https.conf index 63d3ed2..e6d50d9 100644 --- a/templates/dev/nginx/IHM_CLIENT_https.conf +++ b/templates/dev/nginx/IHM_CLIENT_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour IHM_CLIENT -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/templates/dev/nginx/LECOFFRE_FRONT_https.conf b/templates/dev/nginx/LECOFFRE_FRONT_https.conf index f973a12..4654ab4 100644 --- a/templates/dev/nginx/LECOFFRE_FRONT_https.conf +++ b/templates/dev/nginx/LECOFFRE_FRONT_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour LECOFFRE_FRONT -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/templates/dev/nginx/LOKI_https.conf b/templates/dev/nginx/LOKI_https.conf index d0ca18a..37cb67a 100644 --- a/templates/dev/nginx/LOKI_https.conf +++ b/templates/dev/nginx/LOKI_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour LOKI -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/templates/dev/nginx/NGNIX_https.conf b/templates/dev/nginx/NGNIX_https.conf index 2628121..4791873 100644 --- a/templates/dev/nginx/NGNIX_https.conf +++ b/templates/dev/nginx/NGNIX_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour NGNIX -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/templates/dev/nginx/POSTGRESQL_https.conf b/templates/dev/nginx/POSTGRESQL_https.conf index 5052b28..3609804 100644 --- a/templates/dev/nginx/POSTGRESQL_https.conf +++ b/templates/dev/nginx/POSTGRESQL_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour POSTGRESQL -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/templates/dev/nginx/PROMTAIL_https.conf b/templates/dev/nginx/PROMTAIL_https.conf index 7be498c..56d8c38 100644 --- a/templates/dev/nginx/PROMTAIL_https.conf +++ b/templates/dev/nginx/PROMTAIL_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour PROMTAIL -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/templates/dev/nginx/REDIS_https.conf b/templates/dev/nginx/REDIS_https.conf index 44e1b28..344307a 100644 --- a/templates/dev/nginx/REDIS_https.conf +++ b/templates/dev/nginx/REDIS_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour REDIS -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/templates/dev/nginx/SDK_RELAY_https.conf b/templates/dev/nginx/SDK_RELAY_https.conf index 63591d0..eda12cc 100644 --- a/templates/dev/nginx/SDK_RELAY_https.conf +++ b/templates/dev/nginx/SDK_RELAY_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour SDK_RELAY -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/templates/dev/nginx/SDK_STORAGE_https.conf b/templates/dev/nginx/SDK_STORAGE_https.conf index 1edb43f..4d07c7b 100644 --- a/templates/dev/nginx/SDK_STORAGE_https.conf +++ b/templates/dev/nginx/SDK_STORAGE_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour SDK_STORAGE -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/templates/dev/nginx/TOR_https.conf b/templates/dev/nginx/TOR_https.conf index aac3c28..2138a9c 100644 --- a/templates/dev/nginx/TOR_https.conf +++ b/templates/dev/nginx/TOR_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour TOR -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/templates/dev/nginx/_4NK_CERTIFICATOR_https.conf b/templates/dev/nginx/_4NK_CERTIFICATOR_https.conf index 154ad9d..ac75c4d 100644 --- a/templates/dev/nginx/_4NK_CERTIFICATOR_https.conf +++ b/templates/dev/nginx/_4NK_CERTIFICATOR_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour _4NK_CERTIFICATOR -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/templates/dev/nginx/_4NK_MINER_https.conf b/templates/dev/nginx/_4NK_MINER_https.conf index 7dd6580..ce8459d 100644 --- a/templates/dev/nginx/_4NK_MINER_https.conf +++ b/templates/dev/nginx/_4NK_MINER_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour _4NK_MINER -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/templates/dev/nginx/_4NK_VAULT_https.conf b/templates/dev/nginx/_4NK_VAULT_https.conf index ec2d339..eaad184 100644 --- a/templates/dev/nginx/_4NK_VAULT_https.conf +++ b/templates/dev/nginx/_4NK_VAULT_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour _4NK_VAULT -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/templates/dev/nginx/_4NK_WEB_STATUS_https.conf b/templates/dev/nginx/_4NK_WEB_STATUS_https.conf index ad38560..64b7269 100644 --- a/templates/dev/nginx/_4NK_WEB_STATUS_https.conf +++ b/templates/dev/nginx/_4NK_WEB_STATUS_https.conf @@ -1,5 +1,5 @@ # Configuration HTTPS pour _4NK_WEB_STATUS -# Généré automatiquement le Sun Oct 5 14:24:24 UTC 2025 +# Généré automatiquement le Sun Oct 5 22:04:53 UTC 2025 server { listen 80; diff --git a/templates/dev/replace_variables_and_copy.sh b/templates/dev/replace_variables_and_copy.sh index 1eb100f..e748142 100755 --- a/templates/dev/replace_variables_and_copy.sh +++ b/templates/dev/replace_variables_and_copy.sh @@ -297,8 +297,8 @@ main() { # Modules 4NK (avec underscore) [ -d "_4NK_modules" ] && process_directory "_4NK_modules" "_4NK_modules" - # Modules 4NK (sans underscore) - [ -d "4NK_modules" ] && process_directory "4NK_modules" "4NK_modules" + # Modules 4NK (sans underscore) - DÉSACTIVÉ car générés dans _4NK_modules + # [ -d "4NK_modules" ] && process_directory "4NK_modules" "4NK_modules" # Configurations logrotate [ -d "logrotade" ] && process_directory "logrotade" "logrotade"