Elasticsearch 명령어
2025. 2. 12. 21:48ㆍk8s/EFK
indices 안에 data가 존재하는지 확인
GET metricbeat-*/_search
{
"query": {
"match": {
"event.module": "elasticsearch"
}
}
}
GET .monitoring-es*/_search
{
"size": 5,
"_source": ["elasticsearch.node.process"]
}
GET .internal.alerts-security.alerts-default-000001/_search
{
"size": 1,
"query": { "match_all": {} }
}
health check
GET /_cluster/health?pretty
사용 가능한 field 확인
GET metricbeat-*/_mapping/field/*
field 존재여부 확인
GET metricbeat-*/_search
{
"query": {
"exists": {
"field": "elasticsearch.node.process"
}
}
}
Node Process 확인
GET /_nodes/stats/process?pretty
Node system resource 사용 확인
GET _nodes/stats/jvm,process
alias check
GET _alias/logs-deprecation
GET _alias/ilm-history
missing shard 확인: UNASSIGNED, INITIALIZING 확인
GET _cat/shards/.alerts-security.alerts*?v
disk 용량 확인
GET _cluster/settings
index 존재여부 확인
GET _cat/indices/.alerts-security.alerts*?v
최종 데이터 확인
GET .monitoring-es-*/_search
{
"size": 1,
"sort": [{ "@timestamp": "desc" }],
"_source": ["elasticsearch.node.process.cpu.percent"]
}
indices 삭제
DELETE .monitoring-es-7-*
indices 재생성
POST _monitoring/bulk
# metricbeat and kibaan must restart
'k8s > EFK' 카테고리의 다른 글
Elasticsearch xpack.monitoring.collection.enabled deprecated 예정 (0) | 2025.02.12 |
---|---|
Metricbeat 상태 확인 (0) | 2025.02.12 |
Kibana api key로는 elasticsearch에 접속 안됨 (0) | 2025.02.11 |
Metricbeat Kibana의 Stack Monitroing 연동 (0) | 2025.02.09 |
Fluentd 자꾸 elasticsearch와 연결이 끊어지고, 로그가 전송안 될때 (0) | 2025.02.09 |