diff --git a/packages/@instana-integration/wxd-infrastructure/README.md b/packages/@instana-integration/wxd-infrastructure/README.md new file mode 100644 index 00000000..81003639 --- /dev/null +++ b/packages/@instana-integration/wxd-infrastructure/README.md @@ -0,0 +1,80 @@ +# @instana-integration/wxd-infrastructure + +The Instana integration package is designed to showcase infrastructure observability capabilities within Instana by monitoring Kubernetes container resource metrics collected through the OpenTelemetry Prometheus Receiver. These metrics provide real-time visibility into CPU, memory, filesystem, and network utilization for Watsonx.data components running in Kubernetes/OpenShift clusters. + +## Dashboards + +Below are the dashboards currently supported by this integration package. + +| Dashboard Title | +|-----------------| +| Infrastructure Overview | +| Container CPU Usage | +| Container Memory Usage | +| Container Filesystem Usage | +| Container Network Traffic | + +## Metrics + +The following infrastructure metrics are included in this integration package. + +| Metric | Type | Description | +|--------|------|-------------| +| `container_cpu_usage_seconds_total` | Sum | Total CPU time consumed by the container. | +| `container_memory_usage_bytes` | Gauge | Current memory usage of the container. | +| `container_memory_working_set_bytes` | Gauge | Working set memory currently in use by the container. | +| `container_fs_usage_bytes` | Gauge | Current filesystem usage by the container. | +| `container_network_receive_bytes_total` | Sum | Total bytes received over the network by the container. | +| `container_network_transmit_bytes_total` | Sum | Total bytes transmitted over the network by the container. | + +### Semantic Conventions + +The metrics follow the OpenTelemetry Prometheus Receiver semantic conventions. + +### Resource Attributes + +The following resource attributes can be used to filter infrastructure metrics. + +| Attribute Key | Type | Description | +|---------------|------|-------------| +| `metric.tag.Instanceid` | string | Filters metrics for a specific Watsonx.data instance. | +| `metric.tag.PodUid` | string | Filters metrics for a specific Kubernetes pod. | +| `metric.tag.k8s.namespace.name` | string | Filters metrics by Kubernetes namespace. | +| `metric.tag.k8s.pod.name` | string | Filters metrics by Kubernetes pod name. | +| `metric.tag.k8s.node.name` | string | Filters metrics by Kubernetes node. | + +## OpenTelemetry Metric Names + +| Prometheus Metric | Instana Metric | +|-------------------|----------------| +| `container_cpu_usage_seconds_total` | `metrics.sums.github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver/container_cpu_usage_seconds_total` | +| `container_memory_usage_bytes` | `metrics.gauges.github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver/container_memory_usage_bytes` | +| `container_memory_working_set_bytes` | `metrics.gauges.github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver/container_memory_working_set_bytes` | +| `container_fs_usage_bytes` | `metrics.gauges.github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver/container_fs_usage_bytes` | +| `container_network_receive_bytes_total` | `metrics.sums.github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver/container_network_receive_bytes_total` | +| `container_network_transmit_bytes_total` | `metrics.sums.github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver/container_network_transmit_bytes_total` | + +## Installation and Usage + +With the **Instana CLI for integration package management**, you can download and import this package into your Instana tenant. + +### Download the package + +```shell +stanctl-integration download --package @instana-integration/wxd-infrastructure +``` + +### Import the package + +```shell +stanctl-integration import --package @instana-integration/wxd-infrastructure \ + --server $INSTANA_SERVER \ + --token $API_TOKEN \ + --set serviceinstanceid=$SERVICE_INSTANCE_ID +``` + +Where: + +- **INSTANA_SERVER**: Base URL of your Instana tenant (for example, `https://example.instana.io`). +- **API_TOKEN**: Instana API token with permissions to import integration packages. +- **SERVICE_INSTANCE_ID**: Unique identifier of the monitored service instance. \ No newline at end of file diff --git a/packages/@instana-integration/wxd-infrastructure/dashboards/infrastructure.json b/packages/@instana-integration/wxd-infrastructure/dashboards/infrastructure.json new file mode 100644 index 00000000..20bb9e42 --- /dev/null +++ b/packages/@instana-integration/wxd-infrastructure/dashboards/infrastructure.json @@ -0,0 +1,301 @@ +{ + "rbacTags": [], + "accessRules": [ + { + "accessType": "READ_WRITE", + "relationType": "GLOBAL", + "relatedId": "" + } + ], + "id": "jLfoOBdRQLiLjO2g63smRw", + "title": "infrastructure", + "widgets": [ + { + "width": 6, + "x": 0, + "y": 13, + "id": "S_uesYIzzXwuavC4", + "title": "Memory Usage", + "type": "chart", + "config": { + "shareMaxAxisDomain": false, + "y1": { + "formatter": "number.detailed", + "renderer": "line", + "metrics": [ + { + "lastValue": false, + "color": "", + "compareToTimeShifted": false, + "threshold": { + "critical": "", + "warning": "", + "thresholdEnabled": false, + "operator": ">=" + }, + "aggregation": "MEAN", + "label": "container_memory_working_set_bytes", + "source": "INFRASTRUCTURE_METRICS", + "type": "openTelemetry", + "metricPath": [ + "Others", + "Regex" + ], + "formatter": "number.detailed", + "unit": "number", + "regex": true, + "metric": "metrics.gauges.github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver/container_memory_working_set_bytes", + "timeShift": 0, + "tagFilterExpression": { + "logicalOperator": "AND", + "elements": [], + "type": "EXPRESSION" + }, + "allowedCrossSeriesAggregations": [], + "metricLabel": "metrics.gauges.github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver/container_memory_working_set_bytes", + "crossSeriesAggregation": "MEAN" + } + ], + "formatterSelected": false + }, + "y2": { + "formatter": "number.detailed", + "renderer": "line", + "metrics": [] + }, + "type": "TIME_SERIES" + }, + "height": 13 + }, + { + "width": 6, + "x": 0, + "y": 0, + "id": "l29lbbjd2ctAMQED", + "title": "CPU Usage", + "type": "chart", + "config": { + "shareMaxAxisDomain": false, + "y1": { + "formatter": "number.detailed", + "renderer": "line", + "metrics": [ + { + "lastValue": false, + "color": "", + "compareToTimeShifted": false, + "threshold": { + "critical": "", + "warning": "", + "thresholdEnabled": false, + "operator": ">=" + }, + "aggregation": "MEAN", + "label": "container_cpu_usage_seconds_total", + "source": "INFRASTRUCTURE_METRICS", + "type": "openTelemetry", + "metricPath": [ + "Others", + "Regex" + ], + "formatter": "number.detailed", + "unit": "number", + "regex": true, + "metric": "metrics.sums.github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver/container_cpu_usage_seconds_total", + "timeShift": 0, + "tagFilterExpression": { + "logicalOperator": "AND", + "elements": [], + "type": "EXPRESSION" + }, + "allowedCrossSeriesAggregations": [], + "metricLabel": "metrics.sums.github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver/container_cpu_usage_seconds_total", + "crossSeriesAggregation": "MEAN" + } + ], + "formatterSelected": false + }, + "y2": { + "formatter": "number.detailed", + "renderer": "line", + "metrics": [] + }, + "type": "TIME_SERIES" + }, + "height": 13 + }, + { + "width": 6, + "x": 6, + "y": 13, + "id": "dN164j-obByYipHg", + "title": "Network Recieved ", + "type": "chart", + "config": { + "shareMaxAxisDomain": false, + "y1": { + "formatter": "number.detailed", + "renderer": "line", + "metrics": [ + { + "lastValue": false, + "color": "", + "compareToTimeShifted": false, + "threshold": { + "critical": "", + "warning": "", + "thresholdEnabled": false, + "operator": ">=" + }, + "aggregation": "MEAN", + "label": "container_network_receive_bytes_total", + "source": "INFRASTRUCTURE_METRICS", + "type": "openTelemetry", + "metricPath": [ + "Others", + "Regex" + ], + "formatter": "number.detailed", + "unit": "number", + "regex": true, + "metric": "metrics.sums.github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver/container_network_receive_bytes_total", + "timeShift": 0, + "tagFilterExpression": { + "logicalOperator": "AND", + "elements": [], + "type": "EXPRESSION" + }, + "allowedCrossSeriesAggregations": [], + "metricLabel": "metrics.sums.github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver/container_network_receive_bytes_total", + "crossSeriesAggregation": "MEAN" + } + ], + "formatterSelected": false + }, + "y2": { + "formatter": "number.detailed", + "renderer": "line", + "metrics": [] + }, + "type": "TIME_SERIES" + }, + "height": 13 + }, + { + "width": 6, + "x": 0, + "y": 26, + "id": "Lu5Upx1gQMxtpFz8", + "title": "Network Transmitted", + "type": "chart", + "config": { + "shareMaxAxisDomain": false, + "y1": { + "formatter": "number.detailed", + "renderer": "line", + "metrics": [ + { + "lastValue": false, + "color": "", + "compareToTimeShifted": false, + "threshold": { + "critical": "", + "warning": "", + "thresholdEnabled": false, + "operator": ">=" + }, + "aggregation": "MEAN", + "label": "container_network_transmit_bytes_total", + "source": "INFRASTRUCTURE_METRICS", + "type": "openTelemetry", + "metricPath": [ + "Others", + "Regex" + ], + "formatter": "number.detailed", + "unit": "number", + "regex": true, + "metric": "metrics.sums.github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver/container_network_transmit_bytes_total", + "timeShift": 0, + "tagFilterExpression": { + "logicalOperator": "AND", + "elements": [], + "type": "EXPRESSION" + }, + "allowedCrossSeriesAggregations": [], + "metricLabel": "metrics.sums.github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver/container_network_transmit_bytes_total", + "crossSeriesAggregation": "MEAN" + } + ], + "formatterSelected": false + }, + "y2": { + "formatter": "number.detailed", + "renderer": "line", + "metrics": [] + }, + "type": "TIME_SERIES" + }, + "height": 13 + }, + { + "width": 6, + "x": 6, + "y": 0, + "id": "MO4CqdGLG1YkwNt9", + "title": "Disk I/O", + "type": "chart", + "config": { + "shareMaxAxisDomain": false, + "y1": { + "formatter": "number.detailed", + "renderer": "line", + "metrics": [ + { + "lastValue": false, + "color": "", + "compareToTimeShifted": false, + "threshold": { + "critical": "", + "warning": "", + "thresholdEnabled": false, + "operator": ">=" + }, + "aggregation": "MEAN", + "label": "container_fs_usage_bytes", + "source": "INFRASTRUCTURE_METRICS", + "type": "openTelemetry", + "metricPath": [ + "Others", + "Regex" + ], + "formatter": "number.detailed", + "unit": "number", + "regex": true, + "metric": "metrics.gauges.github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver/container_fs_usage_bytes", + "timeShift": 0, + "tagFilterExpression": { + "logicalOperator": "AND", + "elements": [], + "type": "EXPRESSION" + }, + "allowedCrossSeriesAggregations": [], + "metricLabel": "metrics.gauges.github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver/container_fs_usage_bytes", + "crossSeriesAggregation": "MEAN" + } + ], + "formatterSelected": false + }, + "y2": { + "formatter": "number.detailed", + "renderer": "line", + "metrics": [] + }, + "type": "TIME_SERIES" + }, + "height": 13 + } + ], + "ownerId": "688744cde129430001af50ed", + "writable": true +} \ No newline at end of file diff --git a/packages/@instana-integration/wxd-infrastructure/package.json b/packages/@instana-integration/wxd-infrastructure/package.json new file mode 100644 index 00000000..31b60f13 --- /dev/null +++ b/packages/@instana-integration/wxd-infrastructure/package.json @@ -0,0 +1,26 @@ +{ + "name": "@instana-integration/wxd-infrastructure", + "version": "1.0.0", + "description": "The Instana integration package is designed to showcase infrastructure observability features in Instana by monitoring Kubernetes container resource metrics collected through the OpenTelemetry Prometheus Receiver.", + "author": "IBM", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "scripts": {}, + "keywords": [ + "ibm", + "instana", + "opentelemetry", + "custom dashboard", + "watsonx.data", + "infrastructure", + "kubernetes", + "container metrics", + "prometheus", + "cpu", + "memory", + "filesystem", + "network" + ] +} \ No newline at end of file