diff --git a/deployment/docker-compose.dev.yml b/deployment/docker-compose.dev.yml index e536ca11..48fdb489 100644 --- a/deployment/docker-compose.dev.yml +++ b/deployment/docker-compose.dev.yml @@ -51,6 +51,7 @@ services: restart: always networks: xyne: + driver: bridge volumes: vespa-data: driver: local diff --git a/deployment/docker-compose.metrics.yml b/deployment/docker-compose.metrics.yml new file mode 100644 index 00000000..46058fb9 --- /dev/null +++ b/deployment/docker-compose.metrics.yml @@ -0,0 +1,62 @@ +version: "3.9" + +services: + prometheus: + image: "prom/prometheus" + container_name: xyne-prometheus + volumes: + - ./prometheus-selfhosted.yml:/etc/prometheus/prometheus-selfhosted.yml + ports: + - "9090:9090" + command: + - "--config.file=/etc/prometheus/prometheus-selfhosted.yml" + networks: + - xyne + grafana: + image: grafana/grafana + container_name: xyne-grafana + volumes: + - ./grafana/provisioning:/etc/grafana/provisioning + ports: + - "3002:3000" + networks: + - xyne + vespa: + image: vespaengine/vespa + container_name: vespa + hostname: vespa-container + ports: + - "8080:8080" + - "19071:19071" + volumes: + - ../server/vespa-data:/opt/vespa/var + networks: + - xyne + restart: always + logging: + driver: json-file + options: + max-size: "50m" + max-file: "6" + + xyne-db: + image: postgres + container_name: xyne-db + environment: + POSTGRES_USER: xyne + POSTGRES_PASSWORD: xyne + POSTGRES_DB: xyne + ports: + - "${XYNE_DB_PORT:-5432}:5432" + volumes: + - ../server/xyne-data:/var/lib/postgresql/data + networks: + - xyne + restart: always +networks: + xyne: + driver: bridge +volumes: + vespa-data: + driver: local + diff --git a/deployment/prometheus-selfhosted.yml b/deployment/prometheus-selfhosted.yml new file mode 100644 index 00000000..18a01444 --- /dev/null +++ b/deployment/prometheus-selfhosted.yml @@ -0,0 +1,16 @@ +global: + scrape_interval: 10s + scrape_timeout: 10s + + +scrape_configs: + + + - job_name: 'xyne-data-ingest' + + + metrics_path: /prometheus/v1/values + + + static_configs: + - targets: ['vespa:8080'] diff --git a/observability/docs/observability.md b/observability/docs/observability.md new file mode 100644 index 00000000..017c5b6b --- /dev/null +++ b/observability/docs/observability.md @@ -0,0 +1,37 @@ +## Steps to run the metrics dashboard + +To run the metrics, from the root folder run this command in the terminal +```sh +docker-compose -f deployment/docker-compose.metrics.yml up +``` + +### Ensure Prometheus is up and running + To ensure **Prometheus** is up and running + - Navigate to `http://localhost:9090/`. + - If Prometheus is running correctly you'll land in the dashboard. + - Then Navigate to Status > Targets. + - This will take to the lost of targets from which metrics is getting scraped. In our case you should see `xyne-data-ingest` table having an `up` state. + - This confirms that prometheus is able to scrape vespa's data correctly. + + +### Set-up Grafana metrics + +To set up **Grafana** dashboad : +- Navigate to `http://localhost:3002/` in your browser. +- To log in use the default username and password (admin) +- Once you see the dashboard, Navigate to Connections using the Nav bar to the left. +- Under Connections you will find a tab for `Data Sources`. Navigate to that and look for `Prometheus`. +- In the `Settings` section of the Prometheus Data Source, paste the connection URL `http://xyne-prometheus:9090`. This is URL for the prometheus instance running in docker. +- Now scroll down to Save and Test your connection. It should show a `Successful` message. +- Now using the same Nav bar to the left, navigate to `Dashboards`. +- Once on the dashboard page you will see the `New` button in the top right corner. Click on that button and select the `import` option. +- Now in the import section, either upload or paste the `grafana-metrics.json` file in the setup folder of this directory. +- Click on load and then import. +- You should now have the dashboard imported successfully. Navigate back to the Dashboard section and you should see the `Xyne Metrics` dashboard up. +- Initially you will have to: + - Click on the dashboard. + - Hover on the panel and click on the menu (the three dots to the top-right of the panel), and click edit. + - In the `Queries` tab select the **prometheus** datasource which you've just added. + - Click on `Run Queries` to get the results. + - Follow the same steps for the rest of the panels. + diff --git a/observability/setup/grafana-metrics.json b/observability/setup/grafana-metrics.json new file mode 100644 index 00000000..524b1977 --- /dev/null +++ b/observability/setup/grafana-metrics.json @@ -0,0 +1,1357 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "$prometheusSource", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 1, + "id": 4, + "links": [ + { + "icon": "info", + "tags": [], + "targetBlank": true, + "title": "Grafana Docs", + "tooltip": "", + "type": "link", + "url": "https://grafana.com/docs/grafana/latest/" + }, + { + "icon": "info", + "tags": [], + "targetBlank": true, + "title": "Prometheus Docs", + "type": "link", + "url": "http://prometheus.io/docs/introduction/overview/" + } + ], + "panels": [ + { + "datasource": "$prometheusSource", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "prometheus" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#C15C17", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "{instance=\"localhost:9090\",job=\"prometheus\"}" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#CCA300", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 0 + }, + "id": 3, + "options": { + "displayMode": "gradient", + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "maxVizHeight": 300, + "minVizHeight": 16, + "minVizWidth": 8, + "namePlacement": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "sizing": "auto", + "valueMode": "color" + }, + "pluginVersion": "11.3.0", + "targets": [ + { + "datasource": "$prometheusSource", + "editorMode": "code", + "expr": "content_proton_documentdb_documents_total_max", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "documents_ingested", + "metric": "", + "range": true, + "refId": "A", + "step": 20 + } + ], + "title": "Documents ingested in total vs time", + "type": "bargauge" + }, + { + "datasource": "$prometheusSource", + "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": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 0 + }, + "id": 14, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.3.0", + "targets": [ + { + "datasource": "$prometheusSource", + "expr": "topk(5, max(scrape_duration_seconds) by (job))", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{job}}", + "metric": "", + "refId": "A", + "step": 20 + } + ], + "title": "Scrape Duration", + "type": "timeseries" + }, + { + "datasource": "$prometheusSource", + "description": "", + "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": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 0 + }, + "id": 16, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.3.0", + "targets": [ + { + "datasource": "$prometheusSource", + "editorMode": "code", + "expr": "content_proton_resource_usage_memory_average{}", + "hide": false, + "instant": false, + "legendFormat": "Memory usage average", + "range": true, + "refId": "A" + } + ], + "title": "Memory Profile", + "type": "timeseries" + }, + { + "datasource": "$prometheusSource", + "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", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [ + { + "options": { + "0": { + "text": "None" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 0.1 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 1 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 0 + }, + "id": 37, + "maxDataPoints": 100, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.3.0", + "targets": [ + { + "datasource": "$prometheusSource", + "editorMode": "code", + "expr": "content_proton_search_protocol_query_latency_average{}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "range": true, + "refId": "A", + "step": 60 + } + ], + "title": "Avg Results per search", + "type": "timeseries" + }, + { + "datasource": "$prometheusSource", + "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": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 6 + }, + "id": 29, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.3.0", + "targets": [ + { + "datasource": "$prometheusSource", + "editorMode": "code", + "expr": "content_proton_search_protocol_query_latency_average{}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "active_appenders", + "metric": "", + "range": true, + "refId": "A", + "step": 20 + } + ], + "title": "Query Latency Average", + "type": "timeseries" + }, + { + "datasource": "$prometheusSource", + "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": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "prometheus" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#F9BA8F", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "{instance=\"localhost:9090\",interval=\"5s\",job=\"prometheus\"}" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#F9BA8F", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 6 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.3.0", + "targets": [ + { + "datasource": "$prometheusSource", + "editorMode": "code", + "expr": "content_proton_search_protocol_query_latency_max", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "query_latency", + "range": true, + "refId": "A", + "step": 20 + } + ], + "title": "Max Query Latency", + "type": "timeseries" + }, + { + "datasource": "$prometheusSource", + "description": "", + "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": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 6 + }, + "id": 33, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.3.0", + "targets": [ + { + "datasource": "$prometheusSource", + "editorMode": "code", + "expr": "content_proton_search_protocol_docsum_requested_documents_rate{}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "queries", + "range": true, + "refId": "A", + "step": 20 + } + ], + "title": "Document Query Rate", + "type": "timeseries" + }, + { + "datasource": "$prometheusSource", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "duration-p99" + }, + "properties": [ + { + "id": "unit", + "value": "s" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 6 + }, + "id": 36, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.3.0", + "targets": [ + { + "datasource": "$prometheusSource", + "editorMode": "code", + "expr": "jdisc_gc_ms_average{}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "duration-p99", + "range": true, + "refId": "A", + "step": 20 + } + ], + "title": "Vespa GC Activity", + "type": "timeseries" + }, + { + "datasource": "$prometheusSource", + "description": "", + "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": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "duration-p99" + }, + "properties": [ + { + "id": "unit", + "value": "s" + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 12 + }, + "id": 20, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.3.0", + "targets": [ + { + "datasource": "$prometheusSource", + "editorMode": "code", + "expr": "rate(http_status_2xx_rate[1m])", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "duration-{{p99}}", + "range": true, + "refId": "A", + "step": 20 + } + ], + "title": "HTTP Req Success Rate", + "type": "timeseries" + }, + { + "datasource": "$prometheusSource", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 8, + "y": 12 + }, + "id": 32, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.3.0", + "targets": [ + { + "datasource": "$prometheusSource", + "editorMode": "code", + "expr": "cluster_controller_resource_usage_max_disk_utilization_max{}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "disk_space", + "range": true, + "refId": "A", + "step": 20 + } + ], + "title": "Max Disk Utilised", + "type": "timeseries" + }, + { + "datasource": "$prometheusSource", + "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": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 16, + "y": 12 + }, + "id": 38, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.3.0", + "targets": [ + { + "datasource": "$prometheusSource", + "editorMode": "code", + "expr": "cpu_util{}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "data_files", + "range": true, + "refId": "A", + "step": 20 + } + ], + "title": "CPU Utilization", + "type": "timeseries" + }, + { + "datasource": "$prometheusSource", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "links": [], + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 18 + }, + "id": 35, + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.3.0", + "targets": [ + { + "datasource": "$prometheusSource", + "editorMode": "code", + "exemplar": false, + "expr": "mem_heap_free_average{}", + "format": "heatmap", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "free-heap-meme", + "range": true, + "refId": "A", + "step": 10 + } + ], + "title": "Avg Free Heap Memory", + "transparent": true, + "type": "piechart" + }, + { + "datasource": "$prometheusSource", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 3, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 18 + }, + "id": 39, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.3.0", + "targets": [ + { + "datasource": "$prometheusSource", + "editorMode": "code", + "expr": "content_proton_resource_usage_disk_average{}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "__auto", + "range": true, + "refId": "B", + "step": 10 + } + ], + "title": "Average Disk usage", + "type": "timeseries" + } + ], + "preload": false, + "refresh": "1m", + "schemaVersion": 40, + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-15m", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Xyne Metrics", + "uid": "de25akpxochkwd", + "version": 18, + "weekStart": "" + } \ No newline at end of file diff --git a/server/integrations/google/index.ts b/server/integrations/google/index.ts index 89866aa1..0978f29b 100644 --- a/server/integrations/google/index.ts +++ b/server/integrations/google/index.ts @@ -202,7 +202,7 @@ export const handleGoogleOAuthIngestion = async ( boss: PgBoss, job: PgBoss.Job, ) => { - Logger.info("handleGoogleServiceAccountIngestion", job.data) + Logger.info("handleGoogleOauthIngestion", job.data) const data: SaaSOAuthJob = job.data as SaaSOAuthJob try { // we will first fetch the change token