k8s(190)
-
metricbeat을 모니터링 정보로 사용하도록 설정
metricbeat.yml: | .. metricbeat.modules: # Monitor Elasticsearch - module: elasticsearch xpack.enabled: true period: 10s hosts: ["http://elastic-headless.elastic.svc.cluster.local:9200"] api_key: {id}:{passwd} # Monitor Kibana - module: kibana xpack.enabled: true period: 10s hosts: ["http://kibana.elastic.svc.cluster.local..
2025.03.02 -
metricbeat "message":"DNS lookup failure \"kibana\": lookup kibana on 10.96.0.10:53: no such host"
metricbeat.yml: | .. metricbeat.modules: - module: kibana xpack.enabled: true period: 10s hosts: ["http://kibana:5601"] api_key: {id}:{passwd} ..hosts정보가 잘못되었음service의 도메인 정보를 잘 기술하면 됨
2025.03.02 -
kibana에 metricbeat dashboard 업로드
metricbeat pod에 접속sudo metricbeat setup --dashboards에러 및 조치# 에러Loading dashboards (Kibana must be running and reachable)Exiting: error connecting to Kibana: fail to get the Kibana version: HTTP GET request to http://localhost:5601/api/status fails: fail to execute the HTTP GET request: Get "http://localhost:5601/api/status": dial tcp 127.0.0.1:5601: connect: connection refused (status=0). Respon..
2025.03.02 -
metricbeat용 api_key 생성
command 이용curl -u "{계정}:{비밀번호}" -X POST "http://localhost:9200/_security/api_key" -H "Content-Type: application/json" -d '{ "name": "metricbeat_key", "role_descriptors": { "metricbeat_role": { "cluster": ["monitor"], "index": [ { "names": ["metricbeat-*"], "privileges": ["read", "write", "create_index"] } ] } }}'kibana 이용# Stack Management ..
2025.03.02 -
metricbeat 설치
ConfigMapapiVersion: v1kind: ConfigMapmetadata: name: metricbeat-config namespace: kube-system labels: k8s-app: metricbeatdata: metricbeat.yml: | metricbeat.config.modules: path: ${path.config}/modules.d/*.yml reload.enabled: false setup.template.settings: # 10G 보다 용량이 작으면 1 index.number_of_shards: 1 index.codec: best_compression # dashboard 업로드를 위해서 필요 s..
2025.03.02 -
elasticsearch self monitoring 여부 확인
셋팅 확인enabled:true이면 자체 모니터링 사용중curl -X GET "http://localhost:9200/_cluster/settings?include_defaults=true&pretty"# 결과 "xpack": { "monitoring": { "collection": { "enabled": "true" } }indices 확인.monitoring-*에 해당하는 indices가 있으면 자체 모니터링 사용중curl -X GET "http://localhost:9200/_cat/indices/.monitoring-*?v"# 결과green open .monitoring-es-7-2025.03.01 ...metricbeat 작동 ..
2025.03.02