当前位置: 首页 > news >正文

为什么要建立网站/网站排名

为什么要建立网站,网站排名,桐城网站设计,rails开发的网站开发在我之前的教程: Beats:Beats 入门教程 (一)Beats:Beats 入门教程 (二) 我已经详述了如果启动 Filebeat 并监督系统日志。在启动 Filebeat 的过程中,有一个很重要的步骤就是&#x…

在我之前的教程:

  • Beats:Beats 入门教程 (一)
  • Beats:Beats 入门教程 (二)

我已经详述了如果启动 Filebeat 并监督系统日志。在启动 Filebeat 的过程中,有一个很重要的步骤就是:

./filebeat setup

这个步骤非常重要,但是描述的内容并不是很多。为什么需要这个步骤呢?它到底能够做什么呢?

首先,我们在命令的输出中,我们可以看到如下的内容:

$ ./filebeat setup
Overwriting ILM policy is disabled. Set `setup.ilm.overwrite: true` for enabling.Index setup finished.
Loading dashboards (Kibana must be running and reachable)
Loaded dashboards
Setting up ML using setup --machine-learning is going to be removed in 8.0.0. Please use the ML app instead.
See more: https://www.elastic.co/guide/en/machine-learning/current/index.html
Loaded machine learning job configurations
Loaded Ingest pipelines
liuxg:filebeat-7.9.1-darwin-x86_64 liuxg$ ./filebeat modules enable system
Enabled system

从上面的输出的内容我们可以看出来这个步骤做了如下的几个事情:

 

1)Index setup finished 

在这个步骤中,它将创建一个 index template,并创建好相应的 index pattern。我们可以在 Kibana 中看到如下的一个新的 index pattern 被创建:

也就是说所有的 filebeat 导入的文件将会自动被这个 index pattern 所访问。

同时它也生产一个相应的 Index Life Cycle Management policy:

我们可以点击 actions 来查看这个 policy 的内容。我们甚至可以来修改这个内容。

我们也可以使用如下的命令来查看为 filebeat 而创建的 index template:

GET _template/filebeat-7.9.1

我们从上面可以看出来这个 index template 里有一个 rollover_alias 叫做 filebeat-7.9.1。我们可以通过如下的方式来查看:

GET _alias/filebeat-7.9.1

上面的命令显示:

{"filebeat-7.9.1-2020.10.20-000001" : {"aliases" : {"filebeat-7.9.1" : {"is_write_index" : true}}}
}

我们可以通过 filebeat-7.9.1 这个 alias 来访问所有的 filebeat 的文档:

GET filebeat-7.9.1/_search

2)Loaded dashboards

这个表明它帮我们装载所有和 Filebeat 相关的 dasboards:

在执行完 setup 命令后,我们可以在 Dashboards 中发现已经帮我们生产好的 Dashboard 来供我们使用。

 

3)Setting up ML using setup

这个用来设置一下机器学习的配置。机器学习是白金版的功能。我们必须打开30天试用才可以使用:

具体的使用请参考 https://www.elastic.co/guide/en/machine-learning/current/index.html

4)Loaded Ingest pipelines

它表明装载 ingest pipelines。在没有启动任何的模块之前,我们在 Kibana 中也找不到任何东西,但是一旦我们使用如下的方法来启动一个模块:

./filebeat modules enable system

在上面,我们启动了 system 这个模块。那么在我们的 Kibana 中,我们可以看到:

在上面,我们可以看到有两个 ingest pipeline 同时被创建。我们可以点击右边的三个点进行编辑:

我们可以查看当前的这个 ingest pipeline 的定义情况。当然我们也可以直接点击 Test pipeline 来进行测试。我们可以打开自己的电脑系统,并在如下的路径打开文件:

Mac OS:

/var/log/system.log

Ubuntu OS:

/var/log/syslog

我们拷贝其中的一条信息:

并在 Test pipeline 的窗口中进行如下的编辑:

点击 Run the pipeline:

我们可以看到上面的输出。从上面我们可以看出来这个 ingest pipeline 能够正确地分析 system.log/syslog 信息。

我们可以通过如下的方式来获得这个 ingest pipeline 的内容:

GET _ingest/pipeline/filebeat-7.9.1-system-syslog-pipeline

上面的命令显示:

