skywalking es查询整理

索引介绍

sw_records-all

这个索引用于存储所有的采样记录,包括但不限于慢SQL查询、Agent分析得到的数据等。这些记录数据包括Traces、Logs、TopN采样语句和告警信息。它们被用于性能分析和故障排查,帮助开发者和运维团队理解服务的行为和性能特点。

mapping
 {
  "sw_records-all": {
    "aliases": {
      "sw_records-all": {}
    },
    "mappings": {
      "_source": {
        "excludes": [
          "tags"
        ]
      },
      "properties": {
        "alarm_message": {
          "type": "keyword",
          "copy_to": [
            "alarm_message_match"
          
        },
        "alarm_message_match": {
          "type": "text",
          "analyzer": "oap_analyzer"
        },
        "continuous_profiling_json": {
          "type": "keyword",
          "index": false
        },
        "create_time": {
          "type": "long"
        },
        "data_binary": {
          "type": "binary"
        },
        "dump_binary": {
          "type": "binary"
        },
        "dump_period": {
          "type": "integer"
        },
        "dump_time": {
          "type": "long"
        },
        "duration": {
          "type": "integer"
        },
        "end_time_nanos": {
          "type": "integer"
        },
        "end_time_second": {
          "type": "long"
        },
        "endpoint_name": {
          "type": "keyword"
        },
        "entity_id": {
          "type": "keyword"
        },
        "event": {
          "type": "keyword"
        },
        "extension_config_json": {
          "type": "keyword",
          "index": false
        },
        "fixed_trigger_duration": {
          "type": "long"
        },
        "id0": {
          "type": "keyword",
          "index": false
        },
        "id1": {
          "type": "keyword",
          "index": false
        },
        "instance_id": {
          "type": "keyword"
        },
        "last_update_time": {
          "type": "long"
        },
        "latency": {
          "type": "long"
        },
        "logical_id": {
          "type": "keyword"
        },
        "max_sampling_count": {
          "type": "integer"
        },
        "min_duration_threshold": {
          "type": "integer"
        },
        "name": {
          "type": "keyword",
          "index": false
        },
        "operation_time": {
          "type": "long"
        },
        "operation_type": {
          "type": "integer",
          "index": false
        },
        "process_labels_json": {
          "type": "keyword"
        },
        "record_table": {
          "type": "keyword"
        },
        "related_trace_id": {
          "type": "keyword"
        },
        "rule_name": {
          "type": "keyword"
        },
        "schedule_id": {
          "type": "keyword"
        },
        "scope": {
          "type": "integer"
        },
        "segment_id": {
          "type": "keyword"
        },
        "sequence": {
          "type": "integer"
        },
        "service_id": {
          "type": "keyword"
        },
        "stack_binary": {
          "type": "binary"
        },
        "stack_id": {
          "type": "keyword"
        },
        "start_time": {
          "type": "long"
        },
        "start_time_nanos": {
          "type": "integer"
        },
        "start_time_second": {
          "type": "long"
        },
        "statement": {
          "type": "keyword",
          "index": false
        },
        "tags": {
          "type": "keyword"
        },
        "tags_raw_data": {
          "type": "binary"
        },
        "target_type": {
          "type": "integer"
        },
        "task_id": {
          "type": "keyword"
        },
        "time_bucket": {
          "type": "long"
        },
        "timestamp": {
          "type": "long"
        },
        "trace_id": {
          "type": "keyword",
          "index": false
        },
        "trace_ref_type": {
          "type": "integer"
        },
        "trace_segment_id": {
          "type": "keyword"
        },
        "trace_span_id": {
          "type": "keyword"
        },
        "trigger_type": {
          "type": "integer"
        },
        "upload_time": {
          "type": "long"
        }
      }
    },
    "settings": {
      "index": {
        "routing": {
          "allocation": {
            "include": {
              "_tier_preference": "data_content"
            }
          }
        },
        "refresh_interval": "30s",
        "number_of_shards": "1",
        "provided_name": "sw_records-all-20241125",
        "creation_date": "1732464023751",
        "analysis": {
          "analyzer": {
            "oap_analyzer": {
              "type": "stop"
            }
          }
        },
        "number_of_replicas": "1",
        "uuid": "qrRVCMSNSnO90iz9hHWD0Q",
        "version": {
          "created": "7170799"
        }
      }
    }
  }
}

sw_metrics-all

 这个索引存储服务、服务实例及端点的元数据,即指标信息。这些指标数据包括服务的响应时间、吞吐量、错误率等关键性能指标,以分钟级别存储。这些数据对于监控服务性能至关重要,因为它们提供了实时的性能反馈,使得团队能够快速识别和解决性能问题。

metric_table枚举值

1、endpoint_cpm:端点的每分钟调用次数(CPM)

2、endpoint_percentile:端点的响应时间百分位数

3、endpoint_resp_time:端点的平均响应时间

4、endpoint_sla:服务等级协议(SLA)指标

5、endpoint_sidecar_internal_req_latency_nanos 和 endpoint_sidecar_internal_resp_latency_nanos:端点Sidecar内部请求和响应延迟的纳秒数

6、instance_jvm_xxx:服务实例的JVM相关指标,如类加载数量、CPU使用率、内存使用情况、垃圾回收次数和线程状态等

7、meter_thread_pool:线程池相关的度量

8、service_instance_cpm、service_instance_resp_time、service_instance_sla:服务实例级别的CPM、响应时间和SLA指标

9、service_instance_sidecar_internal_req_latency_nanos 和 service_instance_sidecar_internal_resp_latency_nanos:服务实例级别的Sidecar内部请求和响应延迟的纳秒数

result

{
          "key": "endpoint_cpm",
          "doc_count": 5763
        },
        {
          "key": "endpoint_percentile",
          "doc_count": 5763
        },
        {
          "key": "endpoint_resp_time",
          "doc_count": 5763
        },
        {
          "key": "endpoint_sla",
          "doc_count": 5763
        },
        {
          "key": "endpoint_sidecar_internal_req_latency_nanos",
          "doc_count": 5754
        },
        {
          "key": "endpoint_sidecar_internal_resp_latency_nanos",
          "doc_count": 5754
        },
        {
          "key": "instance_jvm_class_loaded_class_count",
          "doc_count": 2811
        },
        {
          "key": "instance_jvm_class_total_loaded_class_count",
          "doc_count": 2811
        },
        {
          "key": "instance_jvm_class_total_unloaded_class_count",
          "doc_count": 2811
        },
        {
          "key": "instance_jvm_cpu",
          "doc_count": 2811
        },
        {
          "key": "instance_jvm_memory_heap",
          "doc_count": 2811
        },
        {
          "key": "instance_jvm_memory_heap_max",
          "doc_count": 2811
        },
        {
          "key": "instance_jvm_memory_noheap",
          "doc_count": 2811
        },
        {
          "key": "instance_jvm_memory_noheap_max",
          "doc_count": 2811
        },
        {
          "key": "instance_jvm_old_gc_count",
          "doc_count": 2811
        },
        {
          "key": "instance_jvm_old_gc_time",
          "doc_count": 2811
        },
        {
          "key": "instance_jvm_thread_blocked_state_thread_count",
          "doc_count": 2811
        },
        {
          "key": "instance_jvm_thread_daemon_count",
          "doc_count": 2811
        },
        {
          "key": "instance_jvm_thread_live_count",
          "doc_count": 2811
        },
        {
          "key": "instance_jvm_thread_peak_count",
          "doc_count": 2811
        },
        {
          "key": "instance_jvm_thread_runnable_state_thread_count",
          "doc_count": 2811
        },
        {
          "key": "instance_jvm_thread_timed_waiting_state_thread_count",
          "doc_count": 2811
        },
        {
          "key": "instance_jvm_thread_waiting_state_thread_count",
          "doc_count": 2811
        },
        {
          "key": "instance_jvm_young_gc_count",
          "doc_count": 2811
        },
        {
          "key": "instance_jvm_young_gc_time",
          "doc_count": 2811
        },
        {
          "key": "meter_thread_pool",
          "doc_count": 2811
        },
        {
          "key": "service_instance_cpm",
          "doc_count": 1661
        },
        {
          "key": "service_instance_resp_time",
          "doc_count": 1661
        },
        {
          "key": "service_instance_sla",
          "doc_count": 1661
        },
        {
          "key": "service_instance_sidecar_internal_req_latency_nanos",
          "doc_count": 1659
        },
        {
          "key": "service_instance_sidecar_internal_resp_latency_nanos",
          "doc_count": 1659
        }

mapping
{
  "sw_metrics-all-20241125": {
    "aliases": {
      "sw_metrics-all": {}
    },
    "mappings": {
      "properties": {
        "address": {
          "type": "keyword"
        },
        "agent_id": {
          "type": "keyword"
        },
        "component_id": {
          "type": "integer",
          "index": false
        },
        "component_ids": {
          "type": "keyword",
          "index": false
        },
        "count": {
          "type": "long",
          "index": false
        },
        "dataset": {
          "type": "text",
          "index": false
        },
        "datatable_count": {
          "type": "text",
          "index": false
        },
        "datatable_summation": {
          "type": "text",
          "index": false
        },
        "datatable_value": {
          "type": "text",
          "index": false
        },
        "denominator": {
          "type": "long"
        },
        "dest_endpoint": {
          "type": "keyword"
        },
        "dest_process_id": {
          "type": "keyword"
        },
        "dest_service_id": {
          "type": "keyword"
        },
        "dest_service_instance_id": {
          "type": "keyword"
        },
        "detect_type": {
          "type": "integer"
        },
        "double_summation": {
          "type": "double",
          "index": false
        },
        "double_value": {
          "type": "double"
        },
        "ebpf_profiling_schedule_id": {
          "type": "keyword"
        },
        "end_time": {
          "type": "long"
        },
        "endpoint": {
          "type": "keyword"
        },
        "endpoint_traffic_name": {
          "type": "keyword",
          "copy_to": [
            "endpoint_traffic_name_match"
          ]
        },
        "endpoint_traffic_name_match": {
          "type": "text",
          "analyzer": "oap_analyzer"
        },
        "entity_id": {
          "type": "keyword"
        },
        "instance_id": {
          "type": "keyword"
        },
        "instance_traffic_name": {
          "type": "keyword",
          "index": false
        },
        "int_value": {
          "type": "integer"
        },
        "label": {
          "type": "keyword"
        },
        "labels_json": {
          "type": "keyword",
          "index": false
        },
        "last_ping": {
          "type": "long"
        },
        "last_update_time_bucket": {
          "type": "long"
        },
        "layer": {
          "type": "integer"
        },
        "match": {
          "type": "long",
          "index": false
        },
        "message": {
          "type": "keyword"
        },
        "metric_table": {
          "type": "keyword"
        },
        "name": {
          "type": "keyword"
        },
        "numerator": {
          "type": "long"
        },
        "parameters": {
          "type": "keyword",
          "index": false
        },
        "percentage": {
          "type": "integer"
        },
        "precision": {
          "type": "integer",
          "index": false
        },
        "process_id": {
          "type": "
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Jet-W

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值