Skip to content

Commit

Permalink
remove unnecessary fields and add duration for start time
Browse files Browse the repository at this point in the history
  • Loading branch information
ali786XI committed Feb 14, 2024
1 parent 5e3993b commit ad2d1bb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ fields:
range:
min: 0
max: 10000
- name: duration_start
enum: ["-1h", "-2h", "-3h", "-4h"]
- name: event_duration
range:
min: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
type: integer
- name: event_duration
type: long
- name: duration_start
type: keyword
- name: cpu_usage_core_ns
type: long
- name: nanocores
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
{{- $event_duration := generate "event_duration" }}
{{- $rangeofid := generate "rangeofid" -}}
{{- $nodeid := div $rangeofid 110 -}}
{{- $duration_start := generate "duration_start" }}
{{- $startTime := generate "timestamp" | date_modify (print $duration_start) }}
{{- $memory_available_bytes := generate "memory_available_bytes" }}
{{- $memory_usage_bytes := generate "memory_usage_bytes" }}
{{- $memory_rss_bytes := generate "memory_rss_bytes" }}
Expand Down Expand Up @@ -52,14 +54,8 @@
"platform": "centos"
},
"containerized": true,
"ip": [
"192.168.244.7"
],
"name": "kubernetes-scale-123456",
"id": "85e35c2b5e1b39ba72393a6baf6ee7cd",
"mac": [
"fe:ec:82:9f:29:19"
],
"architecture": "x86_64"
},
"metricset": {
Expand All @@ -73,33 +69,7 @@
"app-2":"demo-2",
"app-1":"demo-1"
},
"pod": {
"uid": "demo-pod-{{ $rangeofid }}",
"ip": "{{generate `Ip`}}",
"name": "demo-pod-{{ $rangeofid }}"
},
"namespace": "demo-{{ $rangeofid }}",
"namespace_uid": "demo-{{ $rangeofid }}",
"replicaset": {
"name": "demo-deployment-{{ $rangeofid }}"
},
"namespace_labels": {
"kubernetes_io/metadata_name": "demo-{{ $rangeofid }}"
},
"deployment": {
"name": "demo-deployment-{{ $rangeofid }}"
},
"node": {
"uid": "host-{{ $nodeid }}",
"hostname": "host-{{ $nodeid }}",
"name": "host-{{ $nodeid }}",
"labels": {
"kubernetes_io/hostname": "kubernetes-scale-123456",
"beta_kubernetes_io/os": "linux",
"kubernetes_io/arch": "amd64",
"kubernetes_io/os": "linux",
"beta_kubernetes_io/arch": "amd64"
},
"memory": {
"available": {
"bytes": {{ $memory_available_bytes }}
Expand Down Expand Up @@ -155,7 +125,7 @@
}
}
},
"start_time": "{{$timestamp.Format "2006-01-02T15:04:05.999999Z07:00"}}",
"start_time": "{{$startTime.Format "2006-01-02T15:04:05.000Z"}}",
"cpu": {
"usage": {
"core": {
Expand All @@ -178,32 +148,12 @@
"version": "8.8.0",
"snapshot": true
},
"cloud": {
"provider": "gcp",
"availability_zone": "europe-west1-d",
"instance":{
"name": "kubernetes-scale-123456" ,
"id": "de42127b-4db8-4471-824e-a7b14f478663"
},
"machine":{
"type":"e2-standard-4"
},
"service":{
"name":"GCE"
},
"project":{
"id":"elastic-obs-integrations-dev"
},
"account":{
"id":"elastic-obs-integrations-dev"
}
},
"orchestrator":{
"cluster":{
"orchestrator":{
"cluster":{
"name":"kubernetes-scale",
"url":"https://{{ generate `Ip` }}"
}
},
},
"ecs": {
"version": "8.5.0"
}
Expand Down

0 comments on commit ad2d1bb

Please sign in to comment.