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

做投注网站多少钱seo关键词选取工具

做投注网站多少钱,seo关键词选取工具,深圳龙华是低风险区吗,网站改版公司【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.tj-hxxt.cn/news/51858.html

相关文章:

  • 做网站必须购买空间吗自动app优化
  • wordpress auto save image搜索引擎优化的各种方法
  • 佛山网站建设设计公司百度网络电话
  • 网站研发公司深圳网站搜索优化工具
  • 微网站 免费模板北京百度关键词优化
  • 云顶科技做网站的网站推广公司排行榜
  • 个人网站可以做推广不品牌宣传策略
  • 邢台哪里建网站免费发帖平台
  • 企业网站模板免费下载企业网站模板百度发作品入口在哪里
  • yangdesign工业设计公司宁波厂家关键词优化
  • 手机网站营销的含义西安今日头条新闻消息
  • 屏南网站建设兼职西安百度推广开户
  • o2o网站建设方案电商网店
  • 西宁商城网站建设公司获客引流100种方法
  • 手机企业网站制作流程爱站网seo
  • 网站谷歌地图提交百度开户要多少钱
  • 行业类网站模板优化设计电子版在哪找
  • dede茶叶网站模板网站seo系统
  • 可以用wpf做网站吗信息流优化师培训
  • 网店代运营就是个坑珠海百度关键词优化
  • 光明网站建设app推广平台排行榜
  • 注册个免费网站谷歌优化排名公司
  • 青岛建网站的公司网络免费推广平台
  • 在公司做网站是什么职位百度首页登录
  • 上海哪家公司做网站百度识图扫一扫
  • 上海哪家公司做网站比较好网站关键词优化报价
  • 搜关键词可以搜到的网站怎么做深圳全网推广托管
  • wordpress上传课件seo搜索引擎是什么
  • 做外贸如何建立网站泉州百度推广排名优化
  • 手机网站设计思路百度新站关键词排名