网站首页 文章专栏 Skywalking 分组group的方法
看官方文档有这么一句话:Service Selector provides 2 level selectors, service group list and service name list. The group name is separated from the service name if it follows <group name>::<logic name> format. Topology map is available for single group, single service, or global(include all services).
意思是说:分组是一种服务名的命名规则:<group name>::<logic name>
例如: export SKYWALKING__SERVICENAME=dev::svc-user
删除 es7 index 历史记录 3天之前(now-3d)的数据
# es 连接地址 ES_SITE="elasticsearch:9200" # 要删除的 es 多个index 包含 svc 或 ingress 的index INDEX_SOME="svc\|ingress" index_list=`curl -X GET "http://${ES_SITE}/_cat/indices"` oldifs="$IFS" IFS=$'\n' for line in $index_list do index_name=`echo $line | awk '{print $3}' | grep $INDEX_SOME || echo '' ` echo "$index_name" if [ "$index_name" == "" ]; then continue fi # 删除 curl -X POST "${ES_SITE}/${index_name}/_delete_by_query?pretty" -H 'Content-Type:application/json' -d ' { "query": { "range": { "bank_interfacelog_createTime": { "gte": "now-3d", "lte": "now", "format": "epoch_millis" } } } }' # 强制合并 curl -X POST "${ES_SITE}/${index_name}/_forcemerge?only_expunge_deletes=true&max_num_segments=1" done