无论才能、知识多么卓著,如果缺乏热情,则无异纸上画饼充饥,无补于事。

Metricbeat apache的问题

Beats | 作者 sailershen | 发布于2019年09月16日 | 阅读数:2999

ELK是7.2.1版本,通过docker方式启动,一切正常。
在一台apache服务器上安装metricbeat,/etc/metricbeat/metricbeat.yml文件的内容:
metricbeat.config.modules:
path: ${path.config}/modules.d/*.yml
reload.enabled: false
setup.template.settings:
index.number_of_shards: 1
index.codec: best_compression
setup.dashboards.enabled: true
setup.kibana:
host: "192.168.4.10:5601"
output.elasticsearch:
hosts: ["192.168.4.10:9200"]
protocol: "http"
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~

/etc/metricbeat/modules.d/apache.yml的内容:
- module: apache
metricsets:
- status
period: 60s
hosts: ["http://127.0.0.1:40081"]
#username: "user"
#password: "secret"

127.0.0.1:40081端口已处于监听状态。
 
执行metricbeat setup --dashboards命令以后,/var/log/metricbeat/metricbeat文件的内容:
2019-09-16T19:05:26.009+0800    INFO    instance/beat.go:606    Home path: [/usr/share/metricbeat] Config path: [/etc/metricbeat] Data path: [/var/lib/metricbeat] Logs path: [/var/log/metricbeat]
2019-09-16T19:05:26.083+0800 INFO instance/beat.go:614 Beat ID: a56ef1d2-544a-490c-b5a1-8c0939b3420d
2019-09-16T19:05:26.086+0800 INFO [beat] instance/beat.go:902 Beat info {"system_info": {"beat": {"path": {"config": "/etc/metricbeat", "data": "/var/lib/metricbeat", "home": "/usr/share/metricbeat", "logs": "/var/log/metricbeat"}, "type": "metricbeat", "uuid": "a56ef1d2-544a-490c-b5a1-8c0939b3420d"}}}
2019-09-16T19:05:26.086+0800 INFO [beat] instance/beat.go:911 Build info {"system_info": {"build": {"commit": "9ba65d864ca37cd32c25b980dbb4020975288fc0", "libbeat": "7.2.0", "time": "2019-06-20T15:07:31.000Z", "version": "7.2.0"}}}
2019-09-16T19:05:26.086+0800 INFO [beat] instance/beat.go:914 Go runtime info {"system_info": {"go": {"os":"linux","arch":"amd64","max_procs":16,"version":"go1.12.4"}}}
2019-09-16T19:05:26.089+0800 INFO [beat] instance/beat.go:918 Host info {"system_info": {"host": {"architecture":"x86_64","boot_time":"2019-08-25T12:14:48+08:00","containerized":false,"name":"br-sh-conf-1","ip":["127.0.0.1/8","::1/128","192.168.100.7/24","fe80::6e92:bfff:fe6e:1a44/64","192.168.4.7/24","fe80::6e92:bfff:fe6e:1a46/64","172.17.0.1/16"],"kernel_version":"3.10.0-327.el7.x86_64","mac":["6c:92:bf:6e:1a:44","6c:92:bf:6e:1a:44","6c:92:bf:6e:1a:46","6c:92:bf:6e:1a:46","6c:92:bf:6e:1a:44","6c:92:bf:6e:1a:46","02:42:09:bb:29:91"],"os":{"family":"redhat","platform":"centos","name":"CentOS Linux","version":"7 (Core)","major":7,"minor":2,"patch":1511,"codename":"Core"},"timezone":"CST","timezone_offset_sec":28800,"id":"a7517b58fad846fe931d3d147a2cadbe"}}}
2019-09-16T19:05:26.090+0800 INFO [beat] instance/beat.go:947 Process info {"system_info": {"process": {"capabilities": {"inheritable":null,"permitted":["chown","dac_override","dac_read_search","fowner","fsetid","kill","setgid","setuid","setpcap","linux_immutable","net_bind_service","net_broadcast","net_admin","net_raw","ipc_lock","ipc_owner","sys_module","sys_rawio","sys_chroot","sys_ptrace","sys_pacct","sys_admin","sys_boot","sys_nice","sys_resource","sys_time","sys_tty_config","mknod","lease","audit_write","audit_control","setfcap","mac_override","mac_admin","syslog","wake_alarm","block_suspend"],"effective":["chown","dac_override","dac_read_search","fowner","fsetid","kill","setgid","setuid","setpcap","linux_immutable","net_bind_service","net_broadcast","net_admin","net_raw","ipc_lock","ipc_owner","sys_module","sys_rawio","sys_chroot","sys_ptrace","sys_pacct","sys_admin","sys_boot","sys_nice","sys_resource","sys_time","sys_tty_config","mknod","lease","audit_write","audit_control","setfcap","mac_override","mac_admin","syslog","wake_alarm","block_suspend"],"bounding":["chown","dac_override","dac_read_search","fowner","fsetid","kill","setgid","setuid","setpcap","linux_immutable","net_bind_service","net_broadcast","net_admin","net_raw","ipc_lock","ipc_owner","sys_module","sys_rawio","sys_chroot","sys_ptrace","sys_pacct","sys_admin","sys_boot","sys_nice","sys_resource","sys_time","sys_tty_config","mknod","lease","audit_write","audit_control","setfcap","mac_override","mac_admin","syslog","wake_alarm","block_suspend"],"ambient":null}, "cwd": "/home/sysadm", "exe": "/usr/share/metricbeat/bin/metricbeat", "name": "metricbeat", "pid": 14475, "ppid": 14474, "seccomp": {"mode":"disabled"}, "start_time": "2019-09-16T19:05:25.240+0800"}}}
2019-09-16T19:05:26.090+0800 INFO instance/beat.go:292 Setup Beat: metricbeat; Version: 7.2.0
2019-09-16T19:05:26.090+0800 INFO [index-management] idxmgmt/std.go:178 Set output.elasticsearch.index to 'metricbeat-7.2.0' as ILM is enabled.
2019-09-16T19:05:26.090+0800 INFO elasticsearch/client.go:166 Elasticsearch url: http://192.168.4.10:9200
2019-09-16T19:05:26.091+0800 INFO [publisher] pipeline/module.go:97 Beat name: br-sh-conf-1
2019-09-16T19:05:26.091+0800 INFO kibana/client.go:118 Kibana url: http://192.168.4.10:5601
2019-09-16T19:05:26.458+0800 INFO kibana/client.go:118 Kibana url: http://192.168.4.10:5601
2019-09-16T19:05:29.086+0800 INFO add_cloud_metadata/add_cloud_metadata.go:347 add_cloud_metadata: hosting provider type not detected.
2019-09-16T19:06:00.328+0800 INFO instance/beat.go:776 Kibana dashboards successfully loaded.

kibana的dashboard里显示异常,/usr/share/metricbeat/kibana/7/dashboard/Metricbeat-apache-overview.json文件的内容,的确有很多是null或者为空。
请教各位如何调试,谢谢。
 
 
 
 
 
 
 
 
1111.png
已邀请:

要回复问题请先登录注册