I have single node elasticsearch deployed on master node of k8s cluster and it's accessible using nodePort:30339
curl http://xx.xx.xx.xx:30339
{
"name" : "elasticsearch-0",
"cluster_name" : "docker-cluster",
"cluster_uuid" : "z06Zn4p-T3CzUk6hoSiDLg",
"version" : {
"number" : "7.10.0",
"build_flavor" : "default",
"build_type" : "docker",
"build_hash" : "51e9d6f22758d0374a0f3f5c6e8f3a7997850f96",
"build_date" : "2020-11-09T21:30:33.964949Z",
"build_snapshot" : false,
"lucene_version" : "8.7.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
I have 3 node k8s cluster and deployed filebeat:7.10.0 as daemonset on all nodes including master. It's deployed in discoverable mode and working properly and picked the available container logs. But the logs available in filebeat is not available in elasticsearch and no indexes showing in Kibana.
kubectl -n elasticsearch logs filebeat-lb6wz
2021-02-03T12:24:24.896Z INFO instance/beat.go:645 Home path: [/usr/share/filebeat] Config path: [/usr/share/filebeat] Data path: [/usr/share/filebeat/data] Logs path: [/usr/share/filebeat/logs]
2021-02-03T12:24:24.897Z INFO instance/beat.go:653 Beat ID: 14811f9a-2e7b-4fdf-a007-a873a5fa56c8
2021-02-03T12:24:24.901Z INFO [seccomp] seccomp/seccomp.go:124 Syscall filter successfully installed
2021-02-03T12:24:24.901Z INFO [beat] instance/beat.go:981 Beat info {"system_info": {"beat": {"path": {"config": "/usr/share/filebeat", "data": "/usr/share/filebeat/data", "home": "/usr/share/filebeat", "logs": "/usr/share/filebeat/logs"}, "type": "filebeat", "uuid": "14811f9a-2e7b-4fdf-a007-a873a5fa56c8"}}}
2021-02-03T12:24:24.901Z INFO [beat] instance/beat.go:990 Build info {"system_info": {"build": {"commit": "1428d58cf2ed945441fb2ed03961cafa9e4ad3eb", "libbeat": "7.10.0", "time": "2020-11-09T19:57:04.000Z", "version": "7.10.0"}}}
2021-02-03T12:24:24.901Z INFO [beat] instance/beat.go:993 Go runtime info {"system_info": {"go": {"os":"linux","arch":"amd64","max_procs":2,"version":"go1.14.7"}}}
2021-02-03T12:24:24.904Z INFO [beat] instance/beat.go:997 Host info {"system_info": {"host": {"architecture":"x86_64","boot_time":"2020-07-16T11:30:33Z","containerized":true,"name":"dcpprsapp013","ip":["127.0.0.1/8","::1/128","10.77.xx.xx/24","fe80::250:56ff:fe8e:703d/64","172.17.0.1/16","fe80::42:eaff:fef2:af94/64","192.168.115.64/32","fe80::cc00:6bff:febf:4280/64","fe80::18d2:66ff:fedd:d8ae/64","fe80::44ee:bdff:fea9:f926/64","fe80::204e:95ff:fe31:bc08/64","fe80::e8a8:ebff:fe88:bc97/64"],"kernel_version":"3.10.0-1062.1.2.el7.x86_64","mac":["00:50:56:8e:70:3d","02:42:ea:f2:af:94","ce:00:6b:bf:42:80","1a:d2:66:dd:d8:ae","46:ee:bd:a9:f9:26","22:4e:95:31:bc:08","ea:a8:eb:88:bc:97"],"os":{"family":"redhat","platform":"centos","name":"CentOS Linux","version":"7 (Core)","major":7,"minor":8,"patch":2003,"codename":"Core"},"timezone":"UTC","timezone_offset_sec":0}}}
2021-02-03T12:24:24.904Z INFO [beat] instance/beat.go:1026 Process info {"system_info": {"process": {"capabilities": {"inheritable":["chown","dac_override","fowner","fsetid","kill","setgid","setuid","setpcap","net_bind_service","net_raw","sys_chroot","mknod","audit_write","setfcap"],"permitted":["chown","dac_override","fowner","fsetid","kill","setgid","setuid","setpcap","net_bind_service","net_raw","sys_chroot","mknod","audit_write","setfcap"],"effective":["chown","dac_override","fowner","fsetid","kill","setgid","setuid","setpcap","net_bind_service","net_raw","sys_chroot","mknod","audit_write","setfcap"],"bounding":["chown","dac_override","fowner","fsetid","kill","setgid","setuid","setpcap","net_bind_service","net_raw","sys_chroot","mknod","audit_write","setfcap"],"ambient":null}, "cwd": "/usr/share/filebeat", "exe": "/usr/share/filebeat/filebeat", "name": "filebeat", "pid": 1, "ppid": 0, "seccomp": {"mode":"filter","no_new_privs":true}, "start_time": "2021-02-03T12:24:24.350Z"}}}
2021-02-03T12:24:24.904Z INFO instance/beat.go:299 Setup Beat: filebeat; Version: 7.10.0
2021-02-03T12:24:24.904Z INFO [index-management] idxmgmt/std.go:184 Set output.elasticsearch.index to 'filebeat-7.10.0' as ILM is enabled.
2021-02-03T12:24:24.905Z INFO eslegclient/connection.go:99 elasticsearch url: http://10.77.xx.xx:30339
2021-02-03T12:24:24.905Z INFO [publisher] pipeline/module.go:113 Beat name: dcpprsapp013
2021-02-03T12:24:24.907Z INFO instance/beat.go:455 filebeat start running.
2021-02-03T12:24:24.909Z INFO [monitoring] log/log.go:118 Starting metrics logging every 30s
2021-02-03T12:24:24.909Z INFO memlog/store.go:119 Loading data file of '/usr/share/filebeat/data/registry/filebeat' succeeded. Active transaction id=0
2021-02-03T12:24:24.909Z INFO memlog/store.go:124 Finished loading transaction log file for '/usr/share/filebeat/data/registry/filebeat'. Active transaction id=0
2021-02-03T12:24:24.909Z INFO [registrar] registrar/registrar.go:109 States Loaded from registrar: 0
2021-02-03T12:24:24.909Z INFO [crawler] beater/crawler.go:71 Loading Inputs: 0
2021-02-03T12:24:24.909Z INFO [crawler] beater/crawler.go:108 Loading and starting Inputs completed. Enabled inputs: 0
2021-02-03T12:24:24.911Z INFO [autodiscover.pod] kubernetes/util.go:99 kubernetes: Using node dcpprsapp013 provided in the config
2021-02-03T12:24:24.911Z INFO [autodiscover] autodiscover/autodiscover.go:113 Starting autodiscover manager
2021-02-03T12:24:25.012Z INFO log/input.go:157 Configured paths: [/var/log/containers/*9fb4dda333de69326037dc367b11232adec85938501c4b39a168f7677443ff40.log]
2021-02-03T12:24:25.012Z INFO log/input.go:157 Configured paths: [/var/log/containers/*9fb4dda333de69326037dc367b11232adec85938501c4b39a168f7677443ff40.log]
2021-02-03T12:24:25.012Z INFO log/input.go:157 Configured paths: [/var/log/containers/*a91e8afe3ca4085e62bd0b432a3ac2039b6ecc987d086371a5db956396226f51.log]
2021-02-03T12:24:25.013Z INFO log/input.go:157 Configured paths: [/var/log/containers/*a91e8afe3ca4085e62bd0b432a3ac2039b6ecc987d086371a5db956396226f51.log]
2021-02-03T12:24:25.013Z INFO log/input.go:157 Configured paths: [/var/log/containers/*9cdac53e2dcd99614b2c1b140f001d52a1d8fbe091ee4e76913b53fe5a746b75.log]
2021-02-03T12:24:25.013Z INFO log/input.go:157 Configured paths: [/var/log/containers/*9cdac53e2dcd99614b2c1b140f001d52a1d8fbe091ee4e76913b53fe5a746b75.log]
2021-02-03T12:24:25.013Z INFO log/input.go:157 Configured paths: [/var/log/containers/*96d7da17978f85a774bbbf1e20d360b105c287707d5e05a159bb3e95999d324a.log]
2021-02-03T12:24:25.014Z INFO log/input.go:157 Configured paths: [/var/log/containers/*96d7da17978f85a774bbbf1e20d360b105c287707d5e05a159bb3e95999d324a.log]
2021-02-03T12:24:25.014Z INFO log/input.go:157 Configured paths: [/var/log/containers/*2b51e8f4cd9d963ef9d8761275dc2d656b3fd730b0075148ba06fb6c79ed913a.log]
2021-02-03T12:24:25.014Z INFO log/input.go:157 Configured paths: [/var/log/containers/*2b51e8f4cd9d963ef9d8761275dc2d656b3fd730b0075148ba06fb6c79ed913a.log]
2021-02-03T12:24:25.014Z INFO log/input.go:157 Configured paths: [/var/log/containers/*39501043955e8979f76252c7fdf86a610842a8295f49e71499abe0ea6cb39812.log]
2021-02-03T12:24:25.015Z INFO log/input.go:157 Configured paths: [/var/log/containers/*39501043955e8979f76252c7fdf86a610842a8295f49e71499abe0ea6cb39812.log]
2021-02-03T12:24:25.015Z INFO log/input.go:157 Configured paths: [/var/log/containers/*118e8c8674db6b555d81a87ee1306925bc4e60dd60ac2b2320dba2d34b777e15.log]
2021-02-03T12:24:25.015Z INFO log/input.go:157 Configured paths: [/var/log/containers/*118e8c8674db6b555d81a87ee1306925bc4e60dd60ac2b2320dba2d34b777e15.log]
2021-02-03T12:24:25.215Z INFO log/input.go:157 Configured paths: [/var/log/containers/*09083c52807b7457e116845f4a9709626f9ad496bd0113269b21d4d4da3fa026.log]
2021-02-03T12:24:25.216Z INFO log/input.go:157 Configured paths: [/var/log/containers/*09083c52807b7457e116845f4a9709626f9ad496bd0113269b21d4d4da3fa026.log]
2021-02-03T12:24:27.898Z INFO [add_cloud_metadata] add_cloud_metadata/add_cloud_metadata.go:89 add_cloud_metadata: hosting provider type not detected.
2021-02-03T12:24:54.912Z INFO [monitoring] log/log.go:145 Non-zero metrics in the last 30s {"monitoring": {"metrics": {"beat":{"cgroup":{"cpu":{"id":"docker-09083c52807b7457e116845f4a9709626f9ad496bd0113269b21d4d4da3fa026.scope"},"cpuacct":{"id":"docker-09083c52807b7457e116845f4a9709626f9ad496bd0113269b21d4d4da3fa026.scope"},"memory":{"id":"docker-09083c52807b7457e116845f4a9709626f9ad496bd0113269b21d4d4da3fa026.scope"}},"cpu":{"system":{"ticks":50,"time":{"ms":52}},"total":{"ticks":150,"time":{"ms":160},"value":150},"user":{"ticks":100,"time":{"ms":108}}},"handles":{"limit":{"hard":1048576,"soft":1048576},"open":10},"info":{"ephemeral_id":"a8e8c14d-b062-4d4c-9d31-6025d39af801","uptime":{"ms":30087}},"memstats":{"gc_next":19111904,"memory_alloc":14552312,"memory_total":49846672,"rss":47910912},"runtime":{"goroutines":101}},"filebeat":{"harvester":{"open_files":0,"running":0}},"libbeat":{"config":{"module":{"running":8,"starts":8}},"output":{"type":"elasticsearch"},"pipeline":{"clients":8,"events":{"active":0}}},"registrar":{"states":{"current":0}},"system":{"cpu":{"cores":2},"load":{"1":0.1,"15":0.34,"5":0.26,"norm":{"1":0.05,"15":0.17,"5":0.13}}}}}}
I have deployed filebeat using https://raw.githubusercontent.com/elastic/beats/7.10/deploy/kubernetes/filebeat-kubernetes.yaml
And here only image version changed to 7.10.0 and elasticsearch host & port info changed as follow -
output.elasticsearch:
hosts: ["http://10.77.XX.XX:30339"]
#hosts: ['${ELASTICSEARCH_HOST:elasticsearch}:${ELASTICSEARCH_PORT:9200}']
username: ${ELASTICSEARCH_USERNAME}
password: ${ELASTICSEARCH_PASSWORD}
env:
- name: ELASTICSEARCH_HOST
value: "10.77.xx.xx"
#value: elasticsearch
- name: ELASTICSEARCH_PORT
value: "30339"
#value: "9200"
- name: ELASTICSEARCH_USERNAME
value: elastic
- name: ELASTICSEARCH_PASSWORD
value: changeme
It's also observed that deployed apps log info not reflected in filebeat pod log, only metric info showing. I am able to curl elasticsearch from filebeat container.
curl http://xx.xx.xx.xx:30339
{
"name" : "elasticsearch-0",
"cluster_name" : "docker-cluster",
"cluster_uuid" : "z06Zn4p-T3CzUk6hoSiDLg",
"version" : {
"number" : "7.10.0",
"build_flavor" : "default",
"build_type" : "docker",
"build_hash" : "51e9d6f22758d0374a0f3f5c6e8f3a7997850f96",
"build_date" : "2020-11-09T21:30:33.964949Z",
"build_snapshot" : false,
"lucene_version" : "8.7.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
Please help me to identify the issue.