반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- flow chart
- Elastic Stack
- Warnings
- ELK
- ElasticSearch
- Collectors.toMap
- es
- mkdir
- es test data
- low level client
- Draw.IO
- urllib3
- AbsDistinct
- java set
- java
- AbsDistinct java
- https warning
- collect
- ES Query
- intervals
- 카드모으기 자바
- 코딩테스트
- codility
- 5amsung
- elasticsearch java
- high level client
- mkdirs
- draw.io down
- analyze api
- AbsDistinct 풀이
Archives
- Today
- Total
5AMSUNG
[shell] 트래픽 유발자 본문
반응형
특정쿼리를 반복실행하여 elastic search node 들의 리소스 상태를 확인한다.
#!/bin/bash
cnt=0
while (("${cnt}" < 5)); do
echo "${cnt}"
nohup sh doo.sh 2>&1 >braze_"${cnt}"_$(date +%Y)-$(date +%m)-$(date +%d)_$(date +%H):$(date +%M):$(date +%S).txt &
((cnt = "${cnt}" + 1))
done
echo "END"
#!/bin/bash
cnt=0
while (("${cnt}" < 500)); do
echo "${cnt} data now : $(date +%Y)-$(date +%m)-$(date +%d) $(date +%H):$(date +%M):$(date +%S)"
curl -X GET "localhost:9200/hyper-item/_search?pretty" -u elastic:암오 -H 'Content-Type: application/json' -d'
{
"from": 0,
"size": 20,
"timeout": "60s",
"query": {
"bool": {
"filter": [
{
"range": {
"saleStartDt": {
"from": null,
"to": "now/m",
"include_lower": true,
"include_upper": true,
"boost": 1
}
}
},
{
"range": {
"saleEndDt": {
"from": "now/m",
"to": null,
"include_lower": true,
"include_upper": true,
"boost": 1
}
}
},
{
"term": {
"docDispYn": {
"value": "Y",
"boost": 1
}
}
},
{
"bool": {
"should": [
{
"terms": {
"itemStoreInfo.storeId": [
"37",
"20163"
],
"boost": 1
}
},
{
"term": {
"shipMethod": {
"value": "TD_DLV",
"boost": 1
}
}
},
{
"term": {
"storeType": {
"value": "DS",
"boost": 1
}
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
},
{
"term": {
"category.lcateCd": {
"value": 100008,
"boost": 1
}
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
},
"sort": [
{
"adultSort": {
"order": "asc"
}
},
{
"itemStoreInfo.weight": {
"order": "desc"
}
},
{
"itemStoreInfo.buyerCnt": {
"order": "desc"
}
},
{
"itemNo": {
"order": "desc"
}
}
]
}
'
((cnt = "${cnt}" + 1))
done
반응형