{"filebeat-7.9.1-system-syslog-pipeline" : {"description" : "Pipeline for parsing Syslog messages.","processors" : [{"grok" : {"field" : "message","patterns" : ["""%{SYSLOGTIMESTAMP:system.syslog.timestamp} %{SYSLOGHOST:host.hostname} %{DATA:process.name}(?:\[%{POSINT:process.pid:long}\])?: %{GREEDYMULTILINE:system.syslog.message}""","%{SYSLOGTIMESTAMP:system.syslog.timestamp} %{GREEDYMULTILINE:system.syslog.message}","""%{TIMESTAMP_ISO8601:system.syslog.timestamp} %{SYSLOGHOST:host.hostname} %{DATA:process.name}(?:\[%{POSINT:process.pid:long}\])?: %{GREEDYMULTILINE:system.syslog.message}"""],"pattern_definitions" : {"GREEDYMULTILINE" : """(.|
)*"""},"ignore_missing" : true}},{"remove" : {"field" : "message"}},{"rename" : {"field" : "system.syslog.message","target_field" : "message","ignore_missing" : true}},{"date" : {"if" : "ctx.event.timezone == null","field" : "system.syslog.timestamp","target_field" : "@timestamp","formats" : ["MMM  d HH:mm:ss","MMM dd HH:mm:ss","MMM d HH:mm:ss","ISO8601"],"on_failure" : [{"append" : {"field" : "error.message","value" : "{{ _ingest.on_failure_message }}"}}]}},{"date" : {"field" : "system.syslog.timestamp","target_field" : "@timestamp","formats" : ["MMM  d HH:mm:ss","MMM dd HH:mm:ss","MMM d HH:mm:ss","ISO8601"],"timezone" : "{{ event.timezone }}","on_failure" : [{"append" : {"field" : "error.message","value" : "{{ _ingest.on_failure_message }}"}}],"if" : "ctx.event.timezone != null"}},{"remove" : {"field" : "system.syslog.timestamp"}},{"set" : {"value" : "event","field" : "event.type"}}],"on_failure" : [{"set" : {"field" : "error.message","value" : "{{ _ingest.on_failure_message }}"}}]}
}

同样地,我们也可以通过如下的方式来进行测试这个 ingest pipeline:

POST _ingest/pipeline/filebeat-7.9.1-system-syslog-pipeline/_simulate
{"docs": [{"_source": {"message": "Oct 20 00:41:22 liuxg syslogd[122]: Configuration Notice: ASL Module \"com.apple.cdscheduler\" claims selected messages. Those messages may not appear in standard system log files or in the ASL database."}}]
}

上面的命令显示的结果是:

{"docs" : [{"doc" : {"_index" : "_index","_type" : "_doc","_id" : "_id","_source" : {"process" : {"name" : "syslogd","pid" : 122},"system" : {"syslog" : {"timestamp" : "Oct 20 00:41:22"}},"host" : {"hostname" : "liuxg"},"message" : """Configuration Notice: ASL Module "com.apple.cdscheduler" claims selected messages. Those messages may not appear in standard system log files or in the ASL database.""","error" : {"message" : ""}},"_ingest" : {"timestamp" : "2020-10-20T06:45:00.940665Z"}}}]
}

显然这个 ingest pipeline 能够正确地解析我们的 syslog 内容。

http://www.lbrq.cn/news/1025389.html

相关文章:

  • 商标做网站logo/保定网站seo
  • 网站建设官方商城/百度广告公司联系方式
  • ppt做仿网站点击效果/天津网站优化
  • 专门做卫生间效果图的网站/进入百度app
  • 东营网站建设优化/seo外链友情链接
  • 网页设计个人网站作业/重庆森林电影高清在线观看
  • 现在哪些网站做外贸的好做/企业如何进行网站推广
  • 旅游网站制作方案/全网推广平台推荐
  • wordpress注册页面更改/seo上海优化
  • 优秀金融网站设计/收录提交入口网址
  • google网站优化工具/可以免费发广告的网站
  • 纪检委网站建设情况/北京网站推广助理
  • 室内设计考研/百度网站如何优化排名
  • 武汉网站备案/线上广告投放方式
  • 菏泽网站建设效果/汕头网站建设方案维护
  • 网站建设公司下载/石家庄谷歌seo
  • 东莞做网站公司/百度提问登陆入口
  • 旅游网站建设的论文/商丘网站优化公司
  • 自己做网站卖衣服/下载百度免费
  • 高端品牌男鞋/seo快速排名优化方式
  • 腾讯云做网站/成都网站seo技巧
  • 网站建设学习/seo软件推广
  • 学做网站论坛vip视频/引流推广营销
  • 业余做网站/合理使用说明
  • 网上车辆租赁网站怎么做/阿里巴巴怎么优化关键词排名
  • 时时彩 网站开发/seo的优化流程
  • phpwind能做网站吗/百度推广代理商返点
  • 做网站卖酒/网上写文章用什么软件
  • 杂志排版设计用什么软件/优化公司怎么优化网站的
  • 做动漫主题的网站/腾讯企点注册
  • Linux中的日志管理
  • C++:浅尝gdb
  • 云原生存储架构设计与性能优化
  • Docker pull拉取镜像命令的入门教程
  • 上网行为安全概述和组网方案
  • QT6(创建第一个QT项目)