ElasticSearch

Elasticsearch +logstash +filebeat+redis+saltstack部署ELK日志平台

和自甴很熟 提交于 2021-01-21 12:48:21
ELK是三个开源软件的缩写,分别表示:Elasticsearch , Logstash, Kibana , 它们都是开源软件。新增了一个FileBeat,它是一个轻量级的日志收集处理工具(Agent),Filebeat占用资源少,适合于在各个服务器上搜集日志后传输给Logstash,官方也推荐此工具。 Elasticsearch是个开源分布式搜索引擎,提供搜集、分析、存储数据三大功能。它的特点有:分布式,零配置,自动发现,索引自动分片,索引副本机制,restful风格接口,多数据源,自动搜索负载等。 Logstash 主要是用来日志的搜集、分析、过滤日志的工具,支持大量的数据获取方式。一般工作方式为c/s架构,client端安装在需要收集日志的主机上,server端负责将收到的各节点日志进行过滤、修改等操作在一并发往elasticsearch上去。 Kibana 也是一个开源和免费的工具,Kibana可以为 Logstash 和 ElasticSearch 提供的日志分析友好的 Web 界面,可以帮助汇总、分析和搜索重要数据日志。 Filebeat隶属于Beats。目前Beats包含四种工具: Packetbeat(搜集网络流量数据) Topbeat(搜集系统、进程和文件系统级别的 CPU 和内存使用情况等数据) Filebeat(搜集文件数据) Winlogbeat(搜集

ELK的安装部署以及nginx日志采集

*爱你&永不变心* 提交于 2021-01-21 11:27:32
ELK的安装部署以及日志采集 环境要求:最低是2G 2核心的配置,没有上限,请根据自己机器本身情况而定。 思路: 192.168.80.130 jdk+elasticseach+kibana 192.168.80.131 jdk+logstash 1. 关闭防火墙 systemctl stop firewalld 2. 时间同步 yum - y install ntpdate ntpdate pool.ntp.org 如果出现下面这种情况 var/run/yum.pid 已被锁定,PID 为 3382 的另一个程序正在运行。 Another app is currently holding the yum lock ; waiting for it to exit .. . 另一个应用程序是:PackageKit 内存: 28 M RSS (440 MB VSZ) 已启动: Mon Jan 18 20:29:35 2021 - 00:38之前 状态 :睡眠中,进程ID:3382 [ root@localhost ~ ] # rm -rf /var/run/yum.pid 3. 两台机器安装jdk环境 [ root@localhost ] # rpm -ivh jdk-8u131-linux-x64_.rpm 验证一下: [ root@localhost ] # java

新“终结者” Chrome 88 发布,三大终结性变化

a 夏天 提交于 2021-01-21 11:19:34
新“终结者” Chrome 88 发布,三大终结性变化 据 zdnet 报道,刚刚发布的 Chrome 88 中带来了三个重要的终结性变化: 正如之前一直宣传的,它取消了 Flash 支持。根据 W3Techs 的数据,目前只有 2.2% 的网站使用了 Flash ,这个数字比 2011 年初记录的 28.5% 大幅下降。该版本也取消了对 ftp:// 协议支持。这个过程早在 Chrome 86 中就开始了:Chrome 86 - 大多数用户默认情况下仍然启用 FTP;Chrome 87 - 默认情况下,50% 的用户将禁用 FTP 支持;Chrome 88 全部禁用。Chrome 现在也阻止下载“混合的、不安全的” HTTP 文件。当用户正在访问一个以 HTTPS 开头的网页,但文件是从一个以 HTTP 开头的 URL 下载的。从 Chrome 88 开始将完全阻止这些情况,以保护用户。 除此以外,该版本还取消了对旧的 DTLS 1.0 协议的支持,它是 WebRTC 支持的一部分;还放弃了对 OS X 10.10 的支持;阻止了标签抢占攻击。 硬核老王点评:这个版本可以称之为“终结者”了,除了 Flash 之外,另外两项变化也相当重要。 Elastic 采用新的许可证 SSPL 限制商业使用 据 solidot 报道,开发 Elasticsearch 和 Kibana 的公司

健康码走出“战国时代”

人盡茶涼 提交于 2021-01-21 11:11:07
来源|雷锋网 编辑|王德清 “一码通行”还需要多久? 新冠疫情肆虐以来,健康码俨然成为了人们日常生活的“通行密钥”。 作为新冠疫情精准防控的重要工具,许多城市在疫情爆发之后,纷纷联合了相关供应商,推出了自己的健康码。如北京的“健康宝”、上海的“随申码”、广东的“粤康码”、广州的“穗康码”…… 真麻烦,换一个城市就要重新,申请当地的健康码! ▲微博网友@Y1ZE晒出的深圳宝安机场的健康申报现场 在过去的2020一年里,这样的牢骚并不鲜见。虽然从国家层面一直都在推动各省(区、市)防疫健康信息共享、健康码互通互认,但在具体实施层面一直都不顺利。 2021年1月15日,国家发展改革委副主任连维良在2021年全国春运电视电话会议上表示,春运期间,要落实好防疫健康码统一政策、统一标准、全国互认、一码通行。各地要依托全国一体化政务平台,落实健康码互认机制和规则,明确跨地区流动人员健康码信息在各地区可信可用,切实保障群众必要的出行需求。 “全国互认、一码通行是普遍性的原则要求,‘码”上加‘码’是个例、是特殊,确有原因暂不能与其他地区互认的,要先报告。”连维良特别强调到。 春运临近,面对严峻复杂的疫情防控形势,多省市发出了工作地过年,非必要不出省等倡议。数据显示,2021年春运节前车票的预售较往年同期下降近6成,预计全国铁路春运客流将下调至2.96亿人次。 显然,即使春运流动人员相比往年下降许多,2

log JSON queries built through ElasticSearch High Level Java Client for debugging?

余生长醉 提交于 2021-01-21 09:13:59
问题 I use ElasticSearch High-Level Client Java API in my Spring Boot application. I want to log the queries built using High-Level client API for debugging purposes. My question is what kind of settings required in my application.properties file to turn on JSON queries built from my application? I tried out the following properties to the application.properties file. However, it does not print the JSON queries built using various query builders. logging.level.org.elasticsearch.client=TRACE

log JSON queries built through ElasticSearch High Level Java Client for debugging?

守給你的承諾、 提交于 2021-01-21 09:12:40
问题 I use ElasticSearch High-Level Client Java API in my Spring Boot application. I want to log the queries built using High-Level client API for debugging purposes. My question is what kind of settings required in my application.properties file to turn on JSON queries built from my application? I tried out the following properties to the application.properties file. However, it does not print the JSON queries built using various query builders. logging.level.org.elasticsearch.client=TRACE

Empty string in Elasticsearch date field?

最后都变了- 提交于 2021-01-21 06:53:22
问题 I have a date field setup in my mapping like this: "groupsAssignedDate" : { "type" : "date", "format" : "MM-dd-YYYY" } In my app, the field groupsAssignedDate is set to the empty string initially. When a group is assigned, a unix timestamp is generated and stored in the field. I'm trying to use elasticsearch's bulk update function to bring in a bunch of documents with a groupsAssignedDate of "" because no groups have been assigned yet. Elasticsearch won't index the docs though. This is in the

Empty string in Elasticsearch date field?

只愿长相守 提交于 2021-01-21 06:51:26
问题 I have a date field setup in my mapping like this: "groupsAssignedDate" : { "type" : "date", "format" : "MM-dd-YYYY" } In my app, the field groupsAssignedDate is set to the empty string initially. When a group is assigned, a unix timestamp is generated and stored in the field. I'm trying to use elasticsearch's bulk update function to bring in a bunch of documents with a groupsAssignedDate of "" because no groups have been assigned yet. Elasticsearch won't index the docs though. This is in the

How to configure “search.max_open_scroll_context” in elasticsearch?

允我心安 提交于 2021-01-21 05:21:24
问题 I an using scroll to get data in elasticsearch (version: 7.0.0). However, when I used it, the exception was thrown. Request: GET /index-name/_search?scroll=1m { "size": 100, "query": { "match_all" : {} } } Response { "error": { "root_cause": [ { "type": "exception", "reason": "Trying to create too many scroll contexts. Must be less than or equal to: [500]. This limit can be set by changing the [search.max_open_scroll_context] setting." } ], "type": "search_phase_execution_exception", "reason"

ElasticSearch date range

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-21 00:12:13
问题 I have the following query: { "query": { "query_string": { "query": "searchTerm", "default_operator": "AND" } }, "facets": { "counts": { "date_histogram": { "field": "firstdate", "interval": "hour" } } } and I would like to add a date range to it, so as to retrieve values for the field firstdate which are within a specific from/to interval. Any suggestions on how to do it? Many thanks! 回答1: you just need to add a range filter to your query: { "query":{ "filtered": { "query": { "query_string":