diff --git a/docs/micrometer/Alfresco_Elasticsearch_Indexing_Advanced_View.json b/docs/micrometer/Alfresco_Elasticsearch_Indexing_Advanced_View.json new file mode 100644 index 0000000000..07c76f8992 --- /dev/null +++ b/docs/micrometer/Alfresco_Elasticsearch_Indexing_Advanced_View.json @@ -0,0 +1,529 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 0, + "links": [], + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 4, + "panels": [], + "title": "Content Indexing Metrics", + "type": "row" + }, + { + "datasource": { + "type": "prometheus" + }, + "description": "Document indexed in Elasticsearch instances. This number will not include any default documents created during bootstrap unless these have been explicitly re-indexed. Therefore there may be a discrepancy with the number above.", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 2, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.3.1", + "targets": [ + { + "editorMode": "code", + "expr": "elasticsearch_document_count", + "legendFormat": "Total Indexed Documents", + "range": true, + "refId": "A" + } + ], + "title": "Elasticsearch Total Indexed Documents", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "ffdp68onn7pj4b" + }, + "description": "Documents that can be indexed using Elasticsearch.", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 3, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.3.1", + "targets": [ + { + "editorMode": "code", + "expr": "repository_nodesCount", + "legendFormat": "Repository Nodes", + "range": true, + "refId": "A" + } + ], + "title": "Repository Node Count", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "ffdp68onn7pj4b" + }, + "description": "This metric indicates the number of documents whose content has been successfully indexed in Elasticsearch instances. It is a subset of the total count of indexed documents.", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 7 + }, + "id": 5, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.3.1", + "targets": [ + { + "editorMode": "code", + "expr": "elasticsearch_content_indexing_success_count", + "legendFormat": "Success", + "range": true, + "refId": "A" + } + ], + "title": "Content Indexing Success Count", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "ffdp68onn7pj4b" + }, + "description": "This metric indicates the number of documents whose content has not been successfully indexed in Elasticsearch instances. Reindexing may be necessary for these documents.", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 7 + }, + "id": 6, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.3.1", + "targets": [ + { + "editorMode": "code", + "expr": "elasticsearch_content_indexing_failures_count", + "legendFormat": "Failures", + "range": true, + "refId": "A" + } + ], + "title": "Content Indexing Failures Count", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "ffdp68onn7pj4b" + }, + "description": "This metric indicates the number of newly added documents whose content indexing is in progress.", + "fieldConfig": { + "defaults": { + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 7 + }, + "id": 7, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "sizing": "auto" + }, + "pluginVersion": "12.3.1", + "targets": [ + { + "editorMode": "code", + "expr": "elasticsearch_content_indexing_new_documents_progress_count", + "legendFormat": "New Content Progress", + "range": true, + "refId": "A" + } + ], + "title": "New Content Indexing In Progress", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "ffdp68onn7pj4b" + }, + "description": "This metric indicates the number of modified documents whose content indexing is in progress.", + "fieldConfig": { + "defaults": { + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 7 + }, + "id": 8, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "sizing": "auto" + }, + "pluginVersion": "12.3.1", + "targets": [ + { + "editorMode": "code", + "expr": "elasticsearch_content_indexing_outdated_documents_progress_count", + "legendFormat": "Reindex Progress", + "range": true, + "refId": "A" + } + ], + "title": "Outdated Content Reindexing In Progress", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "ffdp68onn7pj4b" + }, + "description": "Trend of successful and failed content indexing operations over time.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 13 + }, + "id": 9, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.3.1", + "targets": [ + { + "editorMode": "code", + "expr": "rate(elasticsearch_content_indexing_success_count[5m])", + "legendFormat": "Success Rate", + "range": true, + "refId": "A" + }, + { + "editorMode": "code", + "expr": "rate(elasticsearch_content_indexing_failures_count[5m])", + "legendFormat": "Failure Rate", + "range": true, + "refId": "B" + } + ], + "title": "Content Indexing Success vs Failures (Trend)", + "type": "timeseries" + } + ], + "preload": false, + "refresh": "10s", + "schemaVersion": 42, + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Alfresco Elasticsearch Metrics (Context-Aware)", + "uid": "97076aad-bbe5-4074-ad45-e615021ff7d1", + "version": 3 +} \ No newline at end of file diff --git a/docs/micrometer/README.md b/docs/micrometer/README.md index 6c36011f84..5c8128f878 100644 --- a/docs/micrometer/README.md +++ b/docs/micrometer/README.md @@ -20,6 +20,7 @@ Several types of metrics are exposed by the repository: * DB (mybatis) metrics * REST API metrics * Authentication metrics (tickets/sessions and users) +* Elasticsearch metrics All of these and specific details about each gathered metric can be controlled with system properties: @@ -34,6 +35,9 @@ metrics.jvmMetricsReporter.enabled=false metrics.restMetricsReporter.enabled=false metrics.restMetricsReporter.path.enabled=false metrics.authenticationMetricsReporter.enabled=false +metrics.elasticsearchMetricsReporter.enabled=false +metrics.elasticsearchMetricsReporter.cache.expireAfterWrite.seconds=120 +metrics.elasticsearchMetricsReporter.cache.refreshAfterWrite.seconds=60 ``` > This feature is enterprise only!