From 9c82a96d99dcda1d0fb60e48c2a8177ba9c8a29c Mon Sep 17 00:00:00 2001 From: crozzy Date: Tue, 2 Nov 2021 13:57:57 -0700 Subject: [PATCH] grafana: Update dashboard with Notifier metrics One outstanding component of Clair absent from the dashboard was the notifier. This adds charts for API and DB requests made by the notifier subsystem. Signed-off-by: crozzy --- .../dashboards/dashboard-clair.configmap.yaml | 664 ++++++++++++++++-- .../provisioning/dashboards/dashboard.json | 664 ++++++++++++++++-- local-dev/prometheus/prometheus.yml | 5 + 3 files changed, 1207 insertions(+), 126 deletions(-) diff --git a/contrib/openshift/grafana/dashboards/dashboard-clair.configmap.yaml b/contrib/openshift/grafana/dashboards/dashboard-clair.configmap.yaml index 50dff1f759..5bad0dbad5 100644 --- a/contrib/openshift/grafana/dashboards/dashboard-clair.configmap.yaml +++ b/contrib/openshift/grafana/dashboards/dashboard-clair.configmap.yaml @@ -26,7 +26,7 @@ data: "editable": true, "gnetId": null, "graphTooltip": 1, - "iteration": 1625647457882, + "iteration": 1635879789495, "links": [], "panels": [ { @@ -771,19 +771,559 @@ data: "title": "Database query duration (matcher) (p$dbquantile)", "type": "timeseries" }, + { + "datasource": "$datasource", + "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": 34 + }, + "id": 36, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "rate(clair_notifier_created_total[$rate])", + "interval": "", + "legendFormat": "CreatedTotal: {{instance }}: {{ query }}", + "refId": "A" + }, + { + "exemplar": true, + "expr": "rate(clair_notifier_failed_total[$rate])", + "hide": false, + "interval": "", + "legendFormat": "NotifierFailed: {{instance }}: {{ query }}", + "refId": "B" + }, + { + "exemplar": true, + "expr": "rate(clair_notifier_putreceipt_total[$rate])", + "hide": false, + "interval": "", + "legendFormat": "NotifierPutReceipt: {{instance }}: {{ query }}", + "refId": "C" + }, + { + "exemplar": true, + "expr": "rate(clair_notifier_receiptbyuoid_total[$rate])", + "hide": false, + "interval": "", + "legendFormat": "NotifierReceiptByUOID: {{instance }}: {{ query }}", + "refId": "D" + } + ], + "title": "Database query count (notifier)", + "type": "timeseries" + }, + { + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 30, + "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": 34 + }, + "id": 38, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "histogram_quantile($dbquantile, rate(clair_notifier_created_duration_seconds_bucket[$rate]))", + "interval": "", + "legendFormat": "CreatedTotal: {{instance }}: {{ query }}", + "refId": "A" + }, + { + "exemplar": true, + "expr": "histogram_quantile($dbquantile, rate(clair_notifier_failed_duration_seconds_bucket[$rate]))", + "hide": false, + "interval": "", + "legendFormat": "NotifierFailed: {{instance }}: {{ query }}", + "refId": "B" + }, + { + "exemplar": true, + "expr": "histogram_quantile($dbquantile, rate(clair_notifier_putreceipt_duration_seconds_bucket[$rate]))", + "hide": false, + "interval": "", + "legendFormat": "NotifierPutReceipt: {{instance }}: {{ query }}", + "refId": "C" + }, + { + "exemplar": true, + "expr": "histogram_quantile($dbquantile, rate(clair_notifier_receiptbyuoid_duration_seconds_bucket[$rate]))", + "hide": false, + "interval": "", + "legendFormat": "NotifierReceiptByUOID: {{instance }}: {{ query }}", + "refId": "D" + } + ], + "title": "Database query duration (notifier) (p$dbquantile)", + "type": "timeseries" + }, { "collapsed": false, "datasource": "$datasource", "gridPos": { - "h": 1, - "w": 24, + "h": 1, + "w": 24, + "x": 0, + "y": 42 + }, + "id": 2, + "panels": [], + "title": "API Requests", + "type": "row" + }, + { + "datasource": "$datasource", + "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": 43 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "sum by (code) (rate(clair_http_matcher_api_v1_vulnerability_report_request_total[$rate]))", + "instant": false, + "interval": "", + "legendFormat": "Status {{ code }} ", + "refId": "A" + } + ], + "title": "Vulnerability Report Requests / $rate", + "type": "timeseries" + }, + { + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "Seconds", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 30, + "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": 43 + }, + "id": 15, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "repeat": null, + "targets": [ + { + "exemplar": true, + "expr": "histogram_quantile($apiquantile, rate(clair_http_matcher_api_v1_vulnerability_report_request_duration_seconds_bucket[$rate]))", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Vulnerability Report Request Latency (p$apiquantile)", + "type": "timeseries" + }, + { + "datasource": "$datasource", + "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": 34 + "y": 51 }, - "id": 2, - "panels": [], - "title": "API Requests", - "type": "row" + "id": 7, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "sum by (code) (rate(clair_http_indexer_api_v1_index_report_request_total[$rate]))", + "instant": false, + "interval": "1", + "legendFormat": "Status {{ code }} ", + "refId": "A" + } + ], + "title": "Create Index Report Requests / $rate", + "type": "timeseries" + }, + { + "datasource": "$datasource", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "Seconds", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 30, + "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": 14, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "histogram_quantile($apiquantile, rate(clair_http_indexer_api_v1_index_report_request_duration_seconds_bucket[$rate]))", + "instant": false, + "interval": "1", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Create Index Report Request Latency (p$apiquantile)", + "type": "timeseries" }, { "datasource": "$datasource", @@ -804,7 +1344,7 @@ data: "tooltip": false, "viz": false }, - "lineInterpolation": "linear", + "lineInterpolation": "stepBefore", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { @@ -841,9 +1381,9 @@ data: "h": 8, "w": 12, "x": 0, - "y": 35 + "y": 59 }, - "id": 4, + "id": 6, "options": { "legend": { "calcs": [], @@ -857,14 +1397,14 @@ data: "targets": [ { "exemplar": true, - "expr": "sum by (code) (rate(clair_http_matcher_api_v1_vulnerability_report_request_total[$rate]))", + "expr": "sum by (code) (rate(clair_http_indexer_api_v1_index_state_request_total[$rate]))", "instant": false, "interval": "", "legendFormat": "Status {{ code }} ", "refId": "A" } ], - "title": "Vulnerability Report Requests", + "title": "Indexer State Requests / $rate", "type": "timeseries" }, { @@ -886,7 +1426,7 @@ data: "tooltip": false, "viz": false }, - "lineInterpolation": "linear", + "lineInterpolation": "stepBefore", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { @@ -915,7 +1455,8 @@ data: "value": 80 } ] - } + }, + "unit": "short" }, "overrides": [] }, @@ -923,9 +1464,9 @@ data: "h": 8, "w": 12, "x": 12, - "y": 35 + "y": 59 }, - "id": 15, + "id": 13, "options": { "legend": { "calcs": [], @@ -936,18 +1477,17 @@ data: "mode": "single" } }, - "repeat": null, "targets": [ { "exemplar": true, - "expr": "histogram_quantile($apiquantile, rate(clair_http_matcher_api_v1_vulnerability_report_request_duration_seconds_bucket[$rate]))", + "expr": "histogram_quantile($apiquantile, rate(clair_http_indexer_api_v1_index_state_request_duration_seconds_bucket[$rate]))", "instant": false, "interval": "", "legendFormat": "", "refId": "A" } ], - "title": "Vulnerability Report Request Latency (p$apiquantile)", + "title": "Indexer State Request Latency (p$apiquantile)", "type": "timeseries" }, { @@ -1006,9 +1546,9 @@ data: "h": 8, "w": 12, "x": 0, - "y": 43 + "y": 67 }, - "id": 7, + "id": 5, "options": { "legend": { "calcs": [], @@ -1022,19 +1562,18 @@ data: "targets": [ { "exemplar": true, - "expr": "sum by (code) (rate(clair_http_indexer_api_v1_index_report_request_total[$rate]))", + "expr": "sum by (code) (rate(clair_http_indexer_api_v1_index_report_get_request_total[$rate]))", "instant": false, "interval": "1", "legendFormat": "Status {{ code }} ", "refId": "A" } ], - "title": "Create Index Report Requests", + "title": "Index Report Requests / $rate", "type": "timeseries" }, { "datasource": "$datasource", - "description": "", "fieldConfig": { "defaults": { "color": { @@ -1089,9 +1628,9 @@ data: "h": 8, "w": 12, "x": 12, - "y": 43 + "y": 67 }, - "id": 14, + "id": 16, "options": { "legend": { "calcs": [], @@ -1105,14 +1644,14 @@ data: "targets": [ { "exemplar": true, - "expr": "histogram_quantile($apiquantile, rate(clair_http_indexer_api_v1_index_report_request_duration_seconds_bucket[$rate]))", + "expr": "histogram_quantile($apiquantile, rate(clair_http_indexer_api_v1_index_report_get_request_duration_seconds_bucket[$rate]))", "instant": false, "interval": "1", "legendFormat": "", "refId": "A" } ], - "title": "Create Index Report Request Latency (p$apiquantile)", + "title": "Index Report Request Latency (p$apiquantile)", "type": "timeseries" }, { @@ -1134,7 +1673,7 @@ data: "tooltip": false, "viz": false }, - "lineInterpolation": "stepBefore", + "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { @@ -1171,9 +1710,9 @@ data: "h": 8, "w": 12, "x": 0, - "y": 51 + "y": 75 }, - "id": 6, + "id": 41, "options": { "legend": { "calcs": [], @@ -1187,14 +1726,14 @@ data: "targets": [ { "exemplar": true, - "expr": "sum by (code) (rate(clair_http_indexer_api_v1_index_state_request_total[$rate]))", + "expr": "sum by (code) (rate(clair_http_notifier_api_v1_notification_request_total{method=\"get\"}[$rate]))", "instant": false, - "interval": "", + "interval": "1", "legendFormat": "Status {{ code }} ", "refId": "A" } ], - "title": "Indexer State Requests", + "title": "Get Notifications Requests / $rate", "type": "timeseries" }, { @@ -1216,7 +1755,7 @@ data: "tooltip": false, "viz": false }, - "lineInterpolation": "stepBefore", + "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { @@ -1245,8 +1784,7 @@ data: "value": 80 } ] - }, - "unit": "short" + } }, "overrides": [] }, @@ -1254,9 +1792,9 @@ data: "h": 8, "w": 12, "x": 12, - "y": 51 + "y": 75 }, - "id": 13, + "id": 40, "options": { "legend": { "calcs": [], @@ -1270,14 +1808,14 @@ data: "targets": [ { "exemplar": true, - "expr": "histogram_quantile($apiquantile, rate(clair_http_indexer_api_v1_index_state_request_duration_seconds_bucket[$rate]))", + "expr": "histogram_quantile($apiquantile, rate(clair_http_notifier_api_v1_notification_request_duration_seconds_bucket[$rate]))", "instant": false, - "interval": "", + "interval": "1", "legendFormat": "", "refId": "A" } ], - "title": "Indexer State Request Latency (p$apiquantile)", + "title": "Get Notification Request Latency (p$apiquantile)", "type": "timeseries" }, { @@ -1336,9 +1874,9 @@ data: "h": 8, "w": 12, "x": 0, - "y": 59 + "y": 83 }, - "id": 5, + "id": 39, "options": { "legend": { "calcs": [], @@ -1352,14 +1890,14 @@ data: "targets": [ { "exemplar": true, - "expr": "sum by (code) (rate(clair_http_indexer_api_v1_index_report_get_request_total[$rate]))", + "expr": "sum by (code) (rate(clair_http_notifier_api_v1_notification_request_total{method=\"delete\"}[$rate]))", "instant": false, "interval": "1", - "legendFormat": "Status {{ code }} ", + "legendFormat": "Status {{ code }}", "refId": "A" } ], - "title": "Index Report Requests", + "title": "Delete Notification Requests / $rate", "type": "timeseries" }, { @@ -1418,9 +1956,9 @@ data: "h": 8, "w": 12, "x": 12, - "y": 59 + "y": 83 }, - "id": 16, + "id": 42, "options": { "legend": { "calcs": [], @@ -1434,14 +1972,14 @@ data: "targets": [ { "exemplar": true, - "expr": "histogram_quantile($apiquantile, rate(clair_http_indexer_api_v1_index_report_get_request_duration_seconds_bucket[$rate]))", + "expr": "histogram_quantile($apiquantile, rate(clair_http_notifier_api_v1_notification_request_duration_seconds_bucket[$rate]))", "instant": false, "interval": "1", "legendFormat": "", "refId": "A" } ], - "title": "Index Report Request Latency (p$apiquantile)", + "title": "Delete Notification Request Latency (p$apiquantile)", "type": "timeseries" }, { @@ -1451,7 +1989,7 @@ data: "h": 1, "w": 24, "x": 0, - "y": 67 + "y": 91 }, "id": 9, "panels": [], @@ -1514,7 +2052,7 @@ data: "h": 8, "w": 12, "x": 0, - "y": 68 + "y": 92 }, "id": 11, "options": { @@ -1596,7 +2134,7 @@ data: "h": 8, "w": 12, "x": 12, - "y": 68 + "y": 92 }, "id": 12, "options": { @@ -1753,9 +2291,9 @@ data: { "allValue": null, "current": { - "selected": false, - "text": "0.95", - "value": "0.95" + "selected": true, + "text": "0.20", + "value": "0.20" }, "description": null, "error": null, @@ -1766,7 +2304,7 @@ data: "name": "apiquantile", "options": [ { - "selected": true, + "selected": false, "text": "0.95", "value": "0.95" }, @@ -1781,7 +2319,7 @@ data: "value": "0.5" }, { - "selected": false, + "selected": true, "text": "0.20", "value": "0.20" }, @@ -1799,8 +2337,8 @@ data: { "current": { "selected": false, - "text": "app-sre-stage-01-prometheus", - "value": "app-sre-stage-01-prometheus" + "text": "Prometheus", + "value": "Prometheus" }, "description": null, "error": null, @@ -1827,6 +2365,6 @@ data: "timezone": "", "title": "Clair V4", "uid": "I1JBFlRnz", - "version": 1 + "version": 2 } diff --git a/local-dev/grafana/provisioning/dashboards/dashboard.json b/local-dev/grafana/provisioning/dashboards/dashboard.json index ab96dd3ef4..2901f532f7 100644 --- a/local-dev/grafana/provisioning/dashboards/dashboard.json +++ b/local-dev/grafana/provisioning/dashboards/dashboard.json @@ -15,7 +15,7 @@ "editable": true, "gnetId": null, "graphTooltip": 1, - "iteration": 1625647457882, + "iteration": 1635879789495, "links": [], "panels": [ { @@ -760,19 +760,559 @@ "title": "Database query duration (matcher) (p$dbquantile)", "type": "timeseries" }, + { + "datasource": "$datasource", + "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": 34 + }, + "id": 36, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "rate(clair_notifier_created_total[$rate])", + "interval": "", + "legendFormat": "CreatedTotal: {{instance }}: {{ query }}", + "refId": "A" + }, + { + "exemplar": true, + "expr": "rate(clair_notifier_failed_total[$rate])", + "hide": false, + "interval": "", + "legendFormat": "NotifierFailed: {{instance }}: {{ query }}", + "refId": "B" + }, + { + "exemplar": true, + "expr": "rate(clair_notifier_putreceipt_total[$rate])", + "hide": false, + "interval": "", + "legendFormat": "NotifierPutReceipt: {{instance }}: {{ query }}", + "refId": "C" + }, + { + "exemplar": true, + "expr": "rate(clair_notifier_receiptbyuoid_total[$rate])", + "hide": false, + "interval": "", + "legendFormat": "NotifierReceiptByUOID: {{instance }}: {{ query }}", + "refId": "D" + } + ], + "title": "Database query count (notifier)", + "type": "timeseries" + }, + { + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 30, + "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": 34 + }, + "id": 38, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "histogram_quantile($dbquantile, rate(clair_notifier_created_duration_seconds_bucket[$rate]))", + "interval": "", + "legendFormat": "CreatedTotal: {{instance }}: {{ query }}", + "refId": "A" + }, + { + "exemplar": true, + "expr": "histogram_quantile($dbquantile, rate(clair_notifier_failed_duration_seconds_bucket[$rate]))", + "hide": false, + "interval": "", + "legendFormat": "NotifierFailed: {{instance }}: {{ query }}", + "refId": "B" + }, + { + "exemplar": true, + "expr": "histogram_quantile($dbquantile, rate(clair_notifier_putreceipt_duration_seconds_bucket[$rate]))", + "hide": false, + "interval": "", + "legendFormat": "NotifierPutReceipt: {{instance }}: {{ query }}", + "refId": "C" + }, + { + "exemplar": true, + "expr": "histogram_quantile($dbquantile, rate(clair_notifier_receiptbyuoid_duration_seconds_bucket[$rate]))", + "hide": false, + "interval": "", + "legendFormat": "NotifierReceiptByUOID: {{instance }}: {{ query }}", + "refId": "D" + } + ], + "title": "Database query duration (notifier) (p$dbquantile)", + "type": "timeseries" + }, { "collapsed": false, "datasource": "$datasource", "gridPos": { - "h": 1, - "w": 24, + "h": 1, + "w": 24, + "x": 0, + "y": 42 + }, + "id": 2, + "panels": [], + "title": "API Requests", + "type": "row" + }, + { + "datasource": "$datasource", + "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": 43 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "sum by (code) (rate(clair_http_matcher_api_v1_vulnerability_report_request_total[$rate]))", + "instant": false, + "interval": "", + "legendFormat": "Status {{ code }} ", + "refId": "A" + } + ], + "title": "Vulnerability Report Requests / $rate", + "type": "timeseries" + }, + { + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "Seconds", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 30, + "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": 43 + }, + "id": 15, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "repeat": null, + "targets": [ + { + "exemplar": true, + "expr": "histogram_quantile($apiquantile, rate(clair_http_matcher_api_v1_vulnerability_report_request_duration_seconds_bucket[$rate]))", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Vulnerability Report Request Latency (p$apiquantile)", + "type": "timeseries" + }, + { + "datasource": "$datasource", + "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": 34 + "y": 51 }, - "id": 2, - "panels": [], - "title": "API Requests", - "type": "row" + "id": 7, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "sum by (code) (rate(clair_http_indexer_api_v1_index_report_request_total[$rate]))", + "instant": false, + "interval": "1", + "legendFormat": "Status {{ code }} ", + "refId": "A" + } + ], + "title": "Create Index Report Requests / $rate", + "type": "timeseries" + }, + { + "datasource": "$datasource", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "Seconds", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 30, + "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": 14, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "histogram_quantile($apiquantile, rate(clair_http_indexer_api_v1_index_report_request_duration_seconds_bucket[$rate]))", + "instant": false, + "interval": "1", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Create Index Report Request Latency (p$apiquantile)", + "type": "timeseries" }, { "datasource": "$datasource", @@ -793,7 +1333,7 @@ "tooltip": false, "viz": false }, - "lineInterpolation": "linear", + "lineInterpolation": "stepBefore", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { @@ -830,9 +1370,9 @@ "h": 8, "w": 12, "x": 0, - "y": 35 + "y": 59 }, - "id": 4, + "id": 6, "options": { "legend": { "calcs": [], @@ -846,14 +1386,14 @@ "targets": [ { "exemplar": true, - "expr": "sum by (code) (rate(clair_http_matcher_api_v1_vulnerability_report_request_total[$rate]))", + "expr": "sum by (code) (rate(clair_http_indexer_api_v1_index_state_request_total[$rate]))", "instant": false, "interval": "", "legendFormat": "Status {{ code }} ", "refId": "A" } ], - "title": "Vulnerability Report Requests", + "title": "Indexer State Requests / $rate", "type": "timeseries" }, { @@ -875,7 +1415,7 @@ "tooltip": false, "viz": false }, - "lineInterpolation": "linear", + "lineInterpolation": "stepBefore", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { @@ -904,7 +1444,8 @@ "value": 80 } ] - } + }, + "unit": "short" }, "overrides": [] }, @@ -912,9 +1453,9 @@ "h": 8, "w": 12, "x": 12, - "y": 35 + "y": 59 }, - "id": 15, + "id": 13, "options": { "legend": { "calcs": [], @@ -925,18 +1466,17 @@ "mode": "single" } }, - "repeat": null, "targets": [ { "exemplar": true, - "expr": "histogram_quantile($apiquantile, rate(clair_http_matcher_api_v1_vulnerability_report_request_duration_seconds_bucket[$rate]))", + "expr": "histogram_quantile($apiquantile, rate(clair_http_indexer_api_v1_index_state_request_duration_seconds_bucket[$rate]))", "instant": false, "interval": "", "legendFormat": "", "refId": "A" } ], - "title": "Vulnerability Report Request Latency (p$apiquantile)", + "title": "Indexer State Request Latency (p$apiquantile)", "type": "timeseries" }, { @@ -995,9 +1535,9 @@ "h": 8, "w": 12, "x": 0, - "y": 43 + "y": 67 }, - "id": 7, + "id": 5, "options": { "legend": { "calcs": [], @@ -1011,19 +1551,18 @@ "targets": [ { "exemplar": true, - "expr": "sum by (code) (rate(clair_http_indexer_api_v1_index_report_request_total[$rate]))", + "expr": "sum by (code) (rate(clair_http_indexer_api_v1_index_report_get_request_total[$rate]))", "instant": false, "interval": "1", "legendFormat": "Status {{ code }} ", "refId": "A" } ], - "title": "Create Index Report Requests", + "title": "Index Report Requests / $rate", "type": "timeseries" }, { "datasource": "$datasource", - "description": "", "fieldConfig": { "defaults": { "color": { @@ -1078,9 +1617,9 @@ "h": 8, "w": 12, "x": 12, - "y": 43 + "y": 67 }, - "id": 14, + "id": 16, "options": { "legend": { "calcs": [], @@ -1094,14 +1633,14 @@ "targets": [ { "exemplar": true, - "expr": "histogram_quantile($apiquantile, rate(clair_http_indexer_api_v1_index_report_request_duration_seconds_bucket[$rate]))", + "expr": "histogram_quantile($apiquantile, rate(clair_http_indexer_api_v1_index_report_get_request_duration_seconds_bucket[$rate]))", "instant": false, "interval": "1", "legendFormat": "", "refId": "A" } ], - "title": "Create Index Report Request Latency (p$apiquantile)", + "title": "Index Report Request Latency (p$apiquantile)", "type": "timeseries" }, { @@ -1123,7 +1662,7 @@ "tooltip": false, "viz": false }, - "lineInterpolation": "stepBefore", + "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { @@ -1160,9 +1699,9 @@ "h": 8, "w": 12, "x": 0, - "y": 51 + "y": 75 }, - "id": 6, + "id": 41, "options": { "legend": { "calcs": [], @@ -1176,14 +1715,14 @@ "targets": [ { "exemplar": true, - "expr": "sum by (code) (rate(clair_http_indexer_api_v1_index_state_request_total[$rate]))", + "expr": "sum by (code) (rate(clair_http_notifier_api_v1_notification_request_total{method=\"get\"}[$rate]))", "instant": false, - "interval": "", + "interval": "1", "legendFormat": "Status {{ code }} ", "refId": "A" } ], - "title": "Indexer State Requests", + "title": "Get Notifications Requests / $rate", "type": "timeseries" }, { @@ -1205,7 +1744,7 @@ "tooltip": false, "viz": false }, - "lineInterpolation": "stepBefore", + "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { @@ -1234,8 +1773,7 @@ "value": 80 } ] - }, - "unit": "short" + } }, "overrides": [] }, @@ -1243,9 +1781,9 @@ "h": 8, "w": 12, "x": 12, - "y": 51 + "y": 75 }, - "id": 13, + "id": 40, "options": { "legend": { "calcs": [], @@ -1259,14 +1797,14 @@ "targets": [ { "exemplar": true, - "expr": "histogram_quantile($apiquantile, rate(clair_http_indexer_api_v1_index_state_request_duration_seconds_bucket[$rate]))", + "expr": "histogram_quantile($apiquantile, rate(clair_http_notifier_api_v1_notification_request_duration_seconds_bucket[$rate]))", "instant": false, - "interval": "", + "interval": "1", "legendFormat": "", "refId": "A" } ], - "title": "Indexer State Request Latency (p$apiquantile)", + "title": "Get Notification Request Latency (p$apiquantile)", "type": "timeseries" }, { @@ -1325,9 +1863,9 @@ "h": 8, "w": 12, "x": 0, - "y": 59 + "y": 83 }, - "id": 5, + "id": 39, "options": { "legend": { "calcs": [], @@ -1341,14 +1879,14 @@ "targets": [ { "exemplar": true, - "expr": "sum by (code) (rate(clair_http_indexer_api_v1_index_report_get_request_total[$rate]))", + "expr": "sum by (code) (rate(clair_http_notifier_api_v1_notification_request_total{method=\"delete\"}[$rate]))", "instant": false, "interval": "1", - "legendFormat": "Status {{ code }} ", + "legendFormat": "Status {{ code }}", "refId": "A" } ], - "title": "Index Report Requests", + "title": "Delete Notification Requests / $rate", "type": "timeseries" }, { @@ -1407,9 +1945,9 @@ "h": 8, "w": 12, "x": 12, - "y": 59 + "y": 83 }, - "id": 16, + "id": 42, "options": { "legend": { "calcs": [], @@ -1423,14 +1961,14 @@ "targets": [ { "exemplar": true, - "expr": "histogram_quantile($apiquantile, rate(clair_http_indexer_api_v1_index_report_get_request_duration_seconds_bucket[$rate]))", + "expr": "histogram_quantile($apiquantile, rate(clair_http_notifier_api_v1_notification_request_duration_seconds_bucket[$rate]))", "instant": false, "interval": "1", "legendFormat": "", "refId": "A" } ], - "title": "Index Report Request Latency (p$apiquantile)", + "title": "Delete Notification Request Latency (p$apiquantile)", "type": "timeseries" }, { @@ -1440,7 +1978,7 @@ "h": 1, "w": 24, "x": 0, - "y": 67 + "y": 91 }, "id": 9, "panels": [], @@ -1503,7 +2041,7 @@ "h": 8, "w": 12, "x": 0, - "y": 68 + "y": 92 }, "id": 11, "options": { @@ -1585,7 +2123,7 @@ "h": 8, "w": 12, "x": 12, - "y": 68 + "y": 92 }, "id": 12, "options": { @@ -1742,9 +2280,9 @@ { "allValue": null, "current": { - "selected": false, - "text": "0.95", - "value": "0.95" + "selected": true, + "text": "0.20", + "value": "0.20" }, "description": null, "error": null, @@ -1755,7 +2293,7 @@ "name": "apiquantile", "options": [ { - "selected": true, + "selected": false, "text": "0.95", "value": "0.95" }, @@ -1770,7 +2308,7 @@ "value": "0.5" }, { - "selected": false, + "selected": true, "text": "0.20", "value": "0.20" }, @@ -1788,8 +2326,8 @@ { "current": { "selected": false, - "text": "app-sre-stage-01-prometheus", - "value": "app-sre-stage-01-prometheus" + "text": "Prometheus", + "value": "Prometheus" }, "description": null, "error": null, @@ -1816,5 +2354,5 @@ "timezone": "", "title": "Clair V4", "uid": "I1JBFlRnz", - "version": 1 + "version": 2 } diff --git a/local-dev/prometheus/prometheus.yml b/local-dev/prometheus/prometheus.yml index 393b360628..62cc7317e4 100644 --- a/local-dev/prometheus/prometheus.yml +++ b/local-dev/prometheus/prometheus.yml @@ -15,6 +15,11 @@ scrape_configs: static_configs: - targets: ['matcher:8089'] + - job_name: notifier + metrics_path: "/metrics" + static_configs: + - targets: ['notifier:8089'] + - job_name: indexer-quay metrics_path: "/metrics" static_configs: