Skip to content

Instantly share code, notes, and snippets.

@phlegx
Created November 30, 2020 17:06
Show Gist options
  • Save phlegx/e58b000ff9becff279af1033eea98a8c to your computer and use it in GitHub Desktop.
Save phlegx/e58b000ff9becff279af1033eea98a8c to your computer and use it in GitHub Desktop.
curl -u elastic:xxxx localhost:9200/jt-metricbeat-staging-000003/_mapping | jq
{
"jt-metricbeat-staging-000003": {
"mappings": {
"properties": {
"@timestamp": {
"type": "date"
},
"@version": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"agent": {
"properties": {
"ephemeral_id": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"hostname": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"id": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"type": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"version": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
},
"container": {
"properties": {
"id": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"runtime": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
},
"ecs": {
"properties": {
"version": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
},
"event": {
"properties": {
"dataset": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"duration": {
"type": "long"
},
"module": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
},
"host": {
"properties": {
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
},
"kubernetes": {
"properties": {
"container": {
"properties": {
"cpu": {
"properties": {
"limit": {
"properties": {
"cores": {
"type": "long"
}
}
},
"request": {
"properties": {
"cores": {
"type": "float"
}
}
},
"usage": {
"properties": {
"core": {
"properties": {
"ns": {
"type": "long"
}
}
},
"limit": {
"properties": {
"pct": {
"type": "float"
}
}
},
"nanocores": {
"type": "long"
},
"node": {
"properties": {
"pct": {
"type": "float"
}
}
}
}
}
}
},
"id": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"image": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"logs": {
"properties": {
"available": {
"properties": {
"bytes": {
"type": "long"
}
}
},
"capacity": {
"properties": {
"bytes": {
"type": "long"
}
}
},
"inodes": {
"properties": {
"count": {
"type": "long"
},
"free": {
"type": "long"
},
"used": {
"type": "long"
}
}
},
"used": {
"properties": {
"bytes": {
"type": "long"
}
}
}
}
},
"memory": {
"properties": {
"available": {
"properties": {
"bytes": {
"type": "long"
}
}
},
"limit": {
"properties": {
"bytes": {
"type": "float"
}
}
},
"majorpagefaults": {
"type": "long"
},
"pagefaults": {
"type": "long"
},
"request": {
"properties": {
"bytes": {
"type": "float"
}
}
},
"rss": {
"properties": {
"bytes": {
"type": "long"
}
}
},
"usage": {
"properties": {
"bytes": {
"type": "long"
},
"limit": {
"properties": {
"pct": {
"type": "float"
}
}
},
"node": {
"properties": {
"pct": {
"type": "float"
}
}
}
}
},
"workingset": {
"properties": {
"bytes": {
"type": "long"
}
}
}
}
},
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"rootfs": {
"properties": {
"available": {
"properties": {
"bytes": {
"type": "long"
}
}
},
"capacity": {
"properties": {
"bytes": {
"type": "long"
}
}
},
"inodes": {
"properties": {
"used": {
"type": "long"
}
}
},
"used": {
"properties": {
"bytes": {
"type": "long"
}
}
}
}
},
"start_time": {
"type": "date"
},
"status": {
"properties": {
"phase": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"ready": {
"type": "boolean"
},
"reason": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"restarts": {
"type": "long"
}
}
}
}
},
"deployment": {
"properties": {
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"paused": {
"type": "boolean"
},
"replicas": {
"properties": {
"available": {
"type": "long"
},
"desired": {
"type": "long"
},
"unavailable": {
"type": "long"
},
"updated": {
"type": "long"
}
}
}
}
},
"labels": {
"properties": {
"app": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"app_kubernetes_io/component": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"app_kubernetes_io/instance": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"app_kubernetes_io/managed-by": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"app_kubernetes_io/name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"app_kubernetes_io/version": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"app_kubernetes_io_instance": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"app_kubernetes_io_managed_by": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"app_kubernetes_io_name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"app_kubernetes_io_version": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"beta_kubernetes_io/arch": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"beta_kubernetes_io/os": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"chart": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"component": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"controller-revision-hash": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"controller-uid": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"deploy/dbs": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"deploy/kong-databases": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"deploy/kong-proxy": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"deploy/services": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"enable_metrics": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"helm_sh/chart": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"helm_sh_chart": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"heritage": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"job-name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"k8s-app": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"k8s_app": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"kubernetes_io/arch": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"kubernetes_io/hostname": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"kubernetes_io/name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"kubernetes_io/os": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"kubernetes_io_cluster_service": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"kubernetes_io_name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"node": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"node-role_kubernetes_io/controlplane": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"node-role_kubernetes_io/etcd": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"node-role_kubernetes_io/worker": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"pod-template-generation": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"pod-template-hash": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"provider": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"release": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"role": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"role/controlplane": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"role/etcd": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"role/worker": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"statefulset_kubernetes_io/pod-name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"stolon-cluster": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
},
"namespace": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"node": {
"properties": {
"cpu": {
"properties": {
"allocatable": {
"properties": {
"cores": {
"type": "long"
}
}
},
"capacity": {
"properties": {
"cores": {
"type": "long"
}
}
},
"usage": {
"properties": {
"core": {
"properties": {
"ns": {
"type": "long"
}
}
},
"nanocores": {
"type": "long"
}
}
}
}
},
"fs": {
"properties": {
"available": {
"properties": {
"bytes": {
"type": "long"
}
}
},
"capacity": {
"properties": {
"bytes": {
"type": "long"
}
}
},
"inodes": {
"properties": {
"count": {
"type": "long"
},
"free": {
"type": "long"
},
"used": {
"type": "long"
}
}
},
"used": {
"properties": {
"bytes": {
"type": "long"
}
}
}
}
},
"memory": {
"properties": {
"allocatable": {
"properties": {
"bytes": {
"type": "float"
}
}
},
"available": {
"properties": {
"bytes": {
"type": "long"
}
}
},
"capacity": {
"properties": {
"bytes": {
"type": "float"
}
}
},
"majorpagefaults": {
"type": "long"
},
"pagefaults": {
"type": "long"
},
"rss": {
"properties": {
"bytes": {
"type": "long"
}
}
},
"usage": {
"properties": {
"bytes": {
"type": "long"
}
}
},
"workingset": {
"properties": {
"bytes": {
"type": "long"
}
}
}
}
},
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"network": {
"properties": {
"rx": {
"properties": {
"bytes": {
"type": "long"
},
"errors": {
"type": "long"
}
}
},
"tx": {
"properties": {
"bytes": {
"type": "long"
},
"errors": {
"type": "long"
}
}
}
}
},
"pod": {
"properties": {
"allocatable": {
"properties": {
"total": {
"type": "long"
}
}
},
"capacity": {
"properties": {
"total": {
"type": "long"
}
}
}
}
},
"runtime": {
"properties": {
"imagefs": {
"properties": {
"available": {
"properties": {
"bytes": {
"type": "long"
}
}
},
"capacity": {
"properties": {
"bytes": {
"type": "long"
}
}
},
"used": {
"properties": {
"bytes": {
"type": "long"
}
}
}
}
}
}
},
"start_time": {
"type": "date"
},
"status": {
"properties": {
"ready": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"unschedulable": {
"type": "boolean"
}
}
}
}
},
"persistentvolume": {
"properties": {
"capacity": {
"properties": {
"bytes": {
"type": "float"
}
}
},
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"phase": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"storage_class": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
},
"persistentvolumeclaim": {
"properties": {
"access_mode": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"phase": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"request_storage": {
"properties": {
"bytes": {
"type": "float"
}
}
},
"storage_class": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"volume_name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
},
"pod": {
"properties": {
"cpu": {
"properties": {
"usage": {
"properties": {
"limit": {
"properties": {
"pct": {
"type": "float"
}
}
},
"nanocores": {
"type": "long"
},
"node": {
"properties": {
"pct": {
"type": "float"
}
}
}
}
}
}
},
"host_ip": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"ip": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"memory": {
"properties": {
"available": {
"properties": {
"bytes": {
"type": "long"
}
}
},
"major_page_faults": {
"type": "long"
},
"page_faults": {
"type": "long"
},
"rss": {
"properties": {
"bytes": {
"type": "long"
}
}
},
"usage": {
"properties": {
"bytes": {
"type": "long"
},
"limit": {
"properties": {
"pct": {
"type": "float"
}
}
},
"node": {
"properties": {
"pct": {
"type": "float"
}
}
}
}
},
"working_set": {
"properties": {
"bytes": {
"type": "long"
}
}
}
}
},
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"network": {
"properties": {
"rx": {
"properties": {
"bytes": {
"type": "long"
},
"errors": {
"type": "long"
}
}
},
"tx": {
"properties": {
"bytes": {
"type": "long"
},
"errors": {
"type": "long"
}
}
}
}
},
"start_time": {
"type": "date"
},
"status": {
"properties": {
"phase": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"ready": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"scheduled": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
},
"uid": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
},
"replicaset": {
"properties": {
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"replicas": {
"properties": {
"available": {
"type": "long"
},
"desired": {
"type": "long"
},
"labeled": {
"type": "long"
},
"observed": {
"type": "long"
},
"ready": {
"type": "long"
}
}
}
}
},
"service": {
"properties": {
"cluster_ip": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"created": {
"type": "date"
},
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"type": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
},
"statefulset": {
"properties": {
"created": {
"type": "float"
},
"generation": {
"properties": {
"desired": {
"type": "long"
},
"observed": {
"type": "long"
}
}
},
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"replicas": {
"properties": {
"desired": {
"type": "long"
},
"observed": {
"type": "long"
}
}
}
}
},
"storageclass": {
"properties": {
"created": {
"type": "date"
},
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"provisioner": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"reclaim_policy": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"volume_binding_mode": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
},
"system": {
"properties": {
"container": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"cpu": {
"properties": {
"usage": {
"properties": {
"core": {
"properties": {
"ns": {
"type": "long"
}
}
},
"nanocores": {
"type": "long"
}
}
}
}
},
"memory": {
"properties": {
"majorpagefaults": {
"type": "long"
},
"pagefaults": {
"type": "long"
},
"rss": {
"properties": {
"bytes": {
"type": "long"
}
}
},
"usage": {
"properties": {
"bytes": {
"type": "long"
}
}
},
"workingset": {
"properties": {
"bytes": {
"type": "long"
}
}
}
}
},
"start_time": {
"type": "date"
}
}
},
"volume": {
"properties": {
"fs": {
"properties": {
"available": {
"properties": {
"bytes": {
"type": "long"
}
}
},
"capacity": {
"properties": {
"bytes": {
"type": "long"
}
}
},
"inodes": {
"properties": {
"count": {
"type": "long"
},
"free": {
"type": "long"
},
"used": {
"type": "long"
}
}
},
"used": {
"properties": {
"bytes": {
"type": "long"
}
}
}
}
},
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
},
"metricset": {
"properties": {
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"period": {
"type": "long"
}
}
},
"service": {
"properties": {
"address": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"type": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
},
"tags": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment