Elastic Stack之FileBeat使用实战
Elastic Stack之FileBeat使用实战
作者:尹正杰
版权声明:原创作品,谢绝转载!否则将追究法律责任。
本篇博客数据流走向:FileBeat ===》logstash ===> elasticsearch。
一.安装FileBeat
1>.选择FileBeat版本(连接地址:https://www.elastic.co/downloads/beats)
2>.选择之前的发行版本
3>.选择FileBeat版本
4>.下载FileBeat(连接地址:https://www.elastic.co/downloads/past-releases/filebeat-5-6-12)
[root@node105 ~]# wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-5.6.12-x86_64.rpm
---- ::-- https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-5.6.12-x86_64.rpm
Resolving artifacts.elastic.co (artifacts.elastic.co)... 151.101.230.222, 2a04:4e42:1a::
Connecting to artifacts.elastic.co (artifacts.elastic.co)|151.101.230.222|:... connected.
HTTP request sent, awaiting response... OK
Length: (8.8M) [application/octet-stream]
Saving to: ‘filebeat-5.6.-x86_64.rpm’ %[===========================================================================================================================================================>] ,, .9KB/s in 2m 2s -- :: (74.0 KB/s) - ‘filebeat-5.6.-x86_64.rpm’ saved [/] [root@node105 ~]#
[root@node105 ~]# wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-5.6.12-x86_64.rpm
二.使用FileBeat的案例实战
1>.安装FileBeat
[root@node105 ~]#
[root@node105 ~]# ll
total
-rw-r--r--. root root Sep : filebeat-5.6.-x86_64.rpm
-rw-r--r--. root root Mar : GeoLite2-City.tar.gz
-rw-r--r--. root root Sep : logstash-5.6..rpm
[root@node105 ~]#
[root@node105 ~]#
[root@node105 ~]# rpm -ivh filebeat-5.6.-x86_64.rpm
warning: filebeat-5.6.-x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID d88e42b4: NOKEY
Preparing... ################################# [%]
Updating / installing...
:filebeat-5.6.- ################################# [%]
[root@node105 ~]#
[root@node105 ~]#
[root@node105 ~]# rpm -ivh filebeat-5.6.12-x86_64.rpm
[root@node105 ~]#
[root@node105 ~]# rpm -ql filebeat
/etc/filebeat/filebeat.full.yml
/etc/filebeat/filebeat.template-es2x.json
/etc/filebeat/filebeat.template-es6x.json
/etc/filebeat/filebeat.template.json
/etc/filebeat/filebeat.yml
/etc/init.d/filebeat
/lib/systemd/system/filebeat.service
/usr/bin/filebeat.sh
/usr/share/filebeat/.build_hash.txt
/usr/share/filebeat/NOTICE
/usr/share/filebeat/README.md
/usr/share/filebeat/bin/filebeat
/usr/share/filebeat/bin/filebeat-god
/usr/share/filebeat/module/apache2/access/config/access.yml
/usr/share/filebeat/module/apache2/access/ingest/default.json
/usr/share/filebeat/module/apache2/access/manifest.yml
/usr/share/filebeat/module/apache2/error/config/error.yml
/usr/share/filebeat/module/apache2/error/ingest/pipeline.json
/usr/share/filebeat/module/apache2/error/manifest.yml
/usr/share/filebeat/module/auditd/log/config/log.yml
/usr/share/filebeat/module/auditd/log/ingest/pipeline.json
/usr/share/filebeat/module/auditd/log/manifest.yml
/usr/share/filebeat/module/mysql/error/config/error.yml
/usr/share/filebeat/module/mysql/error/ingest/pipeline.json
/usr/share/filebeat/module/mysql/error/manifest.yml
/usr/share/filebeat/module/mysql/slowlog/config/slowlog.yml
/usr/share/filebeat/module/mysql/slowlog/ingest/pipeline.json
/usr/share/filebeat/module/mysql/slowlog/manifest.yml
/usr/share/filebeat/module/nginx/access/config/nginx-access.yml
/usr/share/filebeat/module/nginx/access/ingest/default.json
/usr/share/filebeat/module/nginx/access/machine_learning/datafeed_low_request_rate.json
/usr/share/filebeat/module/nginx/access/machine_learning/datafeed_remote_ip_request_rate.json
/usr/share/filebeat/module/nginx/access/machine_learning/datafeed_remote_ip_url_count.json
/usr/share/filebeat/module/nginx/access/machine_learning/datafeed_response_code.json
/usr/share/filebeat/module/nginx/access/machine_learning/datafeed_visitor_rate.json
/usr/share/filebeat/module/nginx/access/machine_learning/low_request_rate.json
/usr/share/filebeat/module/nginx/access/machine_learning/remote_ip_request_rate.json
/usr/share/filebeat/module/nginx/access/machine_learning/remote_ip_url_count.json
/usr/share/filebeat/module/nginx/access/machine_learning/response_code.json
/usr/share/filebeat/module/nginx/access/machine_learning/visitor_rate.json
/usr/share/filebeat/module/nginx/access/manifest.yml
/usr/share/filebeat/module/nginx/error/config/nginx-error.yml
/usr/share/filebeat/module/nginx/error/ingest/pipeline.json
/usr/share/filebeat/module/nginx/error/manifest.yml
/usr/share/filebeat/module/system/auth/config/auth.yml
/usr/share/filebeat/module/system/auth/ingest/pipeline.json
/usr/share/filebeat/module/system/auth/manifest.yml
/usr/share/filebeat/module/system/syslog/config/syslog.yml
/usr/share/filebeat/module/system/syslog/ingest/pipeline.json
/usr/share/filebeat/module/system/syslog/manifest.yml
/usr/share/filebeat/scripts/import_dashboards
/usr/share/filebeat/scripts/migrate_beat_config_1_x_to_5_0.py
[root@node105 ~]#
[root@node105 ~]# rpm -ql filebeat
2>.修改FileBeat的配置文件
[root@node105 ~]#
[root@node105 ~]#
[root@node105 ~]# cp /etc/filebeat/filebeat.yml{,.bak}
[root@node105 ~]#
[root@node105 ~]# ll /etc/filebeat/
total
-rw-r--r--. root root Sep : filebeat.full.yml
-rw-r--r--. root root Sep : filebeat.template-es2x.json
-rw-r--r--. root root Sep : filebeat.template-es6x.json
-rw-r--r--. root root Sep : filebeat.template.json
-rw-------. root root Sep : filebeat.yml
-rw-------. root root Mar : filebeat.yml.bak
[root@node105 ~]#
[root@node105 ~]#
[root@node105 ~]# cp /etc/filebeat/filebeat.yml{,.bak} #备份默认的配置文件
[root@node105 ~]#
[root@node105 ~]# cat /etc/filebeat/filebeat.yml | egrep -v "^#|^$| #"
filebeat.prospectors:
- input_type: log
paths:
- /var/log/httpd/access_log
output.logstash:
hosts: ["node105.yinzhengjie.org.cn:5044"]
[root@node105 ~]#
[root@node105 ~]#
[root@node105 ~]# cat /etc/filebeat/filebeat.yml | egrep -v "^#|^$| #" #只需要修改logstash服务器的地址,以及收集日志的path,别忘记注释掉默认的es集群配置!
3>.修改Logstash的配置文件,配置输入插件为beats并启动(参考链接:https://www.elastic.co/guide/en/logstash/5.6/plugins-inputs-beats.html)
[root@node105 conf.d]#
[root@node105 conf.d]# cat beats-filter-elasticsearch.conf
input {
beats {
port =>
}
} filter {
grok {
match => { "message" => "%{HTTPD_COMBINEDLOG}" }
remove_field => "message"
}
date {
match => ["timestamp","dd/MMM/YYYY:H:m:s Z"]
remove_field => "timestamp"
}
geoip {
source => "clientip"
target => "geoip"
database => "/etc/logstash/maxmind/GeoLite2-City.mmdb"
}
mutate {
rename => {
"agent" => "user_agent"
}
}
} output {
elasticsearch {
hosts => ["http://node101.yinzhengjie.org.cn:9200/","http://node102.yinzhengjie.org.cn:9200/","http://node103.yinzhengjie.org.cn:9200/"]
index => "logstash-%{+YYYY.MM.dd}"
document_type => "httpd_access_logs"
}
} [root@node105 conf.d]#
[root@node105 conf.d]#
[root@node105 conf.d]# logstash -f beats-filter-elasticsearch.conf -t
WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults
Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs errors to the console
Configuration OK
[root@node105 conf.d]#
[root@node105 conf.d]# cat beats-filter-elasticsearch.conf
[root@node105 conf.d]# logstash -f beats-filter-elasticsearch.conf
WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults
Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs errors to the console
[INFO ] -- ::28.925 [[main]<beats] Server - Starting server on port:
[root@node105 conf.d]# logstash -f beats-filter-elasticsearch.conf #启动logstash服务
[root@node105 ~]#
[root@node105 ~]# ss -ntl | grep
LISTEN ::: :::*
[root@node105 ~]#
[root@node105 ~]# ss -ntl | grep 5044 #检查监听端口是否启动,如果启动成功,咱们就可以继续下面的操作啦!
4>.启动FileBeat服务
[root@node105 ~]#
[root@node105 ~]# ss -ntl | grep
LISTEN ::: :::*
[root@node105 ~]#
[root@node105 ~]#
[root@node105 ~]#
[root@node105 ~]# systemctl start filebeat
[root@node105 ~]#
[root@node105 ~]# systemctl status filebeat
● filebeat.service - filebeat
Loaded: loaded (/usr/lib/systemd/system/filebeat.service; disabled; vendor preset: disabled)
Active: active (running) since Mon -- :: CST; 10s ago
Docs: https://www.elastic.co/guide/en/beats/filebeat/current/index.html
Main PID: (filebeat)
CGroup: /system.slice/filebeat.service
└─ /usr/share/filebeat/bin/filebeat -c /etc/filebeat/filebeat.yml -path.home /usr/share/filebeat -path.config /etc/filebeat -path.data /var/lib/filebeat -path.logs /var/log/filebe... Mar :: node105.yinzhengjie.org.cn systemd[]: Started filebeat.
Mar :: node105.yinzhengjie.org.cn systemd[]: Starting filebeat...
[root@node105 ~]#
[root@node105 ~]#
[root@node105 ~]# systemctl start filebeat
[root@node105 ~]#
[root@node105 ~]# ps -ef | grep filebeat | grep -v grep
root : ? :: /usr/share/filebeat/bin/filebeat -c /etc/filebeat/filebeat.yml -path.home /usr/share/filebeat -path.config /etc/filebeat -path.data /var/lib/filebeat -path.logs /var/log/filebeat
[root@node105 ~]#
[root@node105 ~]#
[root@node105 ~]# ps -ef | grep filebeat | grep -v grep #启动FileBeat后,检查filebeat进程是否存在!
5>.查看相应的日志信息
[root@node101 ~]#
[root@node101 ~]# curl -X GET http://node101.yinzhengjie.org.cn:9200/logstash-*/_search?q=response:404 | jq .
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
542k --:--:-- --:--:-- --:--:-- 585k
{
"took": ,
"timed_out": false,
"_shards": {
"total": ,
"successful": ,
"skipped": ,
"failed":
},
"hits": {
"total": ,
"max_score": 2.14398,
"hits": [
{
"_index": "logstash-2019.03.11",
"_type": "httpd_access_logs",
"_id": "AWltN80kXxXllWpXYAEc",
"_score": 2.14398,
"_source": {
"request": "/test60.html",
"geoip": {
"timezone": "Asia/Tokyo",
"ip": "144.213.1.1",
"latitude": 35.69,
"country_name": "Japan",
"country_code2": "JP",
"continent_code": "AS",
"country_code3": "JP",
"location": {
"lon": 139.69,
"lat": 35.69
},
"longitude": 139.69
},
"offset": ,
"auth": "-",
"ident": "-",
"input_type": "log",
"verb": "GET",
"source": "/var/log/httpd/access_log",
"type": "log",
"tags": [
"beats_input_codec_plain_applied"
],
"referrer": "\"-\"",
"@timestamp": "2019-03-11T14:02:27.000Z",
"response": "",
"bytes": "",
"clientip": "144.213.1.1",
"@version": "",
"beat": {
"name": "node105.yinzhengjie.org.cn",
"hostname": "node105.yinzhengjie.org.cn",
"version": "5.6.12"
},
"host": "node105.yinzhengjie.org.cn",
"httpversion": "1.1",
"user_agent": "\"curl/7.29.0\""
}
},
{
"_index": "logstash-2019.03.11",
"_type": "httpd_access_logs",
"_id": "AWltN80kXxXllWpXYAEd",
"_score": 2.14398,
"_source": {
"request": "/test57.html",
"geoip": {
"ip": "175.91.1.1",
"latitude": 34.7725,
"country_name": "China",
"country_code2": "CN",
"continent_code": "AS",
"country_code3": "CN",
"location": {
"lon": 113.7266,
"lat": 34.7725
},
"longitude": 113.7266
},
"offset": ,
"auth": "-",
"ident": "-",
"input_type": "log",
"verb": "GET",
"source": "/var/log/httpd/access_log",
"type": "log",
"tags": [
"beats_input_codec_plain_applied"
],
"referrer": "\"-\"",
"@timestamp": "2019-03-11T14:02:28.000Z",
"response": "",
"bytes": "",
"clientip": "175.91.1.1",
"@version": "",
"beat": {
"name": "node105.yinzhengjie.org.cn",
"hostname": "node105.yinzhengjie.org.cn",
"version": "5.6.12"
},
"host": "node105.yinzhengjie.org.cn",
"httpversion": "1.1",
"user_agent": "\"curl/7.29.0\""
}
},
{
"_index": "logstash-2019.03.11",
"_type": "httpd_access_logs",
"_id": "AWltEA3lXxXllWpXYACI",
"_score": 2.14398,
"_source": {
"request": "/test52.html",
"geoip": {
"timezone": "Europe/Paris",
"ip": "82.234.1.1",
"latitude": 48.6942,
"continent_code": "EU",
"city_name": "Brunoy",
"country_name": "France",
"country_code2": "FR",
"country_code3": "FR",
"region_name": "Essonne",
"location": {
"lon": 2.4922,
"lat": 48.6942
},
"postal_code": "",
"region_code": "",
"longitude": 2.4922
},
"auth": "-",
"ident": "-",
"verb": "GET",
"path": "/var/log/httpd/access_log",
"referrer": "\"-\"",
"@timestamp": "2019-03-11T14:02:41.000Z",
"response": "",
"bytes": "",
"clientip": "82.234.1.1",
"@version": "",
"host": "0.0.0.0",
"httpversion": "1.1",
"user_agent": "\"curl/7.29.0\""
}
},
{
"_index": "logstash-2019.03.11",
"_type": "httpd_access_logs",
"_id": "AWltEAIs3WCT5NaOiwEi",
"_score": 2.14398,
"_source": {
"request": "/test53.html",
"geoip": {
"city_name": "Shanghai",
"timezone": "Asia/Shanghai",
"ip": "180.170.1.1",
"latitude": 31.0449,
"country_name": "China",
"country_code2": "CN",
"continent_code": "AS",
"country_code3": "CN",
"region_name": "Shanghai",
"location": {
"lon": 121.4012,
"lat": 31.0449
},
"region_code": "SH",
"longitude": 121.4012
},
"auth": "-",
"ident": "-",
"verb": "GET",
"path": "/var/log/httpd/access_log",
"referrer": "\"-\"",
"@timestamp": "2019-03-11T14:02:38.000Z",
"response": "",
"bytes": "",
"clientip": "180.170.1.1",
"@version": "",
"host": "0.0.0.0",
"httpversion": "1.1",
"user_agent": "\"curl/7.29.0\""
}
},
{
"_index": "logstash-2019.03.11",
"_type": "httpd_access_logs",
"_id": "AWltD9ccXxXllWpXYACF",
"_score": 2.14398,
"_source": {
"request": "/test60.html",
"geoip": {
"timezone": "Asia/Tokyo",
"ip": "144.213.1.1",
"latitude": 35.69,
"country_name": "Japan",
"country_code2": "JP",
"continent_code": "AS",
"country_code3": "JP",
"location": {
"lon": 139.69,
"lat": 35.69
},
"longitude": 139.69
},
"auth": "-",
"ident": "-",
"verb": "GET",
"path": "/var/log/httpd/access_log",
"referrer": "\"-\"",
"@timestamp": "2019-03-11T14:02:27.000Z",
"response": "",
"bytes": "",
"clientip": "144.213.1.1",
"@version": "",
"host": "0.0.0.0",
"httpversion": "1.1",
"user_agent": "\"curl/7.29.0\""
}
},
{
"_index": "logstash-2019.03.11",
"_type": "httpd_access_logs",
"_id": "AWltEBmksru-A5a8RIhh",
"_score": 2.14398,
"_source": {
"request": "/test52.html",
"geoip": {
"timezone": "Africa/Accra",
"ip": "45.209.1.1",
"latitude": ,
"country_name": "Ghana",
"country_code2": "GH",
"continent_code": "AF",
"country_code3": "GH",
"location": {
"lon": -,
"lat":
},
"longitude": -
},
"auth": "-",
"ident": "-",
"verb": "GET",
"path": "/var/log/httpd/access_log",
"referrer": "\"-\"",
"@timestamp": "2019-03-11T14:02:44.000Z",
"response": "",
"bytes": "",
"clientip": "45.209.1.1",
"@version": "",
"host": "0.0.0.0",
"httpversion": "1.1",
"user_agent": "\"curl/7.29.0\""
}
},
{
"_index": "logstash-2019.03.11",
"_type": "httpd_access_logs",
"_id": "AWltEMH9XxXllWpXYACa",
"_score": 2.14398,
"_source": {
"request": "/test53.html",
"geoip": {
"timezone": "Europe/Rome",
"ip": "94.164.1.1",
"latitude": 42.5245,
"continent_code": "EU",
"city_name": "Piansano",
"country_name": "Italy",
"country_code2": "IT",
"country_code3": "IT",
"region_name": "Provincia di Viterbo",
"location": {
"lon": 11.8298,
"lat": 42.5245
},
"postal_code": "",
"region_code": "VT",
"longitude": 11.8298
},
"auth": "-",
"ident": "-",
"verb": "GET",
"path": "/var/log/httpd/access_log",
"referrer": "\"-\"",
"@timestamp": "2019-03-11T14:03:28.000Z",
"response": "",
"bytes": "",
"clientip": "94.164.1.1",
"@version": "",
"host": "0.0.0.0",
"httpversion": "1.1",
"user_agent": "\"curl/7.29.0\""
}
},
{
"_index": "logstash-2019.03.11",
"_type": "httpd_access_logs",
"_id": "AWltOqroXxXllWpXYAF7",
"_score": 2.14398,
"_source": {
"request": "/test53.html",
"geoip": {
"timezone": "Asia/Ho_Chi_Minh",
"ip": "171.247.1.1",
"latitude": ,
"country_name": "Vietnam",
"country_code2": "VN",
"continent_code": "AS",
"country_code3": "VN",
"location": {
"lon": ,
"lat":
},
"longitude":
},
"offset": ,
"auth": "-",
"ident": "-",
"input_type": "log",
"verb": "GET",
"source": "/var/log/httpd/access_log",
"type": "log",
"tags": [
"beats_input_codec_plain_applied"
],
"referrer": "\"-\"",
"@timestamp": "2019-03-11T14:49:10.000Z",
"response": "",
"bytes": "",
"clientip": "171.247.1.1",
"@version": "",
"beat": {
"name": "node105.yinzhengjie.org.cn",
"hostname": "node105.yinzhengjie.org.cn",
"version": "5.6.12"
},
"host": "node105.yinzhengjie.org.cn",
"httpversion": "1.1",
"user_agent": "\"curl/7.29.0\""
}
},
{
"_index": "logstash-2019.03.11",
"_type": "httpd_access_logs",
"_id": "AWltOpdbsru-A5a8RIib",
"_score": 2.14398,
"_source": {
"request": "/test54.html",
"geoip": {
"ip": "177.3.1.1",
"latitude": -22.8305,
"country_name": "Brazil",
"country_code2": "BR",
"continent_code": "SA",
"country_code3": "BR",
"location": {
"lon": -43.2192,
"lat": -22.8305
},
"longitude": -43.2192
},
"offset": ,
"auth": "-",
"ident": "-",
"input_type": "log",
"verb": "GET",
"source": "/var/log/httpd/access_log",
"type": "log",
"tags": [
"beats_input_codec_plain_applied"
],
"referrer": "\"-\"",
"@timestamp": "2019-03-11T14:49:07.000Z",
"response": "",
"bytes": "",
"clientip": "177.3.1.1",
"@version": "",
"beat": {
"name": "node105.yinzhengjie.org.cn",
"hostname": "node105.yinzhengjie.org.cn",
"version": "5.6.12"
},
"host": "node105.yinzhengjie.org.cn",
"httpversion": "1.1",
"user_agent": "\"curl/7.29.0\""
}
},
{
"_index": "logstash-2019.03.11",
"_type": "httpd_access_logs",
"_id": "AWltO0cmsru-A5a8RIi5",
"_score": 2.14398,
"_source": {
"request": "/test56.html",
"geoip": {
"city_name": "Taipei",
"timezone": "Asia/Taipei",
"ip": "61.228.1.1",
"latitude": 25.0478,
"country_name": "Taiwan",
"country_code2": "TW",
"continent_code": "AS",
"country_code3": "TW",
"region_name": "Taipei City",
"location": {
"lon": 121.5318,
"lat": 25.0478
},
"region_code": "TPE",
"longitude": 121.5318
},
"offset": ,
"auth": "-",
"ident": "-",
"input_type": "log",
"verb": "GET",
"source": "/var/log/httpd/access_log",
"type": "log",
"tags": [
"beats_input_codec_plain_applied"
],
"referrer": "\"-\"",
"@timestamp": "2019-03-11T14:49:51.000Z",
"response": "",
"bytes": "",
"clientip": "61.228.1.1",
"@version": "",
"beat": {
"name": "node105.yinzhengjie.org.cn",
"hostname": "node105.yinzhengjie.org.cn",
"version": "5.6.12"
},
"host": "node105.yinzhengjie.org.cn",
"httpversion": "1.1",
"user_agent": "\"curl/7.29.0\""
}
}
]
}
}
[root@node101 ~]#
[root@node101 ~]#
[root@node101 ~]# curl -X GET http://node101.yinzhengjie.org.cn:9200/logstash-*/_search?q=response:404 | jq .
Elastic Stack之FileBeat使用实战的更多相关文章
- Elastic Stack之Redis集群使用
Elastic Stack之Redis集群使用 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 本篇博客数据流走向:FileBeat ===>Redis ===>lo ...
- SpringBoot 整合 Elastic Stack 最新版本(7.14.1)分布式日志解决方案,开源微服务全栈项目【有来商城】的日志落地实践
一. 前言 日志对于一个程序的重要程度不用过多的言语修饰,本篇将以实战的方式讲述开源微服务全栈项目 有来商城 是如何整合当下主流日志解决方案 ELK +Filebeat . 话不多说,先看实现的效果图 ...
- Elastic Stack
Elastic Stack 开发人员不能登陆线上服务器查看详细日志 各个系统都有日志,日志数据分散难以查找 日志数据量大,查询速度慢,或者数据不够实时 官网地址:https://www.elastic ...
- Elastic Stack之kibana使用
Elastic Stack之kibana使用 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 本篇博客数据流走向:FileBeat ===>Redis ===>log ...
- Elastic Stack之搜索引擎基础
Elastic Stack之搜索引擎基础 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.搜索引擎概述 1>.什么是搜索引擎 搜索引擎(Search Engine)是指根 ...
- Elastic Stack之ElasticSearch分布式集群yum方式搭建
Elastic Stack之ElasticSearch分布式集群yum方式搭建 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.搜索引擎及Lucene基本概念 1>.什么 ...
- 使用 Elastic Stack 来监控和调优 Golang 应用程序
Golang 因为其语法简单,上手快且方便部署正被越来越多的开发者所青睐,一个 Golang 程序开发好了之后,势必要关心其运行情况,今天在这里就给大家介绍一下如果使用 Elastic Stack 来 ...
- Elastic Stack 开源的大数据解决方案
目的 本文主要介绍的内容有以下三点: 一. Elastic Stack是什么以及组成部分 二. Elastic Stack前景以及业务应用 三. Elasticsearch原理(索引方向) 四. El ...
- ES 集中式日志分析平台 Elastic Stack(介绍)
一.ELK 介绍 ELK 构建在开源基础之上,让您能够安全可靠地获取任何来源.任何格式的数据,并且能够实时地对数据进行搜索.分析和可视化. 最近查看 ELK 官方网站,发现新一代的日志采集器 File ...
随机推荐
- python 脚本之 获取远程主机的hostname
import sys, socket try: result = socket.gethostbyaddr("查询的IP") #查询完后获得一个元组 print (result) ...
- P1578 奶牛浴场
P1578 奶牛浴场 题目描述 由于John建造了牛场围栏,激起了奶牛的愤怒,奶牛的产奶量急剧减少.为了讨好奶牛,John决定在牛场中建造一个大型浴场.但是John的奶牛有一个奇怪的习惯,每头奶牛都必 ...
- POJ 2750 鸡兔同笼
参考自:https://www.cnblogs.com/ECJTUACM-873284962/p/6414781.html POJ 2750鸡兔同笼 总时间限制:1000ms 内存限制:65536kB ...
- 【XSY2472】string KMP 期望DP
题目大意 给定一个由且仅由字符'H','T'构成的字符串\(S\). 给定一个最初为空的字符串\(T\) ,每次随机地在\(T\)的末尾添加'H'或者'T'. 问当\(S\)为\(T\)的后缀时, ...
- 爬虫_豆瓣电影top250 (正则表达式)
一样的套路,就是多线程还没弄 import requests import re import json headers = 'Mozilla/5.0 (Windows NT 10.0; WOW64) ...
- 【CodeForces 730H】Delete Them
BUPT 2017 summer training (for 16) #1E 题意 找到匹配要删除的文件名们但不匹配其它文件名们的表达式.其中?匹配所有字符,其它字符匹配本身. 题解 如果某个位置出现 ...
- zabbix 常用监控模板
以下为常用的服务监控,可直接通过zabbix的导入功能导入,做基本修改就可以使用nginx监控模板 <?xml version="1.0" encoding="UT ...
- [luogu2286][HNOI2004]宠物收养场【平衡树】
[传送门] 前言 这一篇题解并不是为了讲什么算法,只是总结一下平衡树在OI考试中的注意事项. 题意简化(给不想看题目的小伙伴们一点福利) 给你两堆数,每一次给你一个数,每一次在另外一堆数中找到这个数的 ...
- Get The Treasury HDU - 3642(体积扫描线)
给出n个立方体,要你求这些立方体至少被覆盖三次的部分. 先把这个立方体的信息存在来,发现Z的范围不大,z范围是是[-500,500],所以我们可以先离散化,然后枚举Z, 然后对于每一段Z的区域内,在当 ...
- selenium 代理设置
设置Firefox代理: from selenium import webdriver from selenium.webdriver.common.proxy import Proxy, Proxy ...