From db4f964715368198e7279fc37aa9e8e6ed695b57 Mon Sep 17 00:00:00 2001 From: paulparkinson Date: Mon, 4 Mar 2024 21:52:35 -0500 Subject: [PATCH 01/13] init for "Build MultiCloud Devops using Azure CI/CD Pipelines with Oracle Database Cloud Services" workshop --- db/changelog/db.changelog-master.xml | 2 - multicloudapp-servicemonitor.yaml | 16 + .../dashboards/multicloudapp-dashboard.json | 2814 +++++++++++++++++ .../createDBExporterResources.sh | 17 + .../createWalletConfigMap.sh | 13 + .../metrics-exporter-deployment.yaml | 68 + .../metrics-exporter-service.yaml | 18 + .../metrics-exporter-servicemonitor.yaml | 19 + observability/delete_k8s_observability.sh | 5 + observability/installPrometheusAndGrafana.sh | 12 + pom.xml | 13 + sql/createtable.sql | 0 sql/createuser.sql | 5 + src/main/resources/application.yaml | 5 + 14 files changed, 3005 insertions(+), 2 deletions(-) create mode 100644 multicloudapp-servicemonitor.yaml create mode 100644 observability/dashboards/multicloudapp-dashboard.json create mode 100644 observability/db-metrics-exporter/createDBExporterResources.sh create mode 100755 observability/db-metrics-exporter/createWalletConfigMap.sh create mode 100644 observability/db-metrics-exporter/metrics-exporter-deployment.yaml create mode 100644 observability/db-metrics-exporter/metrics-exporter-service.yaml create mode 100644 observability/db-metrics-exporter/metrics-exporter-servicemonitor.yaml create mode 100644 observability/delete_k8s_observability.sh create mode 100755 observability/installPrometheusAndGrafana.sh create mode 100644 sql/createtable.sql create mode 100644 sql/createuser.sql diff --git a/db/changelog/db.changelog-master.xml b/db/changelog/db.changelog-master.xml index b6dc748..5c733b3 100644 --- a/db/changelog/db.changelog-master.xml +++ b/db/changelog/db.changelog-master.xml @@ -5,11 +5,9 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd"> - - diff --git a/multicloudapp-servicemonitor.yaml b/multicloudapp-servicemonitor.yaml new file mode 100644 index 0000000..d27de26 --- /dev/null +++ b/multicloudapp-servicemonitor.yaml @@ -0,0 +1,16 @@ +## Copyright (c) 20214 Oracle and/or its affiliates. +## Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: prometheus-metrics-exporter + labels: + app: metrics-exporter + release: stable +spec: + endpoints: + - interval: 20s + port: metrics + selector: + matchLabels: + app: metrics-exporter diff --git a/observability/dashboards/multicloudapp-dashboard.json b/observability/dashboards/multicloudapp-dashboard.json new file mode 100644 index 0000000..dd86f08 --- /dev/null +++ b/observability/dashboards/multicloudapp-dashboard.json @@ -0,0 +1,2814 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "Prometheus", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "limit": 100, + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "GrabDish Monitoring", + "editable": true, + "gnetId": 12853, + "graphTooltip": 0, + "id": 26, + "links": [], + "panels": [ + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 43, + "panels": [], + "title": "FrontEnd Microservice", + "type": "row" + }, + { + "cacheTimeout": null, + "datasource": "Prometheus", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "text": "DOWN" + }, + "1": { + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#d44a3a", + "value": null + }, + { + "color": "#37872D", + "value": 1 + }, + { + "color": "#FADE2A" + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 4, + "x": 0, + "y": 1 + }, + "id": 54, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.5", + "targets": [ + { + "exemplar": true, + "expr": "up{job=\"frontend\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Status", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "Prometheus", + "description": " base_jvm_uptime_seconds Displays the uptime of the JVM in milliseconds.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 4, + "y": 1 + }, + "id": 56, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.5", + "targets": [ + { + "exemplar": true, + "expr": "base_jvm_uptime_seconds{job=\"frontend\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Uptime", + "type": "stat" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 5, + "x": 7, + "y": 1 + }, + "hiddenSeries": false, + "id": 62, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "base_thread_count{job=\"frontend\"}", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Thread Count", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Thread Count", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "application_io_helidon_data_examples_FrontEndResource_frontend_placeOrder_timed_mean_seconds{container=\"frontend\", endpoint=\"metrics\", instance=\"10.244.1.4:8080\", job=\"frontend\", namespace=\"msdataworkshop\", pod=\"frontend-helidon-789d788fbf-sxhqd\", service=\"frontend\"}" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": false, + "viz": true + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 41, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "application_io_helidon_data_examples_FrontEndResource_frontend_placeOrder_timed_mean_seconds", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": [], + "title": "PlaceOrder average time", + "type": "timeseries" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 7, + "x": 0, + "y": 3 + }, + "hiddenSeries": false, + "id": 60, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "base_cpu_systemLoadAverage", + "interval": "", + "intervalFactor": 2, + "legendFormat": "CPU load", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "CPU Load", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 9 + }, + "hiddenSeries": false, + "hideTimeOverride": false, + "id": 65, + "interval": "", + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "base_memory_usedHeap_bytes{job=\"frontend\"}", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Used Heap", + "refId": "A" + }, + { + "exemplar": true, + "expr": "base_memory_committedHeap_bytes{job=\"frontend\"}", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Commited Heap", + "refId": "C" + }, + { + "exemplar": true, + "expr": "base_memory_maxHeap_bytes{job=\"frontend\"}", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Max Heap", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Heap Sizes", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 16 + }, + "id": 39, + "panels": [], + "title": "Order Microservice and PDB with TEQ", + "type": "row" + }, + { + "cacheTimeout": null, + "datasource": "Prometheus", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "text": "DOWN" + }, + "1": { + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#d44a3a", + "value": null + }, + { + "color": "#37872D", + "value": 1 + }, + { + "color": "#FADE2A" + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 4, + "x": 0, + "y": 17 + }, + "id": 29, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.5", + "targets": [ + { + "exemplar": true, + "expr": "up{job=\"order\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Status", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "Prometheus", + "description": " base_jvm_uptime_seconds Displays the uptime of the JVM in milliseconds.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 4, + "y": 17 + }, + "id": 26, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.5", + "targets": [ + { + "exemplar": true, + "expr": "base_jvm_uptime_seconds{job=\"order\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Uptime", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "Prometheus", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "text": "DOWN" + }, + "1": { + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#d44a3a", + "value": null + }, + { + "color": "#37872D", + "value": 1 + }, + { + "color": "#FADE2A" + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 4, + "x": 12, + "y": 17 + }, + "id": 57, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.5", + "targets": [ + { + "exemplar": true, + "expr": "oracledb_up{job=\"db-metrics-exporter-order\"}", + "hide": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "PDB Status", + "type": "stat" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 0.01 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "1m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "avg" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "message": "PlaceOrder average time for Order service exceeded .02", + "name": "PlaceOrder average time alert", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": null, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "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": 19 + }, + "id": 90, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "application_io_helidon_data_examples_OrderResource_order_placeOrder_timed_mean_seconds", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "op": "gt", + "value": 0.01, + "visible": true + } + ], + "title": "PlaceOrder average time", + "type": "timeseries" + }, + { + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "oracledb_orderpdb_orders_by_status_value{endpoint=\"metrics\", instance=\"10.244.1.94:9161\", job=\"db-metrics-exporter-order\", namespace=\"msdataworkshop\", pod=\"db-metrics-exporter-orderpdb-86c776c7f4-tfpn9\", service=\"db-metrics-exporter-order\", status=\"pending\"}" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": false, + "viz": true + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 19 + }, + "id": 80, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "oracledb_orderpdb_orders_by_status_value", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Total number of orders by status", + "type": "timeseries" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "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": 27 + }, + "id": 37, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "application_io_helidon_data_examples_OrderResource_order_placeOrder_counted_total", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "PlaceOrder count", + "type": "timeseries" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "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": 27 + }, + "id": 35, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "oracledb_orderpdb_sessions_value", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Order PDB sessions", + "type": "timeseries" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 7, + "x": 0, + "y": 35 + }, + "hiddenSeries": false, + "id": 8, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "base_cpu_systemLoadAverage", + "interval": "", + "intervalFactor": 2, + "legendFormat": "CPU load", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "CPU Load", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 5, + "x": 7, + "y": 35 + }, + "hiddenSeries": false, + "id": 2, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "base_thread_count{job=\"order\"}", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Thread Count", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Thread Count", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "oracledb_orderqueue_messages_by_state_value{endpoint=\"metrics\", instance=\"10.244.1.236:9161\", job=\"db-metrics-exporter-order\", namespace=\"msdataworkshop\", pod=\"db-metrics-exporter-orderpdb-7555d7c448-97n94\", service=\"db-metrics-exporter-order\", state=\"0\"}" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": false, + "viz": true + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 35 + }, + "id": 69, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "oracledb_orderqueue_messages_by_state_value", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Order queue messages", + "type": "timeseries" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 41 + }, + "hiddenSeries": false, + "hideTimeOverride": false, + "id": 10, + "interval": "", + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "base_memory_usedHeap_bytes{job=\"order\"}", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Used Heap", + "refId": "A" + }, + { + "exemplar": true, + "expr": "base_memory_committedHeap_bytes{job=\"order\"}", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Commited Heap", + "refId": "C" + }, + { + "exemplar": true, + "expr": "base_memory_maxHeap_bytes{job=\"order\"}", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Max Heap", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Heap Sizes", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 48 + }, + "id": 45, + "panels": [], + "title": "Inventory Microservice and PDB with TEQ", + "type": "row" + }, + { + "cacheTimeout": null, + "datasource": "Prometheus", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "text": "DOWN" + }, + "1": { + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#d44a3a", + "value": null + }, + { + "color": "#37872D", + "value": 1 + }, + { + "color": "#FADE2A" + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 4, + "x": 0, + "y": 49 + }, + "id": 58, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.5", + "targets": [ + { + "exemplar": true, + "expr": "up{job=\"inventory\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Status", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "Prometheus", + "description": " base_jvm_uptime_seconds Displays the uptime of the JVM in milliseconds.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 4, + "y": 49 + }, + "id": 61, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.5", + "targets": [ + { + "exemplar": true, + "expr": "base_jvm_uptime_seconds{job=\"inventory\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Uptime", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "Prometheus", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "text": "DOWN" + }, + "1": { + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#d44a3a", + "value": null + }, + { + "color": "#37872D", + "value": 1 + }, + { + "color": "#FADE2A" + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 4, + "x": 12, + "y": 49 + }, + "id": 59, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.5", + "targets": [ + { + "exemplar": true, + "expr": "oracledb_up{job=\"db-metrics-exporter-inventory\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "PDB Status", + "transformations": [], + "type": "stat" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "application_inventorydoesnotexistCount_total{container=\"inventory\", endpoint=\"metrics\", instance=\"10.244.0.122:8080\", job=\"inventory\", namespace=\"msdataworkshop\", pod=\"inventory-helidon-bf88c6f7d-2mlt2\", service=\"inventory\"}" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": false, + "viz": true + } + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 51 + }, + "id": 47, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "application_inventorydoesnotexistCount_total{}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Inventory Does Not Exist Count", + "type": "timeseries" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "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": 51 + }, + "id": 82, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "oracledb_inventorypdb_inventory_by_inventoryid_value", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Inventory count by InventoryId", + "type": "timeseries" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "description": "", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 7, + "x": 0, + "y": 57 + }, + "hiddenSeries": false, + "id": 64, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "base_cpu_systemLoadAverage", + "interval": "", + "intervalFactor": 2, + "legendFormat": "CPU load", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "CPU Load", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 5, + "x": 7, + "y": 57 + }, + "hiddenSeries": false, + "id": 63, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "base_thread_count{job=\"inventory\"}", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Thread Count", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Thread Count", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "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": 59 + }, + "id": 49, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "oracledb_inventorypdb_sessions_value", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Inventory PDB sessions", + "type": "timeseries" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 63 + }, + "hiddenSeries": false, + "hideTimeOverride": false, + "id": 66, + "interval": "", + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.1.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "base_memory_usedHeap_bytes{job=\"inventory\"}", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Used Heap", + "refId": "A" + }, + { + "exemplar": true, + "expr": "base_memory_committedHeap_bytes{job=\"inventory\"}", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Commited Heap", + "refId": "C" + }, + { + "exemplar": true, + "expr": "base_memory_maxHeap_bytes{job=\"inventory\"}", + "interval": "", + "intervalFactor": 2, + "legendFormat": "Max Heap", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Heap Sizes", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "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": 67 + }, + "id": 70, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "oracledb_inventoryqueue_messages_by_state_value", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Inventory queue messages", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 75 + }, + "id": 84, + "panels": [], + "title": "Event Mesh (Message Propagation)", + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "index": 1, + "text": "UP" + }, + "1": { + "index": 0, + "text": "DOWN" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 76 + }, + "id": 88, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.5", + "targets": [ + { + "exemplar": true, + "expr": "oracledb_orderpdb_propagation_disabled_status_value{}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "OrderDB to InventoryDB Propagation Schedule", + "type": "stat" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "index": 1, + "text": "UP" + }, + "1": { + "index": 0, + "text": "DOWN" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 76 + }, + "id": 86, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.1.5", + "targets": [ + { + "exemplar": true, + "expr": "oracledb_inventorypdb_propagation_disabled_status_value{}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "InventoryDB to OrderDB Propagation Schedule", + "type": "stat" + } + ], + "refresh": false, + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-1m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "GrabDish Dash", + "uid": "kmgGniV7k", + "version": 6 +} \ No newline at end of file diff --git a/observability/db-metrics-exporter/createDBExporterResources.sh b/observability/db-metrics-exporter/createDBExporterResources.sh new file mode 100644 index 0000000..164d57d --- /dev/null +++ b/observability/db-metrics-exporter/createDBExporterResources.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright (c) 2024 Oracle and/or its affiliates. +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. + +kubectl create secret generic db-secret \ +--from-literal=username=admin \ +--from-literal=password=Welcome12345 + +kubectl apply -f metrics-exporter-deployment.yaml + +kubectl apply -f metrics-exporter-service.yaml + +kubectl apply -f metrics-exporter-servicemonitor.yaml + +#kubectl port-forward deployment/prometheus-grafana 3000 +#kubectl port-forward service/prometheus-operated 9090 +#kubectl port-forward deployment/metrics-exporter 9161 diff --git a/observability/db-metrics-exporter/createWalletConfigMap.sh b/observability/db-metrics-exporter/createWalletConfigMap.sh new file mode 100755 index 0000000..64f5517 --- /dev/null +++ b/observability/db-metrics-exporter/createWalletConfigMap.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# Copyright (c) 2024 Oracle and/or its affiliates. +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. + +kubectl create cm db-metrics-tns-admin \ + --from-file=cwallet.sso \ + --from-file=ewallet.p12 \ + --from-file=ewallet.pem \ + --from-file=keystore.jks \ + --from-file=ojdbc.properties \ + --from-file=sqlnet.ora \ + --from-file=tnsnames.ora \ + --from-file=truststore.jks diff --git a/observability/db-metrics-exporter/metrics-exporter-deployment.yaml b/observability/db-metrics-exporter/metrics-exporter-deployment.yaml new file mode 100644 index 0000000..518fec7 --- /dev/null +++ b/observability/db-metrics-exporter/metrics-exporter-deployment.yaml @@ -0,0 +1,68 @@ +## Copyright (c) 2021, 2023, Oracle and/or its affiliates. +## Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: metrics-exporter +spec: + replicas: 1 + selector: + matchLabels: + app: metrics-exporter + template: + metadata: + labels: + app: metrics-exporter + spec: + containers: + - name: metrics-exporter + image: container-registry.oracle.com/database/observability-exporter:1.0.0 + imagePullPolicy: Always + env: + # uncomment and customize the next item if you want to provide custom metrics definitions + #- name: CUSTOM_METRICS + # value: /oracle/observability/txeventq-metrics.toml + - name: TNS_ADMIN + value: "/oracle/tns_admin" + - name: DB_USERNAME + valueFrom: + secretKeyRef: + name: db-secret + key: username + optional: false + - name: DB_PASSWORD + valueFrom: + secretKeyRef: + name: db-secret + key: password + optional: false + # update the connect string below for your database - can be simple format, or use a tns name as shown: + - name: DB_CONNECT_STRING + value: "DEVDB_TP?TNS_ADMIN=$(TNS_ADMIN)" + - name: DB_CONNECT_STRING + value: "DEVDB_TP?TNS_ADMIN=$(TNS_ADMIN)" + volumeMounts: + - name: tns-admin + mountPath: /oracle/tns_admin + # uncomment and customize the next item if you want to provide custom metrics definitions + #- name: config-volume + # mountPath: /oracle/observability/txeventq-metrics.toml + # subPath: txeventq-metrics.toml + resources: + requests: + memory: "64Mi" + cpu: "250m" + limits: + memory: "128Mi" + cpu: "500m" + ports: + - containerPort: 8080 + restartPolicy: Always + volumes: + - name: tns-admin + configMap: + name: db-metrics-tns-admin + # uncomment and customize the next item if you want to provide custom metrics definitions + #- name: config-volume + # configMap: + # name: db-metrics-txeventq-exporter-config diff --git a/observability/db-metrics-exporter/metrics-exporter-service.yaml b/observability/db-metrics-exporter/metrics-exporter-service.yaml new file mode 100644 index 0000000..67ecd3b --- /dev/null +++ b/observability/db-metrics-exporter/metrics-exporter-service.yaml @@ -0,0 +1,18 @@ +## Copyright (c) 2021, 2023, Oracle and/or its affiliates. +## Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ +apiVersion: v1 +kind: Service +metadata: + name: metrics-exporter-svc + labels: + app: metrics-exporter + release: stable +spec: + type: ClusterIP + ports: + - port: 9161 + name: metrics + targetPort: 9161 + selector: + app: metrics-exporter + diff --git a/observability/db-metrics-exporter/metrics-exporter-servicemonitor.yaml b/observability/db-metrics-exporter/metrics-exporter-servicemonitor.yaml new file mode 100644 index 0000000..1a625b4 --- /dev/null +++ b/observability/db-metrics-exporter/metrics-exporter-servicemonitor.yaml @@ -0,0 +1,19 @@ +## Copyright (c) 20214 Oracle and/or its affiliates. +## Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: prometheus-metrics-exporter + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9161" + labels: + app: metrics-exporter + release: stable +spec: + endpoints: + - interval: 20s + port: metrics + selector: + matchLabels: + app: metrics-exporter diff --git a/observability/delete_k8s_observability.sh b/observability/delete_k8s_observability.sh new file mode 100644 index 0000000..d5fa40b --- /dev/null +++ b/observability/delete_k8s_observability.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# Copyright (c) 2024 Oracle and/or its affiliates. +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. + +helm uninstall prometheus \ No newline at end of file diff --git a/observability/installPrometheusAndGrafana.sh b/observability/installPrometheusAndGrafana.sh new file mode 100755 index 0000000..a54e321 --- /dev/null +++ b/observability/installPrometheusAndGrafana.sh @@ -0,0 +1,12 @@ +#!/bin/bash +## Copyright (c) 2021 Oracle and/or its affiliates. +## Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ + +# Fail on error +set -e + +echo Installing Prometheus and Grafana ... +helm repo add prometheus-community https://prometheus-community.github.io/helm-charts +helm repo add stable https://charts.helm.sh/stable +helm repo update +helm install prometheus prometheus-community/kube-prometheus-stack diff --git a/pom.xml b/pom.xml index 793d245..5553082 100644 --- a/pom.xml +++ b/pom.xml @@ -42,6 +42,19 @@ ${spring.boot.version} test + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-actuator + + + io.micrometer + micrometer-registry-prometheus + runtime + com.oracle.database.jdbc diff --git a/sql/createtable.sql b/sql/createtable.sql new file mode 100644 index 0000000..e69de29 diff --git a/sql/createuser.sql b/sql/createuser.sql new file mode 100644 index 0000000..6f35a03 --- /dev/null +++ b/sql/createuser.sql @@ -0,0 +1,5 @@ +CREATE USER aiuser identified BY [Yourpassword]; +GRANT CREATE session TO aiuser; +GRANT RESOURCE TO aiuser; +GRANT unlimited tablespace TO aiuser; +GRANT execute on DBMS_CLOUD to aiuser; \ No newline at end of file diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 4a06365..969be04 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -11,3 +11,8 @@ spring: logging: level: org.springframework.web.cors: DEBUG +management: + endpoints: + web: + exposure: + include: [ "prometheus" ] \ No newline at end of file From 2227988ccb02fde54d89bd7f254242e66d24c0a5 Mon Sep 17 00:00:00 2001 From: paulparkinson Date: Tue, 5 Mar 2024 19:05:26 -0500 Subject: [PATCH 02/13] init for "Build MultiCloud Devops using Azure CI/CD Pipelines with Oracle Database Cloud Services" workshop --- azure-pipelines-example.yaml | 9 +++++++++ azure-pipelines-liquibase-example.yaml | 9 +++++++++ .../servicemonitor.yaml | 16 ++++++++-------- sql/createtable.sql | 1 + 4 files changed, 27 insertions(+), 8 deletions(-) rename multicloudapp-servicemonitor.yaml => manifests/servicemonitor.yaml (62%) diff --git a/azure-pipelines-example.yaml b/azure-pipelines-example.yaml index 6311eb8..912b278 100644 --- a/azure-pipelines-example.yaml +++ b/azure-pipelines-example.yaml @@ -101,3 +101,12 @@ stages: containers: | $(containerRegistry)/$(imageRepository):$(tag) + - task: Kubernetes@1 + displayName: Deploy ServiceMonitor + inputs: + connectionType: Kubernetes Service Connection + kubernetesServiceEndpoint: $(kubernetesServiceConnection + namespace: default + command: apply + useConfigurationFile: true + configuration: $(Pipeline.Workspace)/manifests/servicemonitor.yaml diff --git a/azure-pipelines-liquibase-example.yaml b/azure-pipelines-liquibase-example.yaml index 67b9fcc..2641272 100644 --- a/azure-pipelines-liquibase-example.yaml +++ b/azure-pipelines-liquibase-example.yaml @@ -124,3 +124,12 @@ stages: DB_USERNAME: $(DB_USERNAME) DB_PASSWORD: $(DB_PASSWORD) + - task: Kubernetes@1 + displayName: Deploy ServiceMonitor + inputs: + connectionType: Kubernetes Service Connection + kubernetesServiceEndpoint: $(kubernetesServiceConnection + namespace: default + command: apply + useConfigurationFile: true + configuration: $(Pipeline.Workspace)/manifests/servicemonitor.yaml diff --git a/multicloudapp-servicemonitor.yaml b/manifests/servicemonitor.yaml similarity index 62% rename from multicloudapp-servicemonitor.yaml rename to manifests/servicemonitor.yaml index d27de26..0f1c61d 100644 --- a/multicloudapp-servicemonitor.yaml +++ b/manifests/servicemonitor.yaml @@ -3,14 +3,14 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: - name: prometheus-metrics-exporter - labels: - app: metrics-exporter - release: stable + name: multicloudapp-monitor + namespace: default +labels: + release: prometheus-stack spec: - endpoints: - - interval: 20s - port: metrics selector: matchLabels: - app: metrics-exporter + app: multicloudapp + endpoints: + - port: "8080" + path: "/actuator/prometheus" diff --git a/sql/createtable.sql b/sql/createtable.sql index e69de29..e07d041 100644 --- a/sql/createtable.sql +++ b/sql/createtable.sql @@ -0,0 +1 @@ +CREATE TABLE cicd_test_table (testvalue varchar2(64)) From 694be220221406c5c3eada44a754a966fcad0fc5 Mon Sep 17 00:00:00 2001 From: paulparkinson Date: Tue, 5 Mar 2024 19:16:36 -0500 Subject: [PATCH 03/13] init for "Build MultiCloud Devops using Azure CI/CD Pipelines with Oracle Database Cloud Services" workshop --- azure-pipelines.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f5573ad..b55677f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -102,3 +102,12 @@ stages: containers: | $(containerRegistry)/$(imageRepository):$(tag) + - task: Kubernetes@1 + displayName: Deploy ServiceMonitor + inputs: + connectionType: Kubernetes Service Connection + kubernetesServiceEndpoint: $(kubernetesServiceConnection + namespace: default + command: apply + useConfigurationFile: true + configuration: $(Pipeline.Workspace)/manifests/servicemonitor.yaml From df67811b7a45b5692fc7ff0aa1b578b8a606d19d Mon Sep 17 00:00:00 2001 From: paulparkinson Date: Tue, 5 Mar 2024 20:08:13 -0500 Subject: [PATCH 04/13] init for "Build MultiCloud Devops using Azure CI/CD Pipelines with Oracle Database Cloud Services" workshop --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b55677f..bd1ba39 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -106,7 +106,7 @@ stages: displayName: Deploy ServiceMonitor inputs: connectionType: Kubernetes Service Connection - kubernetesServiceEndpoint: $(kubernetesServiceConnection + kubernetesServiceEndpoint: $(kubernetesServiceConnection) namespace: default command: apply useConfigurationFile: true From 7a2ac88e175c6336701c093bf949c18fdac7af28 Mon Sep 17 00:00:00 2001 From: paulparkinson Date: Tue, 5 Mar 2024 20:39:42 -0500 Subject: [PATCH 05/13] init for "Build MultiCloud Devops using Azure CI/CD Pipelines with Oracle Database Cloud Services" workshop --- src/main/java/oraclemulticloud/MultiCloudController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/oraclemulticloud/MultiCloudController.java b/src/main/java/oraclemulticloud/MultiCloudController.java index bfa1660..4f0f00e 100644 --- a/src/main/java/oraclemulticloud/MultiCloudController.java +++ b/src/main/java/oraclemulticloud/MultiCloudController.java @@ -34,7 +34,8 @@ public String test() throws Exception { Connection cn = ds.getConnection(); Statement st = cn.createStatement(); String returnString = cn + " "; -// Replace with "SELECT 'Hello, db' FROM sys.dual" if cicd_test_table doesn't exist or any other applicable SQL + //Replace with "SELECT 'Hello, db' FROM sys.dual" or any other applicable SQL if cicd_test_table doesn't exist + //Command here can be used to test database changes and liquibase, ie db/changelog/db.changelog-master.xml - eg rollback, etc. ResultSet rs = st.executeQuery("SELECT * FROM cicd_test_table"); if (rs.next()) returnString+= "value = " + rs.getString(1) + " : "; return "got the conn :" + returnString; From 72c52be6ece329e2dbba841351a03d4ea1861f5d Mon Sep 17 00:00:00 2001 From: paulparkinson Date: Tue, 5 Mar 2024 20:44:51 -0500 Subject: [PATCH 06/13] init for "Build MultiCloud Devops using Azure CI/CD Pipelines with Oracle Database Cloud Services" workshop --- manifests/servicemonitor.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/manifests/servicemonitor.yaml b/manifests/servicemonitor.yaml index 0f1c61d..32390a5 100644 --- a/manifests/servicemonitor.yaml +++ b/manifests/servicemonitor.yaml @@ -4,9 +4,8 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: multicloudapp-monitor - namespace: default -labels: - release: prometheus-stack + labels: + release: prometheus-stack spec: selector: matchLabels: From 2e3347f316e69fb6d7da8ecbf3bd0eb08d016982 Mon Sep 17 00:00:00 2001 From: paulparkinson Date: Tue, 5 Mar 2024 21:06:37 -0500 Subject: [PATCH 07/13] init for "Build MultiCloud Devops using Azure CI/CD Pipelines with Oracle Database Cloud Services" workshop --- manifests/servicemonitor.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/manifests/servicemonitor.yaml b/manifests/servicemonitor.yaml index 32390a5..cb2192d 100644 --- a/manifests/servicemonitor.yaml +++ b/manifests/servicemonitor.yaml @@ -4,6 +4,9 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: multicloudapp-monitor + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "8080" labels: release: prometheus-stack spec: From dcdf759419d0531aee38db708d687f91f82a16a4 Mon Sep 17 00:00:00 2001 From: paulparkinson Date: Tue, 5 Mar 2024 21:43:07 -0500 Subject: [PATCH 08/13] init for "Build MultiCloud Devops using Azure CI/CD Pipelines with Oracle Database Cloud Services" workshop --- manifests/service.yml | 5 +++-- manifests/servicemonitor.yaml | 9 ++++----- .../db-metrics-exporter/createDBExporterResources.sh | 1 + .../metrics-exporter-servicemonitor.yaml | 5 +---- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/manifests/service.yml b/manifests/service.yml index 5848217..19e1fbe 100644 --- a/manifests/service.yml +++ b/manifests/service.yml @@ -5,6 +5,7 @@ metadata: spec: type: LoadBalancer ports: - - port: 8080 + - port: 8080 + name: http selector: - app: multicloudapp \ No newline at end of file + app: multicloudapp diff --git a/manifests/servicemonitor.yaml b/manifests/servicemonitor.yaml index cb2192d..0ac0a78 100644 --- a/manifests/servicemonitor.yaml +++ b/manifests/servicemonitor.yaml @@ -4,15 +4,14 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: multicloudapp-monitor - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "8080" labels: - release: prometheus-stack + app: multicloudapp + release: prometheus spec: selector: matchLabels: app: multicloudapp endpoints: - - port: "8080" + - interval: 20s + port: http path: "/actuator/prometheus" diff --git a/observability/db-metrics-exporter/createDBExporterResources.sh b/observability/db-metrics-exporter/createDBExporterResources.sh index 164d57d..b038450 100644 --- a/observability/db-metrics-exporter/createDBExporterResources.sh +++ b/observability/db-metrics-exporter/createDBExporterResources.sh @@ -15,3 +15,4 @@ kubectl apply -f metrics-exporter-servicemonitor.yaml #kubectl port-forward deployment/prometheus-grafana 3000 #kubectl port-forward service/prometheus-operated 9090 #kubectl port-forward deployment/metrics-exporter 9161 +#kubectl port-forward deployment/multicloudapp 8080 diff --git a/observability/db-metrics-exporter/metrics-exporter-servicemonitor.yaml b/observability/db-metrics-exporter/metrics-exporter-servicemonitor.yaml index 1a625b4..eadfa2f 100644 --- a/observability/db-metrics-exporter/metrics-exporter-servicemonitor.yaml +++ b/observability/db-metrics-exporter/metrics-exporter-servicemonitor.yaml @@ -4,12 +4,9 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: prometheus-metrics-exporter - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9161" labels: app: metrics-exporter - release: stable + release: prometheus spec: endpoints: - interval: 20s From 2e3fd67c4fc1c39a812a25e2fc2e7a07f74931ee Mon Sep 17 00:00:00 2001 From: paulparkinson Date: Tue, 5 Mar 2024 22:06:48 -0500 Subject: [PATCH 09/13] init for "Build MultiCloud Devops using Azure CI/CD Pipelines with Oracle Database Cloud Services" workshop --- manifests/service.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/manifests/service.yml b/manifests/service.yml index 19e1fbe..950dfd3 100644 --- a/manifests/service.yml +++ b/manifests/service.yml @@ -7,5 +7,6 @@ spec: ports: - port: 8080 name: http + targetPort: 8080 selector: app: multicloudapp From 8aced6733585765d7e4195019c6bfa849a92efa6 Mon Sep 17 00:00:00 2001 From: paulparkinson Date: Tue, 5 Mar 2024 22:55:28 -0500 Subject: [PATCH 10/13] init for "Build MultiCloud Devops using Azure CI/CD Pipelines with Oracle Database Cloud Services" workshop --- manifests/service.yml | 13 ++++++++----- manifests/servicemonitor.yaml | 4 ++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/manifests/service.yml b/manifests/service.yml index 950dfd3..3732963 100644 --- a/manifests/service.yml +++ b/manifests/service.yml @@ -1,12 +1,15 @@ apiVersion: v1 kind: Service metadata: - name: multicloudapp + name: multicloudapp + labels: + app: multicloudapp + release: stable spec: - type: LoadBalancer - ports: + type: LoadBalancer + ports: - port: 8080 name: http targetPort: 8080 - selector: - app: multicloudapp + selector: + app: multicloudapp diff --git a/manifests/servicemonitor.yaml b/manifests/servicemonitor.yaml index 0ac0a78..0a6fa08 100644 --- a/manifests/servicemonitor.yaml +++ b/manifests/servicemonitor.yaml @@ -1,4 +1,4 @@ -## Copyright (c) 20214 Oracle and/or its affiliates. +## Copyright (c) 2024 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor @@ -14,4 +14,4 @@ spec: endpoints: - interval: 20s port: http - path: "/actuator/prometheus" + path: /actuator/prometheus From 25a6dd3299f4b83fab9ea0451dc627ae2e2b4bce Mon Sep 17 00:00:00 2001 From: paulparkinson Date: Tue, 5 Mar 2024 23:07:29 -0500 Subject: [PATCH 11/13] init for "Build MultiCloud Devops using Azure CI/CD Pipelines with Oracle Database Cloud Services" workshop --- .../dashboards/multicloudapp-dashboard.json | 2746 +---------------- 1 file changed, 87 insertions(+), 2659 deletions(-) diff --git a/observability/dashboards/multicloudapp-dashboard.json b/observability/dashboards/multicloudapp-dashboard.json index dd86f08..9215e39 100644 --- a/observability/dashboards/multicloudapp-dashboard.json +++ b/observability/dashboards/multicloudapp-dashboard.json @@ -3,2341 +3,39 @@ "list": [ { "builtIn": 1, - "datasource": "Prometheus", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "limit": 100, - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "description": "GrabDish Monitoring", - "editable": true, - "gnetId": 12853, - "graphTooltip": 0, - "id": 26, - "links": [], - "panels": [ - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 43, - "panels": [], - "title": "FrontEnd Microservice", - "type": "row" - }, - { - "cacheTimeout": null, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "text": "DOWN" - }, - "1": { - "text": "UP" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#d44a3a", - "value": null - }, - { - "color": "#37872D", - "value": 1 - }, - { - "color": "#FADE2A" - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 4, - "x": 0, - "y": 1 - }, - "id": 54, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.1.5", - "targets": [ - { - "exemplar": true, - "expr": "up{job=\"frontend\"}", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Status", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "Prometheus", - "description": " base_jvm_uptime_seconds Displays the uptime of the JVM in milliseconds.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 3, - "x": 4, - "y": 1 - }, - "id": 56, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.1.5", - "targets": [ - { - "exemplar": true, - "expr": "base_jvm_uptime_seconds{job=\"frontend\"}", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Uptime", - "type": "stat" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 5, - "x": 7, - "y": 1 - }, - "hiddenSeries": false, - "id": 62, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.1.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "base_thread_count{job=\"frontend\"}", - "interval": "", - "intervalFactor": 2, - "legendFormat": "Thread Count", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Thread Count", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "datasource": null, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "smooth", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": [ - "application_io_helidon_data_examples_FrontEndResource_frontend_placeOrder_timed_mean_seconds{container=\"frontend\", endpoint=\"metrics\", instance=\"10.244.1.4:8080\", job=\"frontend\", namespace=\"msdataworkshop\", pod=\"frontend-helidon-789d788fbf-sxhqd\", service=\"frontend\"}" - ], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": false, - "tooltip": false, - "viz": true - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 1 - }, - "id": 41, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "exemplar": true, - "expr": "application_io_helidon_data_examples_FrontEndResource_frontend_placeOrder_timed_mean_seconds", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [], - "title": "PlaceOrder average time", - "type": "timeseries" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "description": "", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 7, - "x": 0, - "y": 3 - }, - "hiddenSeries": false, - "id": 60, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.1.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "base_cpu_systemLoadAverage", - "interval": "", - "intervalFactor": 2, - "legendFormat": "CPU load", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "CPU Load", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "percentunit", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 9 - }, - "hiddenSeries": false, - "hideTimeOverride": false, - "id": 65, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.1.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "base_memory_usedHeap_bytes{job=\"frontend\"}", - "interval": "", - "intervalFactor": 2, - "legendFormat": "Used Heap", - "refId": "A" - }, - { - "exemplar": true, - "expr": "base_memory_committedHeap_bytes{job=\"frontend\"}", - "interval": "", - "intervalFactor": 2, - "legendFormat": "Commited Heap", - "refId": "C" - }, - { - "exemplar": true, - "expr": "base_memory_maxHeap_bytes{job=\"frontend\"}", - "interval": "", - "intervalFactor": 2, - "legendFormat": "Max Heap", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Heap Sizes", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "decbytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 16 - }, - "id": 39, - "panels": [], - "title": "Order Microservice and PDB with TEQ", - "type": "row" - }, - { - "cacheTimeout": null, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "text": "DOWN" - }, - "1": { - "text": "UP" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#d44a3a", - "value": null - }, - { - "color": "#37872D", - "value": 1 - }, - { - "color": "#FADE2A" - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 4, - "x": 0, - "y": 17 - }, - "id": 29, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.1.5", - "targets": [ - { - "exemplar": true, - "expr": "up{job=\"order\"}", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Status", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "Prometheus", - "description": " base_jvm_uptime_seconds Displays the uptime of the JVM in milliseconds.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 3, - "x": 4, - "y": 17 - }, - "id": 26, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.1.5", - "targets": [ - { - "exemplar": true, - "expr": "base_jvm_uptime_seconds{job=\"order\"}", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Uptime", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "text": "DOWN" - }, - "1": { - "text": "UP" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#d44a3a", - "value": null - }, - { - "color": "#37872D", - "value": 1 - }, - { - "color": "#FADE2A" - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 4, - "x": 12, - "y": 17 - }, - "id": 57, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.1.5", - "targets": [ - { - "exemplar": true, - "expr": "oracledb_up{job=\"db-metrics-exporter-order\"}", - "hide": false, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "PDB Status", - "type": "stat" - }, - { - "alert": { - "alertRuleTags": {}, - "conditions": [ - { - "evaluator": { - "params": [ - 0.01 - ], - "type": "gt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "1m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "avg" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "5m", - "frequency": "1m", - "handler": 1, - "message": "PlaceOrder average time for Order service exceeded .02", - "name": "PlaceOrder average time alert", - "noDataState": "no_data", - "notifications": [] - }, - "datasource": null, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "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": 19 - }, - "id": 90, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "exemplar": true, - "expr": "application_io_helidon_data_examples_OrderResource_order_placeOrder_timed_mean_seconds", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [ - { - "colorMode": "critical", - "op": "gt", - "value": 0.01, - "visible": true - } - ], - "title": "PlaceOrder average time", - "type": "timeseries" - }, - { - "datasource": null, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": [ - "oracledb_orderpdb_orders_by_status_value{endpoint=\"metrics\", instance=\"10.244.1.94:9161\", job=\"db-metrics-exporter-order\", namespace=\"msdataworkshop\", pod=\"db-metrics-exporter-orderpdb-86c776c7f4-tfpn9\", service=\"db-metrics-exporter-order\", status=\"pending\"}" - ], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": false, - "tooltip": false, - "viz": true - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 19 - }, - "id": 80, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "exemplar": true, - "expr": "oracledb_orderpdb_orders_by_status_value", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Total number of orders by status", - "type": "timeseries" - }, - { - "datasource": null, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "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": 27 - }, - "id": 37, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "exemplar": true, - "expr": "application_io_helidon_data_examples_OrderResource_order_placeOrder_counted_total", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "PlaceOrder count", - "type": "timeseries" - }, - { - "datasource": null, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "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": 27 - }, - "id": 35, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "exemplar": true, - "expr": "oracledb_orderpdb_sessions_value", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Order PDB sessions", - "type": "timeseries" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "description": "", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 7, - "x": 0, - "y": 35 - }, - "hiddenSeries": false, - "id": 8, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.1.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "base_cpu_systemLoadAverage", - "interval": "", - "intervalFactor": 2, - "legendFormat": "CPU load", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "CPU Load", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "percentunit", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 5, - "x": 7, - "y": 35 - }, - "hiddenSeries": false, - "id": 2, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.1.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "base_thread_count{job=\"order\"}", - "interval": "", - "intervalFactor": 2, - "legendFormat": "Thread Count", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Thread Count", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "datasource": null, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": [ - "oracledb_orderqueue_messages_by_state_value{endpoint=\"metrics\", instance=\"10.244.1.236:9161\", job=\"db-metrics-exporter-order\", namespace=\"msdataworkshop\", pod=\"db-metrics-exporter-orderpdb-7555d7c448-97n94\", service=\"db-metrics-exporter-order\", state=\"0\"}" - ], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": false, - "tooltip": false, - "viz": true - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 35 - }, - "id": 69, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "exemplar": true, - "expr": "oracledb_orderqueue_messages_by_state_value", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Order queue messages", - "type": "timeseries" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 41 - }, - "hiddenSeries": false, - "hideTimeOverride": false, - "id": 10, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.1.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "base_memory_usedHeap_bytes{job=\"order\"}", - "interval": "", - "intervalFactor": 2, - "legendFormat": "Used Heap", - "refId": "A" - }, - { - "exemplar": true, - "expr": "base_memory_committedHeap_bytes{job=\"order\"}", - "interval": "", - "intervalFactor": 2, - "legendFormat": "Commited Heap", - "refId": "C" - }, - { - "exemplar": true, - "expr": "base_memory_maxHeap_bytes{job=\"order\"}", - "interval": "", - "intervalFactor": 2, - "legendFormat": "Max Heap", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Heap Sizes", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "decbytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 48 - }, - "id": 45, - "panels": [], - "title": "Inventory Microservice and PDB with TEQ", - "type": "row" - }, - { - "cacheTimeout": null, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "text": "DOWN" - }, - "1": { - "text": "UP" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#d44a3a", - "value": null - }, - { - "color": "#37872D", - "value": 1 - }, - { - "color": "#FADE2A" - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 4, - "x": 0, - "y": 49 - }, - "id": 58, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.1.5", - "targets": [ - { - "exemplar": true, - "expr": "up{job=\"inventory\"}", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Status", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "Prometheus", - "description": " base_jvm_uptime_seconds Displays the uptime of the JVM in milliseconds.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 3, - "x": 4, - "y": 49 - }, - "id": 61, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.1.5", - "targets": [ - { - "exemplar": true, - "expr": "base_jvm_uptime_seconds{job=\"inventory\"}", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Uptime", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "text": "DOWN" - }, - "1": { - "text": "UP" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#d44a3a", - "value": null - }, - { - "color": "#37872D", - "value": 1 - }, - { - "color": "#FADE2A" - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 4, - "x": 12, - "y": 49 - }, - "id": 59, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.1.5", - "targets": [ - { - "exemplar": true, - "expr": "oracledb_up{job=\"db-metrics-exporter-inventory\"}", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "PDB Status", - "transformations": [], - "type": "stat" - }, - { - "datasource": null, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": [ - "application_inventorydoesnotexistCount_total{container=\"inventory\", endpoint=\"metrics\", instance=\"10.244.0.122:8080\", job=\"inventory\", namespace=\"msdataworkshop\", pod=\"inventory-helidon-bf88c6f7d-2mlt2\", service=\"inventory\"}" - ], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": false, - "tooltip": false, - "viz": true - } - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 51 - }, - "id": 47, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "exemplar": true, - "expr": "application_inventorydoesnotexistCount_total{}", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Inventory Does Not Exist Count", - "type": "timeseries" - }, - { - "datasource": null, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "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": 51 - }, - "id": 82, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "exemplar": true, - "expr": "oracledb_inventorypdb_inventory_by_inventoryid_value", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Inventory count by InventoryId", - "type": "timeseries" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "description": "", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 7, - "x": 0, - "y": 57 - }, - "hiddenSeries": false, - "id": 64, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.1.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "base_cpu_systemLoadAverage", - "interval": "", - "intervalFactor": 2, - "legendFormat": "CPU load", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "CPU Load", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "percentunit", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" } - }, + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 28, + "links": [], + "liveNow": false, + "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 5, - "x": 7, - "y": 57 + "datasource": { + "type": "prometheus", + "uid": "prometheus" }, - "hiddenSeries": false, - "id": 63, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.1.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "base_thread_count{job=\"inventory\"}", - "interval": "", - "intervalFactor": 2, - "legendFormat": "Thread Count", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Thread Count", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "datasource": null, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -2349,6 +47,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -2378,165 +77,65 @@ "value": 80 } ] - } + }, + "unitScale": true }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, - "x": 12, - "y": 59 + "x": 0, + "y": 0 }, - "id": 49, + "id": 1, "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "single" + "mode": "single", + "sort": "none" } }, "targets": [ { - "exemplar": true, - "expr": "oracledb_inventorypdb_sessions_value", - "interval": "", - "legendFormat": "", - "refId": "A" + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "jvm_threads_started_threads_total", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false } ], - "title": "Inventory PDB sessions", + "title": "Kubernetes Microservice", "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 63 - }, - "hiddenSeries": false, - "hideTimeOverride": false, - "id": 66, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true + "datasource": { + "type": "prometheus", + "uid": "prometheus" }, - "percentage": false, - "pluginVersion": "8.1.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "base_memory_usedHeap_bytes{job=\"inventory\"}", - "interval": "", - "intervalFactor": 2, - "legendFormat": "Used Heap", - "refId": "A" - }, - { - "exemplar": true, - "expr": "base_memory_committedHeap_bytes{job=\"inventory\"}", - "interval": "", - "intervalFactor": 2, - "legendFormat": "Commited Heap", - "refId": "C" - }, - { - "exemplar": true, - "expr": "base_memory_maxHeap_bytes{job=\"inventory\"}", - "interval": "", - "intervalFactor": 2, - "legendFormat": "Max Heap", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Heap Sizes", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "decbytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "datasource": null, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, @@ -2548,6 +147,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -2577,238 +177,66 @@ "value": 80 } ] - } + }, + "unitScale": true }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, - "x": 12, - "y": 67 + "x": 0, + "y": 8 }, - "id": 70, + "id": 2, "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "exemplar": true, - "expr": "oracledb_inventoryqueue_messages_by_state_value", - "interval": "", - "legendFormat": "", - "refId": "A" + "mode": "single", + "sort": "none" } - ], - "title": "Inventory queue messages", - "type": "timeseries" - }, - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 75 - }, - "id": 84, - "panels": [], - "title": "Event Mesh (Message Propagation)", - "type": "row" - }, - { - "datasource": null, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "index": 1, - "text": "UP" - }, - "1": { - "index": 0, - "text": "DOWN" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 76 - }, - "id": 88, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" }, - "pluginVersion": "8.1.5", "targets": [ { - "exemplar": true, - "expr": "oracledb_orderpdb_propagation_disabled_status_value{}", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "OrderDB to InventoryDB Propagation Schedule", - "type": "stat" - }, - { - "datasource": null, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" + "datasource": { + "type": "prometheus", + "uid": "prometheus" }, - "mappings": [ - { - "options": { - "0": { - "index": 1, - "text": "UP" - }, - "1": { - "index": 0, - "text": "DOWN" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 76 - }, - "id": 86, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "8.1.5", - "targets": [ - { - "exemplar": true, - "expr": "oracledb_inventorypdb_propagation_disabled_status_value{}", - "interval": "", - "legendFormat": "", - "refId": "A" + "disableTextWrap": false, + "editorMode": "builder", + "expr": "oracledb_exporter_scrapes_total", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false } ], - "title": "InventoryDB to OrderDB Propagation Schedule", - "type": "stat" + "title": "Microservices Oracle Database", + "type": "timeseries" } ], - "refresh": false, - "schemaVersion": 30, - "style": "dark", + "refresh": "", + "schemaVersion": 39, "tags": [], "templating": { "list": [] }, "time": { - "from": "now-1m", + "from": "now-6h", "to": "now" }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, + "timepicker": {}, "timezone": "", - "title": "GrabDish Dash", - "uid": "kmgGniV7k", - "version": 6 + "title": "MultiCloud Azure DevOps Oracle Database Dashboard", + "uid": "ec188762-611c-41f8-967d-0f4406e448c7", + "version": 1, + "weekStart": "" } \ No newline at end of file From 2911d04ab4c142db62a2360e225a7d499b7ba370 Mon Sep 17 00:00:00 2001 From: paulparkinson Date: Wed, 6 Mar 2024 17:57:28 -0500 Subject: [PATCH 12/13] init for "Build MultiCloud Devops using Azure CI/CD Pipelines with Oracle Database Cloud Services" workshop --- azure-pipelines-example.yaml | 3 +- ... => azure-pipelines-liquibase-snippet.yaml | 66 +------------------ azure-pipelines-observability-snippet.yaml | 12 ++++ azure-pipelines.yml | 7 +- .../dashboards/multicloudapp-dashboard.json | 6 +- 5 files changed, 25 insertions(+), 69 deletions(-) rename azure-pipelines-liquibase-example.yaml => azure-pipelines-liquibase-snippet.yaml (61%) create mode 100644 azure-pipelines-observability-snippet.yaml diff --git a/azure-pipelines-example.yaml b/azure-pipelines-example.yaml index 912b278..a3a5506 100644 --- a/azure-pipelines-example.yaml +++ b/azure-pipelines-example.yaml @@ -89,6 +89,7 @@ stages: - script: | yq eval '.spec.template.spec.containers[0].env += [{"name": "AZURE_LOG_LEVEL", "value": "verbose"}, {"name": "AZURE_CLIENT_ID", "value": "$(AZURE_CLIENT_ID)"}, {"name": "AZURE_CLIENT_SECRET", "value": "$(AZURE_CLIENT_SECRET)"}, {"name": "AZURE_TENANT_ID", "value": "$(AZURE_TENANT_ID)"}]' -i $(Pipeline.Workspace)/manifests/deployment.yml displayName: 'Add Environment Variable with yq' + - task: KubernetesManifest@0 displayName: Deploy to Kubernetes cluster inputs: @@ -105,7 +106,7 @@ stages: displayName: Deploy ServiceMonitor inputs: connectionType: Kubernetes Service Connection - kubernetesServiceEndpoint: $(kubernetesServiceConnection + kubernetesServiceEndpoint: $(kubernetesServiceConnection) namespace: default command: apply useConfigurationFile: true diff --git a/azure-pipelines-liquibase-example.yaml b/azure-pipelines-liquibase-snippet.yaml similarity index 61% rename from azure-pipelines-liquibase-example.yaml rename to azure-pipelines-liquibase-snippet.yaml index 2641272..cdd017e 100644 --- a/azure-pipelines-liquibase-example.yaml +++ b/azure-pipelines-liquibase-snippet.yaml @@ -1,71 +1,9 @@ -# Deploy to Azure Kubernetes Service -# Build and push image to Azure Container Registry; Deploy to Azure Kubernetes Service -# https://docs.microsoft.com/azure/devops/pipelines/languages/docker - -trigger: - - main - -resources: - - repo: self - -variables: - - # Container registry service connection established during pipeline creation - dockerRegistryServiceConnection: 'ba554595-2da8-4cf6-88c4-a57c75966491' - imageRepository: 'multicloudapp' - containerRegistry: 'multicloud.azurecr.io' - dockerfilePath: '**/Dockerfile' - tag: '$(Build.BuildId)' - imagePullSecret: 'multicloud2012b828-auth' - - # Agent VM image name - vmImageName: 'ubuntu-latest' - - # Name of the new namespace being created to deploy the PR changes. - k8sNamespaceForPR: 'review-app-$(System.PullRequest.PullRequestId)' - -stages: - - stage: Build - displayName: Build stage - jobs: - - job: Build - displayName: Build - pool: - vmImage: $(vmImageName) - steps: - - task: JavaToolInstaller@0 - inputs: - versionSpec: '17' - jdkArchitectureOption: 'x64' - jdkSourceOption: 'PreInstalled' - - task: Maven@4 - inputs: - mavenPomFile: 'pom.xml' - publishJUnitResults: true - testResultsFiles: '**/surefire-reports/TEST-*.xml' - javaHomeOption: 'JDKVersion' - mavenVersionOption: '1.17' - mavenAuthenticateFeed: false - effectivePomSkip: false - sonarQubeRunAnalysis: false - - task: Docker@2 - displayName: Build and push an image to container registry - inputs: - command: buildAndPush - repository: $(imageRepository) - dockerfile: $(dockerfilePath) - containerRegistry: $(dockerRegistryServiceConnection) - tags: | - $(tag) - - - upload: manifests - artifact: manifests - - script: | +#As part of build... - script: | echo Downloading Liquibase and Oracle JDBC driver wget https://github.com/liquibase/liquibase/releases/download/v4.4.3/liquibase-4.4.3.tar.gz tar -xzf liquibase-4.4.3.tar.gz - wget https://path/to/ojdbc8.jar + wget https://download.oracle.com/otn-pub/otn_software/jdbc/233/ojdbc8.jar displayName: 'Install Liquibase and Oracle JDBC' diff --git a/azure-pipelines-observability-snippet.yaml b/azure-pipelines-observability-snippet.yaml new file mode 100644 index 0000000..98a97f0 --- /dev/null +++ b/azure-pipelines-observability-snippet.yaml @@ -0,0 +1,12 @@ + + + +- task: Kubernetes@1 + displayName: Deploy ServiceMonitor + inputs: + connectionType: Kubernetes Service Connection + kubernetesServiceEndpoint: $(kubernetesServiceConnection) + namespace: default + command: apply + useConfigurationFile: true + configuration: $(Pipeline.Workspace)/manifests/servicemonitor.yaml \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml index bd1ba39..adec56c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -60,7 +60,12 @@ stages: - upload: manifests artifact: manifests - + - script: | + echo Downloading Liquibase and Oracle JDBC driver + wget https://github.com/liquibase/liquibase/releases/download/v4.4.3/liquibase-4.4.3.tar.gz + tar -xzf liquibase-4.4.3.tar.gz + wget https://download.oracle.com/otn-pub/otn_software/jdbc/233/ojdbc8.jar + displayName: 'Install Liquibase and Oracle JDBC' - stage: Deploy diff --git a/observability/dashboards/multicloudapp-dashboard.json b/observability/dashboards/multicloudapp-dashboard.json index 9215e39..a6bc26b 100644 --- a/observability/dashboards/multicloudapp-dashboard.json +++ b/observability/dashboards/multicloudapp-dashboard.json @@ -119,7 +119,7 @@ "useBackend": false } ], - "title": "Kubernetes Microservice", + "title": "Microservice Running in Kubernetes(AKS)", "type": "timeseries" }, { @@ -219,7 +219,7 @@ "useBackend": false } ], - "title": "Microservices Oracle Database", + "title": "Oracle Database Used By AKS Microservice", "type": "timeseries" } ], @@ -237,6 +237,6 @@ "timezone": "", "title": "MultiCloud Azure DevOps Oracle Database Dashboard", "uid": "ec188762-611c-41f8-967d-0f4406e448c7", - "version": 1, + "version": 2, "weekStart": "" } \ No newline at end of file From e3dec7cd70e53aa3f3f0ecd502a2d1f29da3cd9d Mon Sep 17 00:00:00 2001 From: paulparkinson Date: Wed, 6 Mar 2024 18:11:04 -0500 Subject: [PATCH 13/13] init for "Build MultiCloud Devops using Azure CI/CD Pipelines with Oracle Database Cloud Services" workshop --- azure-pipelines.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index adec56c..21faf49 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -65,6 +65,9 @@ stages: wget https://github.com/liquibase/liquibase/releases/download/v4.4.3/liquibase-4.4.3.tar.gz tar -xzf liquibase-4.4.3.tar.gz wget https://download.oracle.com/otn-pub/otn_software/jdbc/233/ojdbc8.jar + wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-latest.zip + sudo apt-get install unzip + unzip sqlcl-latest.zip displayName: 'Install Liquibase and Oracle JDBC'