"192.168.132.133:9200"]processors: - add_host_metadata: ~ -
标签:
1 Kibana的显示配置环境先措置惩罚惩罚洁净
安置nginx和httpd-tools
2 使用压测工具孕育产生日志[[email protected] ~]# ab -n 100 -c 100
This is ApacheBench, Version 2.3 <$Revision: 1430300 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http:// Licensed to The Apache Software Foundation, http:// Benchmarking 192.168.132.134 (be patient).....done Server Software: nginx/1.16.1 Server Hostname: 192.168.132.134 Server Port: 80 Document Path: / Document Length: 612 bytes Concurrency Level: 100 Time taken for tests: 0.011 seconds Complete requests: 100 Failed requests: 0 Write errors: 0 Total transferred: 84500 bytes HTML transferred: 61200 bytes Requests per second: 9071.12 [#/sec] (mean) Time per request: 11.024 [ms] (mean) Time per request: 0.110 [ms] (mean, across all concurrent requests) Transfer rate: 7485.44 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 3 0.5 3 3 Processing: 2 3 1.1 2 5 Waiting: 0 3 1.2 2 5 Total: 4 6 0.7 5 7 WARNING: The median and mean for the total time are not within a normal deviation These results are probably not that reliable. Percentage of the requests served within a certain time (ms) 50% 5 66% 6 75% 6 80% 7 90% 7 95% 7 98% 7 99% 7 100% 7 (longest request)
[[email protected] ~]# tail -f /usr/local/nginx/logs/access.log
192.168.132.181 - - [18/Jan/2020:21:47:23 -0500] "GET / HTTP/1.0" 200 612 "-" "ApacheBench/2.3" 192.168.132.181 - - [18/Jan/2020:21:47:23 -0500] "GET / HTTP/1.0" 200 612 "-" "ApacheBench/2.3" 192.168.132.181 - - [18/Jan/2020:21:47:23 -0500] "GET / HTTP/1.0" 200 612 "-" "ApacheBench/2.3"
3 安置filebeat[[email protected] src]# wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.5.1-x86_64.rpm
[[email protected] src]# rpm -ivh filebeat-7.5.1-x86_64.rpm
[[email protected] src]# rpm -qc filebeat
[[email protected] src]# cd /etc/filebeat/
[[email protected] filebeat]# cp filebeat.yml /opt/
[[email protected] filebeat]# grep -Ev "^$|[#;]" filebeat.yml
filebeat.inputs: - type: log enabled: true paths: - /usr/local/nginx/logs/access.log filebeat.config.modules: path: ${path.config}/modules.d/*.yml reload.enabled: false setup.template.settings: index.number_of_shards: 1 setup.kibana: output.elasticsearch: hosts: ["192.168.132.131:9200","192.168.132.132:9200","192.168.132.133:9200"] processors: - add_host_metadata: ~ - add_cloud_metadata: ~ - add_docker_metadata: ~ - add_kubernetes_metadata: ~
[[email protected] filebeat]# systemctl restart filebeat
使用kibana检察
访谒::5601/app/kibana
对付一些根基的操纵,再前面的学习中已经演示,,参看前面的学习尝试
4 配置nginx的日志改为json格局温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/web/31358.html