Skip to content

Commit

Permalink
Updating k8s track with 8.12 templates and new UIds (elastic#513)
Browse files Browse the repository at this point in the history
* New folder with no hostips

* Updating Uids and node names based on range id of pods. Setting new templates for 8.12

* Remove codec and _source
  • Loading branch information
gizas authored Nov 22, 2023
1 parent 64eefc1 commit 837119b
Show file tree
Hide file tree
Showing 3 changed files with 142 additions and 97 deletions.
130 changes: 75 additions & 55 deletions tsdb_k8s_queries/container-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
{# non-serverless-index-settings-marker-start #}{%- if build_flavor != "serverless" or serverless_operator == true -%}
"number_of_shards": {{number_of_shards | default(1)}},
"number_of_replicas": {{number_of_replicas | default(0)}},
"lifecycle": {
"name": "metrics"
},
"query": {
"default_field": [
"message"
]
},
"requests.cache.enable": false,
{%- endif -%}{# non-serverless-index-settings-marker-end #}
{# non-serverless-index-settings-marker-start #}{%- if build_flavor != "serverless" -%}
Expand All @@ -30,7 +38,6 @@
"name": "metrics"
},
{%- endif -%}{# non-serverless-index-settings-marker-end #}
"codec": "best_compression",
"mapping": {
"total_fields": {
"limit": "10000"
Expand Down Expand Up @@ -89,7 +96,7 @@
"mode": "time_series",
"routing_path": [
"kubernetes.pod.uid",
"kubernetes.container.name",
"container.id",
"orchestrator.cluster.url",
"service.address"
],
Expand Down Expand Up @@ -249,13 +256,13 @@
}
},
"container": {
"dynamic": "true",
"properties": {
"cpu": {
"properties": {
"usage": {
"type": "scaled_float",
"meta": {
"metric_type": "gauge",
"unit": "percent"
},
"scaling_factor": 1000,
Expand All @@ -264,7 +271,8 @@
}
},
"id": {
"type": "keyword"
"type": "keyword",
"time_series_dimension": true
},
"image": {
"properties": {
Expand All @@ -274,12 +282,15 @@
}
}
},
"labels": {
"type": "object",
"dynamic": "true"
},
"memory": {
"properties": {
"usage": {
"type": "scaled_float",
"meta": {
"metric_type": "gauge",
"unit": "percent"
},
"scaling_factor": 1000,
Expand Down Expand Up @@ -406,7 +417,12 @@
}
},
"kubernetes": {
"dynamic": "true",
"properties": {
"annotations": {
"type": "object",
"dynamic": "true"
},
"container": {
"properties": {
"cpu": {
Expand All @@ -417,9 +433,7 @@
"properties": {
"ns": {
"type": "long",
"meta": {
"metric_type": "gauge"
}
"time_series_metric": "gauge"
}
}
},
Expand All @@ -428,7 +442,6 @@
"pct": {
"type": "scaled_float",
"meta": {
"metric_type": "gauge",
"unit": "percent"
},
"scaling_factor": 1000,
Expand All @@ -438,16 +451,13 @@
},
"nanocores": {
"type": "long",
"meta": {
"metric_type": "gauge"
}
"time_series_metric": "gauge"
},
"node": {
"properties": {
"pct": {
"type": "scaled_float",
"meta": {
"metric_type": "gauge",
"unit": "percent"
},
"scaling_factor": 1000,
Expand All @@ -470,9 +480,9 @@
"bytes": {
"type": "long",
"meta": {
"metric_type": "gauge",
"unit": "byte"
}
},
"time_series_metric": "gauge"
}
}
},
Expand All @@ -481,31 +491,25 @@
"bytes": {
"type": "long",
"meta": {
"metric_type": "gauge",
"unit": "byte"
}
},
"time_series_metric": "gauge"
}
}
},
"inodes": {
"properties": {
"count": {
"type": "long",
"meta": {
"metric_type": "gauge"
}
"time_series_metric": "gauge"
},
"free": {
"type": "long",
"meta": {
"metric_type": "gauge"
}
"time_series_metric": "gauge"
},
"used": {
"type": "long",
"meta": {
"metric_type": "gauge"
}
"time_series_metric": "gauge"
}
}
},
Expand All @@ -514,9 +518,9 @@
"bytes": {
"type": "long",
"meta": {
"metric_type": "gauge",
"unit": "byte"
}
},
"time_series_metric": "gauge"
}
}
}
Expand All @@ -529,32 +533,28 @@
"bytes": {
"type": "long",
"meta": {
"metric_type": "gauge",
"unit": "byte"
}
},
"time_series_metric": "gauge"
}
}
},
"majorpagefaults": {
"type": "long",
"meta": {
"metric_type": "counter"
}
"time_series_metric": "counter"
},
"pagefaults": {
"type": "long",
"meta": {
"metric_type": "counter"
}
"time_series_metric": "counter"
},
"rss": {
"properties": {
"bytes": {
"type": "long",
"meta": {
"metric_type": "gauge",
"unit": "byte"
}
},
"time_series_metric": "gauge"
}
}
},
Expand All @@ -563,16 +563,15 @@
"bytes": {
"type": "long",
"meta": {
"metric_type": "gauge",
"unit": "byte"
}
},
"time_series_metric": "gauge"
},
"limit": {
"properties": {
"pct": {
"type": "scaled_float",
"meta": {
"metric_type": "gauge",
"unit": "percent"
},
"scaling_factor": 1000,
Expand All @@ -585,7 +584,6 @@
"pct": {
"type": "scaled_float",
"meta": {
"metric_type": "gauge",
"unit": "percent"
},
"scaling_factor": 1000,
Expand All @@ -600,16 +598,15 @@
"bytes": {
"type": "long",
"meta": {
"metric_type": "gauge",
"unit": "byte"
}
},
"time_series_metric": "gauge"
},
"limit": {
"properties": {
"pct": {
"type": "scaled_float",
"meta": {
"metric_type": "gauge",
"unit": "percent"
},
"scaling_factor": 1000,
Expand All @@ -623,7 +620,7 @@
},
"name": {
"type": "keyword",
"time_series_dimension": true
"ignore_above": 1024
},
"rootfs": {
"properties": {
Expand All @@ -632,9 +629,9 @@
"bytes": {
"type": "long",
"meta": {
"metric_type": "gauge",
"unit": "byte"
}
},
"time_series_metric": "gauge"
}
}
},
Expand All @@ -643,19 +640,17 @@
"bytes": {
"type": "long",
"meta": {
"metric_type": "gauge",
"unit": "byte"
}
},
"time_series_metric": "gauge"
}
}
},
"inodes": {
"properties": {
"used": {
"type": "long",
"meta": {
"metric_type": "gauge"
}
"time_series_metric": "gauge"
}
}
},
Expand All @@ -664,9 +659,9 @@
"bytes": {
"type": "long",
"meta": {
"metric_type": "gauge",
"unit": "byte"
}
},
"time_series_metric": "gauge"
}
}
}
Expand Down Expand Up @@ -709,20 +704,41 @@
}
}
},
"labels": {
"type": "object",
"dynamic": "true"
},
"namespace": {
"type": "keyword",
"ignore_above": 1024
},
"namespace_annotations": {
"type": "object",
"dynamic": "true"
},
"namespace_labels": {
"type": "object",
"dynamic": "true"
},
"namespace_uid": {
"type": "keyword",
"ignore_above": 1024
},
"node": {
"dynamic": "true",
"properties": {
"annotations": {
"type": "object",
"dynamic": "true"
},
"hostname": {
"type": "keyword",
"ignore_above": 1024
},
"labels": {
"type": "object",
"dynamic": "true"
},
"name": {
"type": "keyword",
"ignore_above": 1024
Expand Down Expand Up @@ -756,6 +772,10 @@
}
}
},
"selectors": {
"type": "object",
"dynamic": "true"
},
"statefulset": {
"properties": {
"name": {
Expand Down
Loading

0 comments on commit 837119b

Please sign in to comment.