# Connect Monitoring Data

Sedai requires access to your APM/observability providers in order to learn resource behavior and teach its machine learning models. Each cloud integration needs a monitoring source in order for Sedai to generate recommendations or optionally operate on your resources. You will be prompted to add a monitoring source when integrating a new account or Kubernetes cluster, but you can add or modify a monitoring source at any time by navigating to the **Settings > Integrations** page and then selecting the corresponding account or cluster.

By default, Sedai automatically detects and imports standard metrics for CPU, memory, traffic, performance and errors (view sample list of default metrics [here](https://docs.google.com/spreadsheets/d/1z5l3iuNwjCXqkNY_2mVhNFzLShrtnYiOSIUj6LMEajQ/edit?usp=sharing).) The system primarily relies on performance metrics, however each category is required in order for the system to run effectively and produce the best recommendations. You can view a list of imported metrics from the Settings > Metrics page. You can filter the list based on the parent account/Kubernetes cluster as well as by the monitoring provider.

{% hint style="info" %}
It typically takes between 7-14 days for Sedai to examine monitoring data and generate its preliminary analysis.
{% endhint %}

If you don't want to pull specific metrics Sedai imported, you can toggle them off from the Metrics page. If you don't want to pull metrics for all resources, you can optionally disable feature settings for specific resources. Learn more about configuring [settings](https://docs.sedai.io/get-started/platform/settings/features).

{% hint style="warning" %}
If your organization uses different metrics than the defined defaults (or custom metrics) contact **<support@sedai.io>** for help with advanced setup to map your metrics into Sedai.
{% endhint %}

In addition to learning resource behavior, Sedai also leverages APM data to decide if it can safely execute operations on resources. If Sedai is unable to detect relevant performance metrics from a monitoring integration, you can optionally configure settings to use an expedited operations safety workflow to safely relax Sedai's safety checks ([learn more](https://docs.sedai.io/get-started/platform/settings/features#compute-actions)).

{% hint style="info" %}
If your organization has configured custom metrics, contact **<support@sedai.io>** for help importing.
{% endhint %}

Select a provider to view integration details:

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>AppDynamics</strong></td><td><a href="https://718462512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrF70A0mjyczIwzn72g6Y%2Fuploads%2FBVrVANeBooZgz0Bz0NKg%2FAppDynamics.png?alt=media&#x26;token=2df81284-bda2-4e6b-a5e4-3dd2000bda7d">AppDynamics.png</a></td><td><a href="#appdynamics">#appdynamics</a></td></tr><tr><td><strong>Azure Monitor</strong></td><td><a href="https://718462512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrF70A0mjyczIwzn72g6Y%2Fuploads%2F2IwS1Pqjl35rwoLseLbS%2FAzure%20Monitor.png?alt=media&#x26;token=e7ee531f-2881-497f-9ccc-a41e30c0a03d">Azure Monitor.png</a></td><td><a href="#azure-monitor">#azure-monitor</a></td></tr><tr><td><strong>CloudWatch</strong></td><td><a href="https://718462512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrF70A0mjyczIwzn72g6Y%2Fuploads%2FGgyKfoWuLkExYo6DCznw%2FCloudWatch.png?alt=media&#x26;token=0fdbf46e-ab1f-438b-a15c-9620052631be">CloudWatch.png</a></td><td><a href="#cloudwatch">#cloudwatch</a></td></tr><tr><td><strong>Chronosphere</strong></td><td><a href="https://718462512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrF70A0mjyczIwzn72g6Y%2Fuploads%2FCepKcbd8ho9GVsdjqze1%2FChronosphere.png?alt=media&#x26;token=a34c77ee-bbde-484b-a31e-009c21a6d14f">Chronosphere.png</a></td><td><a href="#chronosphere">#chronosphere</a></td></tr><tr><td><strong>Datadog</strong></td><td><a href="https://718462512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrF70A0mjyczIwzn72g6Y%2Fuploads%2FvgglyMxEhNyQDoWemFCO%2FDatadog.png?alt=media&#x26;token=45e22e81-5d48-4865-8da7-960c2ddba369">Datadog.png</a></td><td><a href="#datadog">#datadog</a></td></tr><tr><td><strong>Google Monitoring</strong></td><td><a href="https://718462512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrF70A0mjyczIwzn72g6Y%2Fuploads%2FLUSbmDIG6lvBpJTO08jq%2FGoogle.png?alt=media&#x26;token=3a390628-a840-4f8d-bf6d-cc86000208de">Google.png</a></td><td><a href="#google-monitoring">#google-monitoring</a></td></tr><tr><td><strong>Netdata</strong></td><td><a href="https://718462512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrF70A0mjyczIwzn72g6Y%2Fuploads%2Fts24FJTvn3TibGdlW2EQ%2FNetdata.png?alt=media&#x26;token=4d11a33d-dc42-444a-a76e-b5a99e868b77">Netdata.png</a></td><td><a href="#netdata">#netdata</a></td></tr><tr><td><strong>New Relic</strong></td><td><a href="https://718462512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrF70A0mjyczIwzn72g6Y%2Fuploads%2FpAtq1PpUzsyKpZ438W1p%2FNew%20Relic.png?alt=media&#x26;token=9b3cd0ae-e741-4077-ad49-6315cab2e5ed">New Relic.png</a></td><td><a href="#new-relic">#new-relic</a></td></tr><tr><td><strong>Prometheus</strong></td><td><a href="https://718462512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrF70A0mjyczIwzn72g6Y%2Fuploads%2FVvZeXqt37HhediO608Kn%2FPrometheus.png?alt=media&#x26;token=3c9fc82a-f9cb-46e4-a4f1-51053bc42a98">Prometheus.png</a></td><td><a href="#prometheus">#prometheus</a></td></tr><tr><td><strong>Splunk/SignalFX</strong></td><td><a href="https://718462512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrF70A0mjyczIwzn72g6Y%2Fuploads%2FmBEGaP8BwdSO36pJLtNE%2Fsplunk.png?alt=media&#x26;token=a3512f64-531b-4d25-b5ee-11437d0e189a">splunk.png</a></td><td><a href="#splunk-previously-signalfx">#splunk-previously-signalfx</a></td></tr><tr><td><strong>Wavefront</strong></td><td><a href="https://718462512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrF70A0mjyczIwzn72g6Y%2Fuploads%2Fqww7VOJ6xeYTqbij9dl3%2FWavefront.png?alt=media&#x26;token=f08775a9-d51d-45a7-afec-d167c24a7a5a">Wavefront.png</a></td><td><a href="#wavefront">#wavefront</a></td></tr></tbody></table>

***

## Advanced Setup

<details>

<summary>Tag Mapping</summary>

Sedai leverages tags to accurately infer metrics and map them to your infrastructure so it can understand which metrics relate to resources discovered within a connected account/cluster.

By default, Sedai pre-populates standard tag values based on industry best practices for naming conventions. However, if you configured custom tags, you will need to provide the exact tag value used.

You can view default tags under each monitoring provider on this page.

</details>

<details>

<summary>Instance ID Pattern (Kubernetes)</summary>

If your instance IDs do not follow standard Kubernetes patterns, you will need to define the unique identifier or prefix used. Supported patterns include:

* `${instanceID}`
* `${instanceName}`
* `${appID}`
* `${appName}`
* `${regionID}`
* `$}loadBalancerId}`
* `${kubeNamespace}`
* `${kubeClusterName}`

</details>

***

## AppDynamics

<table data-header-hidden><thead><tr><th width="262"></th><th></th></tr></thead><tbody><tr><td><strong>Controller Name</strong></td><td></td></tr><tr><td><strong>Controller Endpoint</strong></td><td></td></tr><tr><td><strong>Client ID</strong></td><td>Learn more <a href="https://docs.appdynamics.com/appd/4.5.x/en/extend-appdynamics/appdynamics-apis/api-clients">here</a></td></tr><tr><td><strong>Client Secret Key</strong></td><td>Learn more <a href="https://docs.appdynamics.com/appd/4.5.x/en/extend-appdynamics/appdynamics-apis/api-clients">here</a></td></tr></tbody></table>

{% embed url="<https://docs.appdynamics.com/appd/4.5.x/en/extend-appdynamics/appdynamics-apis/api-clients%E2%80%8C>" %}

Once the controller name and endpoint URL are added, an API client will be created to provide secure access to the Controller, following which the client secret and the Client ID are received.

#### Tag Mapping

{% tabs %}
{% tab title="Cloud Account" %}

<table data-header-hidden><thead><tr><th width="262">Tag / Label</th><th>Default Value</th></tr></thead><tbody><tr><td><strong>Load Balancer</strong></td><td><code>load_balancer_name</code></td></tr><tr><td><strong>Application</strong></td><td><code>application_id</code></td></tr><tr><td><strong>Instance ID</strong></td><td><code>instance_id</code></td></tr></tbody></table>
{% endtab %}

{% tab title="Kubernetes Cluster" %}

<table data-header-hidden><thead><tr><th width="202">Topology</th><th>Default Tag Value</th></tr></thead><tbody><tr><td><strong>Namespace</strong></td><td><code>namespace</code></td></tr><tr><td><strong>Load Balancer</strong></td><td><code>load_balancer_name</code></td></tr><tr><td><strong>Application</strong></td><td><code>application_id</code></td></tr><tr><td><strong>Container</strong></td><td><code>container_name</code></td></tr><tr><td><strong>Pod</strong></td><td><code>pod_name</code></td></tr></tbody></table>
{% endtab %}
{% endtabs %}

***

## Azure Monitor

{% hint style="info" %}
Contact **<support@sedai.io>** for help integrating.
{% endhint %}

***

## CloudWatch

By default, Sedai connects to CloudWatch using the same credentials as the corresponding AWS account. You can alternatively connect CloudWatch independently of the account credentials by configuring [IAM access](https://github.com/SedaiEngineering/sedai-public-docs/blob/main/get-started/autonomous-cloud-management/broken-reference/README.md).

#### Tag Mapping

<table data-header-hidden><thead><tr><th width="262">Tag / Label</th><th>Default Value</th></tr></thead><tbody><tr><td><strong>Load Balancer</strong></td><td><code>load_balancer_name</code></td></tr><tr><td><strong>Application</strong></td><td><code>application_id</code></td></tr><tr><td><strong>Instance ID</strong></td><td><code>instance_id</code></td></tr></tbody></table>

{% hint style="warning" %}
By default, memory metrics are not available EC2. We recommend enabling these metrics to access optimal EC2 configurations. You can enable by installing the CloudWatch agent using the[ command line](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/installing-cloudwatch-agent-commandline.html) or the[ AWS Systems Manager](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/installing-cloudwatch-agent-ssm.html), as well as by installing the agent on new instances using a[ CloudFormation template](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Install-CloudWatch-Agent-New-Instances-CloudFormation.html). To learn more about using the CloudWatch agent for memory metrics, visit[ CloudWatch Agent docs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Install-CloudWatch-Agent.html).

Sedai uses these metrics to generate optimal configurations for cost savings or performance improvements.
{% endhint %}

***

## Chronosphere

You will need to authenticate your Chronosphere account using one of the following methods:

* Basic Auth (requires username and password)
* JWT Credentials (requires token)
* OIDC Client Provider (requires Token URL, Client ID, and Client Secret)
* No authentication

<table data-header-hidden><thead><tr><th width="241"></th><th></th></tr></thead><tbody><tr><td><strong>Endpoint</strong></td><td></td></tr><tr><td><strong>Certificate Authority</strong></td><td>(Optional) PEM format accepted; chain of certificates supported</td></tr></tbody></table>

***

## Datadog

{% hint style="info" %}
If you connect multiple AWS accounts or Kubernetes clusters to Sedai, you will need to add Datadog to each from its respective integration page.
{% endhint %}

<table data-header-hidden><thead><tr><th width="195"></th><th></th></tr></thead><tbody><tr><td><strong>Endpoint</strong></td><td><p>Based on your site's location, select one of the following:</p><ul><li>US1: <a href="https://api.datadoghq.com/"><mark style="color:blue;">https://api.datadoghq.com</mark></a></li><li>EU1: <a href="https://api.datadoghq.eu/">https://api.datadoghq.eu</a></li></ul></td></tr><tr><td><strong>API Key</strong></td><td></td></tr><tr><td><strong>Application Key</strong></td><td></td></tr></tbody></table>

{% embed url="<https://docs.datadoghq.com/account_management/api-app-keys/#add-a-key>" %}

#### Tag Mapping

{% tabs %}
{% tab title="Kubernetes Cluster" %}

<table data-header-hidden><thead><tr><th width="202">Topology</th><th>Default Tag Value</th></tr></thead><tbody><tr><td><strong>Cluster</strong></td><td><code>cluster</code></td></tr><tr><td><strong>Namespace</strong></td><td><code>destination_service_namespace</code>, <code>kube_namespace</code>, <code>namespace</code></td></tr><tr><td><strong>Load Balancer</strong></td><td><code>load_balancer_name</code></td></tr><tr><td><strong>Application</strong></td><td><code>destination_workload</code>, <code>service</code>, <code>kube_app_name</code></td></tr><tr><td><strong>Container</strong></td><td><code>container_name</code></td></tr><tr><td><strong>Pod</strong></td><td><code>pod_name</code></td></tr></tbody></table>
{% endtab %}

{% tab title="Cloud Account" %}

<table><thead><tr><th width="196">Topology</th><th>Default Tag Key</th></tr></thead><tbody><tr><td><strong>Load Balancer</strong></td><td><code>load_balancer_name</code>, <code>targetgroup</code></td></tr><tr><td><strong>Application</strong></td><td><code>applicaton_id</code></td></tr><tr><td><strong>Instance</strong></td><td><code>instance_id</code></td></tr></tbody></table>
{% endtab %}
{% endtabs %}

\
If you're not sure how tag values have been configured within your account, you can view your unique metrics with the following APIs:

{% code title="APM Metrics" %}

```
https://api.datadoghq.com/api/v2/metrics/trace.http.request.duration/all-tags

Istio Metrics 
https://api.datadoghq.com/api/v2/metrics/istio.mesh.request.count/all-tags

You can see tags for any metircs using the all-tags api for datadog 
```

{% endcode %}

{% code title="CPU Metrics (ECS only)" %}

```
https://api.datadoghq.com/api/v2/metrics/ecs.fargate.cpu.usage/all-tags
```

{% endcode %}

If the APM metrics for an application isn't a standard one, you can find all the metrics&#x20;

```
https://api.datadoghq.com//api/v1/metrics?from=0
```

To learn more about configuring custom tags, please visit [Datadog Docs](https://docs.datadoghq.com/getting_started/tagging/assigning_tags/?tab=noncontainerizedenvironments).

***

## Google Monitoring

<table data-header-hidden><thead><tr><th width="241"></th><th></th></tr></thead><tbody><tr><td><strong>Project ID</strong></td><td>Go to your <a href="https://console.developers.google.com/">API Console</a>. From the projects list, select <strong>Manage all projects</strong>. The names and IDs for all the projects you're a member of are displayed.</td></tr><tr><td><strong>Service Account JSON</strong></td><td>You will need to create a new service account — <a href="../connect-gcp-account#service-account-setup">learn more</a>.</td></tr></tbody></table>

#### Tag Mapping

{% tabs %}
{% tab title="Cloud Account" %}

<table data-header-hidden><thead><tr><th width="196">Topology</th><th>Default Tag Key</th></tr></thead><tbody><tr><td><strong>Region</strong></td><td><code>location</code></td></tr><tr><td><strong>Load Balancer</strong></td><td><code>load_balancer_name</code></td></tr><tr><td><strong>Application</strong></td><td><code>application_id</code></td></tr><tr><td><strong>Instance</strong></td><td><code>instance_id</code></td></tr></tbody></table>
{% endtab %}

{% tab title="Kuberenetes Cluster" %}

<table data-header-hidden><thead><tr><th width="196">Topology</th><th>Default Tag Key</th></tr></thead><tbody><tr><td><strong>Cluster</strong></td><td><code>cluster_name</code></td></tr><tr><td><strong>Region</strong></td><td><code>location</code></td></tr><tr><td><strong>Namespace</strong></td><td><code>namespace_name</code></td></tr><tr><td><strong>Load Balancer</strong></td><td><code>load_balancer_name</code></td></tr><tr><td><strong>Application</strong></td><td><code>application_id</code></td></tr><tr><td><strong>Pod</strong></td><td><code>pod_name</code></td></tr><tr><td><strong>Container</strong></td><td><code>container_name</code></td></tr></tbody></table>
{% endtab %}
{% endtabs %}

***

## Netdata

Requires an endpoint.

#### Tag Mapping

{% tabs %}
{% tab title="Kubernetes Cluster" %}

<table data-header-hidden><thead><tr><th width="197"></th><th></th></tr></thead><tbody><tr><td><strong>Namespace</strong></td><td><code>namespace</code></td></tr><tr><td><strong>Load Balancer</strong></td><td><code>load_balancer_name</code></td></tr><tr><td><strong>Application</strong></td><td><code>application_id</code></td></tr><tr><td><strong>Pod</strong></td><td><code>pod</code></td></tr><tr><td><strong>Container</strong></td><td><code>container</code></td></tr></tbody></table>
{% endtab %}

{% tab title="Cloud Account" %}

| **Load Balancer** | `load_balancer_name` |
| ----------------- | -------------------- |
| **Application**   | `application_id`     |
| **Instance**      | `instance_id`        |
| {% endtab %}      |                      |
| {% endtabs %}     |                      |

***

## New Relic

| **API Server**     | [Learn more](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/)                                    |
| ------------------ | ------------------------------------------------------------------------------------------------------------------- |
| **API Server URL** | [Learn more](https://docs.newrelic.com/docs/apis/rest-api-v2/get-started/introduction-new-relic-rest-api-v2/#appid) |

#### Tag Mapping

{% tabs %}
{% tab title="Kubernetes Cluster" %}

| **Namespace**     | `exporter_namespace`, `namespace`                      |
| ----------------- | ------------------------------------------------------ |
| **Load Balancer** | `load_balancer_name`, `entity.name`                    |
| **Application**   | `application_id`, `appName`, `entity.name`             |
| **Pod**           | `instance_id`, `k8s.podName`, `k8s.pod.name`           |
| **Container**     | `container`, `k8s.containerName`, `k8s.container.name` |
| {% endtab %}      |                                                        |

{% tab title="Cloud Account" %}

| **Load Balancer** | `load_balancer_name` |
| ----------------- | -------------------- |
| **Application**   | `application_id`     |
| **Instance**      | `instance_id`        |
| {% endtab %}      |                      |
| {% endtabs %}     |                      |

***

## Prometheus

{% hint style="info" %}
If Prometheus is your primary monitoring source, you will need to connect it to each Kubernetes cluster added to Sedai.
{% endhint %}

Sedai can receive monitoring data from multiple Prometheus instances running on-premise or public cloud.

To connect to Prometheus, you will need to provide its **Endpoint**. By default, Sedai does not require authentication since it assumes it can connect to Prometheus within the Kubernetes control plane via the Sedai [Smart Agent](https://docs.sedai.io/get-started/onboarding/autonomous-cloud-management/connect-kubernetes-cluster/sedai-smart-agent).

You can authenticate Prometheus using the following methods:

* Basic Auth (requires username and password)
* JWT Credentials (requires token)
* OIDC Client Credentials (requires token endpoint, client ID, and client secret)
* OIDC Resource Owner Password (requires token, client ID, client secret, username, and password)

#### Certificate Authority

You can optionally provide a custom Certificate Authority (CA) if you use an https connection while communicating with your Prometheus endpoint.

#### Tag Mapping

<table><thead><tr><th width="234">Topology</th><th>Default Label Value</th></tr></thead><tbody><tr><td><strong>Namespace</strong></td><td><code>exporter_namespace</code>, <code>envoy</code>, <code>namespace</code>, <code>destination_service_namespace</code></td></tr><tr><td><strong>Load Balancer</strong></td><td><code>service</code></td></tr><tr><td><strong>Application</strong></td><td><code>application_id</code></td></tr><tr><td><strong>Pod</strong></td><td><code>pod</code></td></tr><tr><td><strong>Container</strong></td><td><code>container</code></td></tr><tr><td><strong>Region</strong></td><td><code>region</code></td></tr><tr><td><strong>Availability Zones</strong></td><td><code>availability_zone</code></td></tr><tr><td><strong>Operating</strong> <strong>System</strong></td><td><code>os</code></td></tr><tr><td><strong>Architecture</strong></td><td><code>architecture</code></td></tr><tr><td><strong>Instance Type</strong></td><td><code>instance_type</code></td></tr></tbody></table>

***

## Splunk (Previously SignalFX)

<table data-header-hidden><thead><tr><th width="197"></th><th></th></tr></thead><tbody><tr><td><strong>API Server URL</strong></td><td>Example format: <code>https://api.YOUR_SIGNALFX_REALM.signalfx.com</code></td></tr><tr><td><strong>API Key</strong></td><td></td></tr></tbody></table>

To generate an API access token, please visit [Splunk Docs](https://docs.splunk.com/observability/en/admin/authentication/authentication-tokens/tokens.html#create-a-user-api-access-token).

#### Tag Mapping

{% tabs %}
{% tab title="Kubernetes Cluster" %}

| **Namespace**     | `namespace`           |
| ----------------- | --------------------- |
| **Load Balancer** | `load_balancer_name`  |
| **Application**   | `application_id`      |
| **Pod**           | `kubernetes_pod_name` |
| **Container**     | `container_spec_name` |

You can additionally map tags for region, availability zone, SignalFlow Programs, and metric name wildcards.
{% endtab %}

{% tab title="Cloud Account" %}

| **Load Balancer** | `load_balancer_name` |
| ----------------- | -------------------- |
| **Application**   | `application_id`     |
| **Instance**      | `instance_id`        |
| {% endtab %}      |                      |
| {% endtabs %}     |                      |

***

## Wavefront

<table data-header-hidden><thead><tr><th width="297"></th><th></th></tr></thead><tbody><tr><td><strong>API Key</strong></td><td><a href="https://docs.wavefront.com/wavefront_api.html#managing-api-tokens">Learn more</a></td></tr><tr><td><strong>API Server</strong></td><td>This is your <code>&#x3C;wavefront_instance></code> url, such as <code>https://longboard.wavefront.com/</code>)</td></tr></tbody></table>

{% hint style="warning" %}
Testing the Wavefront connection is not currently supported within Sedai. However, if the API key is valid, the integration will connect.
{% endhint %}

#### Defining dimensions

Wavefront dimensions can vary by product version. To find your unique Wavefront dimensions, go to the [Browse tab from your Wavefront platform](https://docs.wavefront.com/metrics_managing.html#metrics-browser) and search for `kubernetes.pod_container.cpu.usage_rate` metrics in the table view.

This will give an output similar to the example below. Note the following code lines for examples of different dimension values:

* **Line 6:** Container dimension: `container_name`
* **Line 10:** Application (Kubernetes Workload) dimension: `label.app.kubernetes.io/name`, `label.app`, `label.name`
* **Line 17:** Load balancer (typically service) dimension: `label.io.kompose.service`
* **Line 28:** Pod dimension: `pod_name`

{% code title="Example " lineNumbers="true" %}

```yaml
kubernetes.pod_container.cpu.usage_rate: -
Source: ip-192-168-185-37.us-east-2.compute.internal
cluster: sedaivector
container_base_image: nvanderhoeven/pokeapi_app
container_name: pokeapi-app
label.app: -
label.app.kubernetes.io/component: -
label.app.kubernetes.io/instance: -
label.app.kubernetes.io/managed-by: -
label.app.kubernetes.io/name: -
label.app.kubernetes.io/version: -
label.chart: -
label.component: -
label.eks.amazonaws.com/component: -
label.helm.sh/chart: -
label.heritage: -
label.io.kompose.service: app
label.k8s-app: -
label.mode: -
label.name: -
label.olm.catalogSource: -
label.plane: -
label.release: -
label.statefulset.kubernetes.io/pod-name: -
label.vizier-name: -
namespace_name: poki-test-1
nodename: ip-192-168-185-37.us-east-2.compute.internal
pod_name: app-5b87b74bc6-xd9sj
type: pod_container
Value: 1.200k
```

{% endcode %}

#### Custom metrics

In order to add custom metrics such as latency or traffic, you will need to additionally define their dimensions. For example, if nginx is the ingress/envoy controller, Sedai supports nginx/envoy ingress metrics.

In the example below, the load balancer dimension for these metrics is `service` in the first code block (line 16) and `envoy_cluster_name` in the second code block (line 4).

{% code title="Example" lineNumbers="true" %}

```yaml
nginx.ingress.controller.requests.counter: -
Source: ip-192-168-185-37.us-east-2.compute.internal
_host: hello-test.info
cluster: sedaivector
controller_class: k8s.io/ingress-nginx
controller_namespace: ingress-nginx
controller_pod: ingress-nginx-controller-7dfdd55674-zjnrr
ingress: opt-ingress
label.app.kubernetes.io/component: controller
label.app.kubernetes.io/instance: ingress-nginx
label.app.kubernetes.io/name: ingress-nginx
method: GET
namespace: optimization-test
path: /pyroglyph
pod: ingress-nginx-controller-7dfdd55674-zjnrr
service: pyroglyph-service
status: 200
Value: 10.004M
```

{% endcode %}

{% code title="Example" lineNumbers="true" %}

```yaml
envoy.cluster.upstream.rq.completed.counter: -
Source: ip-192-168-48-229.us-east-2.compute.internal
cluster: sedaivector
envoy_cluster_name: default_httpbin_80
label.app.kubernetes.io/component: envoy
label.app.kubernetes.io/instance: my-release
label.app.kubernetes.io/managed-by: Helm
label.app.kubernetes.io/name: contour
label.helm.sh/chart: contour-7.3.5
namespace: projectcontour
pod: my-release-contour-envoy-h5jvk
Value: 2.574M
```

{% endcode %}

#### Tag Mapping

{% tabs %}
{% tab title="Kubernetes Clusters" %}

<table data-header-hidden><thead><tr><th width="190"></th><th></th></tr></thead><tbody><tr><td><strong>Namespace</strong></td><td><code>namespace_name</code></td></tr><tr><td><strong>Load Balancer</strong></td><td><code>load_balancer_name</code>, <code>envoy_cluster_name</code>, <code>label.io.kompose.service</code>, <code>service</code></td></tr><tr><td><strong>Application</strong></td><td><code>application_id</code>, <code>label.app.kubernetes.io/name</code>, <code>label.app</code>, <code>label.name</code></td></tr><tr><td><strong>Pod</strong></td><td><code>pod</code>, <code>pod_name</code></td></tr><tr><td><strong>Container</strong></td><td><code>container</code>, <code>container_name</code></td></tr></tbody></table>
{% endtab %}

{% tab title="Cloud Account" %}

| **Load Balancer** | `load_balancer_name` |
| ----------------- | -------------------- |
| **Application**   | `application_id`     |
| **Instance**      | `instance_id`        |
| {% endtab %}      |                      |
| {% endtabs %}     |                      |

***

## API Meter

Sedai makes regular API calls to inform its ML models. To view charges caused by Sedai, go to the System > API Meter page and select a timeframe. By default, charges are broken down by account/Kubernetes cluster. Select one to view total calls and cost for the account/cluster's connected monitoring source.

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sedai.io/get-started/onboarding/autonomous-cloud-management/connect-monitoring-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
