# Elastic agent on AKS does not collect kubernetes total node memory metric

**URL:** <https://discuss.elastic.co/t/elastic-agent-on-aks-does-not-collect-kubernetes-total-node-memory-metric/356900>\
**Category:** Elastic Observability\
**Created:** [April 6, 2024, 9:16am UTC](https://discuss.elastic.co/t/elastic-agent-on-aks-does-not-collect-kubernetes-total-node-memory-metric/356900 "2024-04-06T09:16:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![minhtranes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/minhtranes/32/133168_2.png) [@minhtranes](https://discuss.elastic.co/u/minhtranes)\
**Post date:** [April 6, 2024, 9:16am UTC](https://discuss.elastic.co/t/elastic-agent-on-aks-does-not-collect-kubernetes-total-node-memory-metric/356900/1 "2024-04-06T09:16:37Z")

</div>

**Issue**  
In my case, the Kubernetes dashboard (Metrics Kubernetes Node) does not show Memory usage visualization.

**Context:**  
I deployed ELK stack 8.12.2 on Azure Kubernetes Service to monitor basic metrics of Node and Pod with pre-built dashboards from Kubernetes integration.

**Troubleshooting**  
I found that the metrics `kubernetes.node.memory.capacity.bytes` is not available on Elasticsearch.  
The other `kubernetes.node.memory.*` are available like: `kubernetes.node.memory.usage.bytes`, `kubernetes.node.memory.available.bytes`,...

I found couple of limitation from official document as [Important notes](https://www.elastic.co/guide/en/fleet/8.12/running-on-aks-managed-by-fleet.html#_important_notes_4)

**Question**  
Is `kubernetes.node.memory.usage.bytes` an alternative metric for `kubernetes.node.memory.capacity.bytes` on AKS? If not, is there any other alternative then I can build the usage monitoring for node memory?

Many thanks

---

<div class="post-metadata">

**Author:** ![atul\_mohan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/atul_mohan/32/137776_2.png) [@atul\_mohan](https://discuss.elastic.co/u/atul_mohan)\
**Post date:** [February 2, 2025, 10:07pm UTC](https://discuss.elastic.co/t/elastic-agent-on-aks-does-not-collect-kubernetes-total-node-memory-metric/356900/2 "2025-02-02T22:07:11Z")

</div>

```auto
{
  "query": {
    "bool": {
      "must": [
        { "exists": { "field": "kubernetes.node.memory.usage.bytes" } },
        { "exists": { "field": "kubernetes.node.memory.available.bytes" } }
      ]
    }
  },
  "runtime_mappings": {
    "kubernetes.node.memory.capacity.bytes": {
      "type": "double",
      "script": {
        "source": "emit(doc['kubernetes.node.memory.usage.bytes'].value + doc['kubernetes.node.memory.available.bytes'].value)"
      }
    }
  },
  "aggs": {
    "total_memory_capacity": {
      "avg": {
        "field": "kubernetes.node.memory.capacity.bytes"
      }
    }
  }
}

```
