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

做投注网站多少钱最新引流推广方法

做投注网站多少钱,最新引流推广方法,做3ds磁铁卡网站,网站一般用什么语言做【elasticsearch】慢查询替代查询审计的尝试 使用了es有两年了,突然发现一个,es没有查询审计日志,某个用户查询了某个索引的审计。 找了官方文档和社区的回复都是说使用slow log替代慢查询。 尝试一下。 参考链接1:https://discus…

【elasticsearch】慢查询替代查询审计的尝试

使用了es有两年了,突然发现一个,es没有查询审计日志,某个用户查询了某个索引的审计。
找了官方文档和社区的回复都是说使用slow log替代慢查询。
尝试一下。

参考链接1:https://discuss.elastic.co/t/does-elasticsearch-capture-audit-logs-for-query-dsl-eql-and-sql-or-not/339398/8
参考链接2:https://www.elastic.co/guide/en/elasticsearch/reference/7.17/auditing-search-queries.html

前置条件

elasticsearch: 7.17.13
操作系统:linux7.9
es加密配置,只有加密后才可以使用slow log

xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate 
xpack.security.transport.ssl.keystore.path: certs/elastic-certificates.p12 
xpack.security.transport.ssl.truststore.path: certs/elastic-certificates.p12

普通查询

 curl -u elastic:AAA320 localhost:9200/sq-20240506/_search

普通插入

curl -u elastic:AAA320 -H 'Content-Type: application/json' -X POST localhost:9200/sq-20240506/_doc/1 -d '
{
"firstname": "Krishna",
"lastname": "kumar"
}'

上述查询和插入没有任何slow log信息。

设置慢查询

这里设置trace的慢查询为0ms,会捕获所有查询。

curl -u elastic:AAA320 -H 'Content-Type: application/json'  -XPUT 'http://localhost:9200/_all/_settings?preserve_existing=true' -d '{"index.search.slowlog.threshold.fetch.debug" : "500ms","index.search.slowlog.threshold.fetch.info" : "800ms","index.search.slowlog.threshold.fetch.trace" : "0ms","index.search.slowlog.threshold.fetch.warn" : "1s","index.search.slowlog.threshold.query.debug" : "2s","index.search.slowlog.threshold.query.info" : "5s","index.search.slowlog.threshold.query.trace" : "0ms","index.search.slowlog.threshold.query.warn" : "10s"
}'

查看日志

慢查询日志,存放再es的日志文件夹中,elasticsearch_index_search_slowlog.log,这里可以看到TRACE级别的日志,可以看到分query和fetch两种,有节点信息、索引信息、分片以及耗时,但是我还是觉得这里缺少了查询用户,查询来源信息,目前还是无法满足我的实际排查需求。

] tailf elasticsearch_index_search_slowlog.log
[2024-05-06T16:33:29,528][TRACE][i.s.s.query              ] [node-1] [sq-20240506][0] took[179.4micros], took_millis[0], total_hits[1 hits], types[], stats[], search_type[QUERY_THEN_FETCH], total_shards[1], source[{}], id[], 
[2024-05-06T16:33:29,529][TRACE][i.s.s.fetch              ] [node-1] [sq-20240506][0] took[3.3ms], took_millis[3], total_hits[1 hits], types[], stats[], search_type[QUERY_THEN_FETCH], total_shards[1], source[{}], id[],

取消慢查询

curl -u elastic:AAA320 -H 'Content-Type: application/json' -XPUT 'http://localhost:9200/_all/_settings' -d '{"index.search.slowlog.threshold.fetch.debug": null,"index.search.slowlog.threshold.fetch.info": null,"index.search.slowlog.threshold.fetch.trace": null,"index.search.slowlog.threshold.fetch.warn": null,"index.search.slowlog.threshold.query.debug": null,"index.search.slowlog.threshold.query.info": null,"index.search.slowlog.threshold.query.trace": null,"index.search.slowlog.threshold.query.warn": null
}'
http://www.hengruixuexiao.com/news/27994.html

相关文章:

  • 兰州新区装修公司哪家好如何做好网站站内优化
  • 新网站大量收录好不好被公司优化掉是什么意思
  • 旅游网站建设推广免费b站推广网站破解版
  • vb.net可以做网站吗中国站长
  • 展板设计用什么软件深圳英文站seo
  • 长沙做网站最专业1688黄页大全进口
  • 青岛建站模板厂家长春网站优化体验
  • 旅游网站管理系统源码平台外宣推广技巧
  • 互动性网站腾讯广告代理
  • 建设网站需要学什么程序长沙百度推广公司电话
  • 大连网站建设怎么做淄博网站推广
  • 自己做的网站为何手机不能浏览网站转让出售
  • 营销型网站建设 合肥网络服务器多少钱一台
  • 做阿里巴巴网站口碑最新国际军事动态
  • 简单公司网站模版职业技能培训中心
  • 优化wordpress速度重庆seo顾问服务
  • 注册一个公司网站的费用河南网站建设定制
  • 一起做网店网站网络销售入门基本知识
  • 华企网站建设推广优化百度网址ip
  • 网站制作评价标准优化疫情政策
  • 做网站最快的编程语言黄页引流推广网站软件免费
  • 国际跨境电商平台有哪些九江seo优化
  • 一个公司网站设计需求营销文案
  • 电子商务网站规划方案新乡seo优化
  • 在家做网站编辑外贸找客户有什么网站
  • 做婚礼网站的公司简介交换链接平台
  • 山西太原建站怎么做搜索量排名
  • 公司网站哪里好关联词有哪些
  • 建设网站需申请什么资料山西百度推广开户
  • 甘肃省建设厅质量投诉网站网站页面优化方法