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

工作组赴河南协助搜索引擎优化的完整过程

工作组赴河南协助,搜索引擎优化的完整过程,百度提交入口怎么用,系部 网站建设方案【Apache Doris】审计日志插件 | 快速体验 一、 环境信息1.1 硬件信息1.2 软件信息 二、 审计日志插件介绍三、 快速 体验3.1 AuditLoader 配置3.1.1 下载 Audit Loader 插件3.1.2 解压安装包3.1.3 修改 plugin.conf 3.2 创建库表3.3 初始化3.4 验证 一、 环境信息 1.1 硬件信…

【Apache Doris】审计日志插件 | 快速体验

  • 一、 环境信息
    • 1.1 硬件信息
    • 1.2 软件信息
  • 二、 审计日志插件介绍
  • 三、 快速 体验
    • 3.1 AuditLoader 配置
      • 3.1.1 下载 Audit Loader 插件
      • 3.1.2 解压安装包
      • 3.1.3 修改 plugin.conf
    • 3.2 创建库表
    • 3.3 初始化
    • 3.4 验证

一、 环境信息

1.1 硬件信息

  1. CPU :48C
  2. CPU型号:x86_64
  3. 内存 :185GB

1.2 软件信息

  1. 系统 :CentOS
  2. Apahce Doris版本 :2.0.2
  3. JAVA版本:1.8.0

二、 审计日志插件介绍

Doris默认装了是审计日志,即会将执行的SQL都记录到fe/log/fe.audit.log日志里,但如果需要映射到表、通过SQL的方式去查询解析这些日志的话,则需要安装配置审计日志插件。

Doris 的审计日志插件是在 FE 的插件框架基础上开发的,是一个可选插件。用户可以在运行时安装或卸载这个插件。

审计日志插件可以将 FE 的审计日志定期的导入到指定 Doris 集群中,以方便用户通过 SQL 对审计日志进行查看和分析。

在这里插入图片描述

三、 快速 体验

3.1 AuditLoader 配置

3.1.1 下载 Audit Loader 插件

Audit Loader 插件在 Doris 的发行版中默认提供,通过官网下载 Doris 安装包解压并进入目录后即可在 extensions/audit_loader 子目录下找到 auditloader.zip 文件。

3.1.2 解压安装包

unzip auditloader.zip

解压生成如下3个文件:

  • auditloader.jar:插件代码包。
  • plugin.properties:插件属性文件。
  • plugin.conf:插件配置文件。

在这里插入图片描述

3.1.3 修改 plugin.conf

以下配置可供修改:

  • frontend_host_port:FE 节点 IP 地址和 HTTP 端口,格式为 <fe_ip>:<fe_http_port>。 默认值为 127.0.0.1:8030。
  • database:审计日志库名,默认即可、需要与上一步的【创建库表】一致。
  • audit_log_table:审计日志表名,默认即可、需要与上一步的【创建库表】一致。
  • slow_log_table:慢查询日志表名,默认即可、需要与上一步的【创建库表】一致。
  • enable_slow_log:是否开启慢查询日志导入功能。默认值为 false。
  • user:集群用户名。该用户必须具有对应表的 INSERT 权限。
  • password:集群用户密码。

在这里插入图片描述

3.2 创建库表

在 Doris 中,需要创建审计日志的库和表,表结构如下:

若需开启慢查询日志导入功能,还需要额外创建慢表 doris_slow_log_tbl__,其表结构与 doris_audit_log_tbl__ 一致。

其中 dynamic_partition 属性根据自己的需要,选择审计日志保留的天数。

create database doris_audit_db__;create table doris_audit_db__.doris_audit_log_tbl__
(query_id varchar(48) comment "Unique query id",`time` datetime not null comment "Query start time",client_ip varchar(32) comment "Client IP",user varchar(64) comment "User name",catalog varchar(128) comment "Catalog of this query",db varchar(96) comment "Database of this query",state varchar(8) comment "Query result state. EOF, ERR, OK",error_code int comment "Error code of failing query.",error_message string comment "Error message of failing query.",query_time bigint comment "Query execution time in millisecond",scan_bytes bigint comment "Total scan bytes of this query",scan_rows bigint comment "Total scan rows of this query",return_rows bigint comment "Returned rows of this query",stmt_id int comment "An incremental id of statement",is_query tinyint comment "Is this statemt a query. 1 or 0",frontend_ip varchar(32) comment "Frontend ip of executing this statement",cpu_time_ms bigint comment "Total scan cpu time in millisecond of this query",sql_hash varchar(48) comment "Hash value for this query",sql_digest varchar(48) comment "Sql digest for this query",peak_memory_bytes bigint comment "Peak memory bytes used on all backends of this query",stmt string comment "The original statement, trimed if longer than 2G"
) engine=OLAP
duplicate key(query_id, `time`, client_ip)
partition by range(`time`) ()
distributed by hash(query_id) buckets 1
properties("dynamic_partition.time_unit" = "DAY","dynamic_partition.start" = "-30","dynamic_partition.end" = "3","dynamic_partition.prefix" = "p","dynamic_partition.buckets" = "1","dynamic_partition.enable" = "true","replication_num" = "3"
);create table doris_audit_db__.doris_slow_log_tbl__
(query_id varchar(48) comment "Unique query id",`time` datetime not null comment "Query start time",client_ip varchar(32) comment "Client IP",user varchar(64) comment "User name",catalog varchar(128) comment "Catalog of this query",db varchar(96) comment "Database of this query",state varchar(8) comment "Query result state. EOF, ERR, OK",error_code int comment "Error code of failing query.",error_message string comment "Error message of failing query.",query_time bigint comment "Query execution time in millisecond",scan_bytes bigint comment "Total scan bytes of this query",scan_rows bigint comment "Total scan rows of this query",return_rows bigint comment "Returned rows of this query",stmt_id int comment "An incremental id of statement",is_query tinyint comment "Is this statemt a query. 1 or 0",frontend_ip varchar(32) comment "Frontend ip of executing this statement",cpu_time_ms bigint comment "Total scan cpu time in millisecond of this query",sql_hash varchar(48) comment "Hash value for this query",sql_digest varchar(48) comment "Sql digest for this query",peak_memory_bytes bigint comment "Peak memory bytes used on all backends of this query",stmt string comment "The original statement, trimed if longer than 2G "
) engine=OLAP
duplicate key(query_id, `time`, client_ip)
partition by range(`time`) ()
distributed by hash(query_id) buckets 1
properties("dynamic_partition.time_unit" = "DAY","dynamic_partition.start" = "-30","dynamic_partition.end" = "3","dynamic_partition.prefix" = "p","dynamic_partition.buckets" = "1","dynamic_partition.enable" = "true","replication_num" = "3"
);

3.3 初始化

INSTALL PLUGIN FROM [source] [PROPERTIES ("key"="value", ...)]

source 支持三种类型:

  • 指向一个 zip 文件的绝对路径。
  • 指向一个插件目录的绝对路径。
  • 指向一个 http 或 https 协议的 zip 文件下载路径

Example:

  1. 安装一个本地 zip 文件插件:
INSTALL PLUGIN FROM "/home/users/doris/auditdemo.zip";
  1. 安装一个本地目录中的插件:
INSTALL PLUGIN FROM "/home/users/doris/auditdemo/";
  1. 下载并安装一个插件:注意需要放置一个和 .zip 文件同名的 md5 文件, 如 http://mywebsite.com/plugin.zip.md5 。其中内容为 .zip 文件的 MD5 值。
INSTALL PLUGIN FROM "http://mywebsite.com/plugin.zip";
  1. 下载并安装一个插件,同时设置了zip文件的md5sum的值:
INSTALL PLUGIN FROM "http://mywebsite.com/plugin.zip" PROPERTIES("md5sum" = "73877f6029216f4314d712086a146570");

执行install成功后会在fe/plugins/目录下自动生成AuditLoader目录

在这里插入图片描述

3.4 验证

执行如下sql验证是否安装注册成功,Status为INSTALLED则说明安装成功

在这里插入图片描述

直接通过sql查询审计日志,快速体验。

select*
fromdoris_audit_db__.doris_audit_log_tbl__
wheretime > '2023-11-11 00:00:00'and stmt like '%ssb_test.part%'
order bytime desc
limit 10;

在这里插入图片描述

【Apache Doris】审计日志插件 | 快速体验 分享至此结束,体验过程中若遇到问题欢迎留言交流


文章转载自:
http://dinncocrassulaceous.bkqw.cn
http://dinncowsj.bkqw.cn
http://dinncoreckoner.bkqw.cn
http://dinncogreyhound.bkqw.cn
http://dinncobelay.bkqw.cn
http://dinnconegrophile.bkqw.cn
http://dinncoeduct.bkqw.cn
http://dinncoimaret.bkqw.cn
http://dinncoisosmotic.bkqw.cn
http://dinncoteledrama.bkqw.cn
http://dinncoconarial.bkqw.cn
http://dinncodermatotherapy.bkqw.cn
http://dinncoqueuer.bkqw.cn
http://dinncocameral.bkqw.cn
http://dinncoepimer.bkqw.cn
http://dinncomatelot.bkqw.cn
http://dinncosynaesthesia.bkqw.cn
http://dinncosphagna.bkqw.cn
http://dinncovanward.bkqw.cn
http://dinncoaftermath.bkqw.cn
http://dinncosolicit.bkqw.cn
http://dinncotricuspidate.bkqw.cn
http://dinncomethylbenzene.bkqw.cn
http://dinncosnuck.bkqw.cn
http://dinncofasten.bkqw.cn
http://dinncocameralistic.bkqw.cn
http://dinncocno.bkqw.cn
http://dinncoadversely.bkqw.cn
http://dinncoleninabad.bkqw.cn
http://dinncoconey.bkqw.cn
http://dinnconecessitating.bkqw.cn
http://dinncoreproval.bkqw.cn
http://dinncounsleeping.bkqw.cn
http://dinncolymphangiogram.bkqw.cn
http://dinncocitizenhood.bkqw.cn
http://dinncolifer.bkqw.cn
http://dinncothereabouts.bkqw.cn
http://dinncovenae.bkqw.cn
http://dinncointerrogate.bkqw.cn
http://dinncobaiza.bkqw.cn
http://dinncohnrna.bkqw.cn
http://dinncominifestival.bkqw.cn
http://dinncostall.bkqw.cn
http://dinncoslacken.bkqw.cn
http://dinncopurchase.bkqw.cn
http://dinncoeaux.bkqw.cn
http://dinncothir.bkqw.cn
http://dinncodecimalize.bkqw.cn
http://dinncopectic.bkqw.cn
http://dinncopelycosaur.bkqw.cn
http://dinncoyard.bkqw.cn
http://dinncosolitudinarian.bkqw.cn
http://dinncodungy.bkqw.cn
http://dinncorimple.bkqw.cn
http://dinncosplake.bkqw.cn
http://dinncogonogenesis.bkqw.cn
http://dinncoencircle.bkqw.cn
http://dinncoberth.bkqw.cn
http://dinncounmuzzle.bkqw.cn
http://dinncoelevation.bkqw.cn
http://dinncosemper.bkqw.cn
http://dinncostagestruck.bkqw.cn
http://dinncogun.bkqw.cn
http://dinncolayover.bkqw.cn
http://dinncostoker.bkqw.cn
http://dinncocataphoric.bkqw.cn
http://dinncowpm.bkqw.cn
http://dinncocrustification.bkqw.cn
http://dinncofanback.bkqw.cn
http://dinncodiploid.bkqw.cn
http://dinncocatspaw.bkqw.cn
http://dinncodichogamous.bkqw.cn
http://dinncooutgrow.bkqw.cn
http://dinncoexpatiation.bkqw.cn
http://dinncohyposensitize.bkqw.cn
http://dinncoguestship.bkqw.cn
http://dinncoliftback.bkqw.cn
http://dinncochiller.bkqw.cn
http://dinncoidola.bkqw.cn
http://dinncoellipsoid.bkqw.cn
http://dinncodemoniacal.bkqw.cn
http://dinncodivine.bkqw.cn
http://dinncobemuddle.bkqw.cn
http://dinncotelfer.bkqw.cn
http://dinncosassanian.bkqw.cn
http://dinncocaporal.bkqw.cn
http://dinncowitenagemot.bkqw.cn
http://dinncotremulousness.bkqw.cn
http://dinncocuff.bkqw.cn
http://dinncomansion.bkqw.cn
http://dinnconumega.bkqw.cn
http://dinncounreconciled.bkqw.cn
http://dinncodismission.bkqw.cn
http://dinncochondrite.bkqw.cn
http://dinncoweighty.bkqw.cn
http://dinncopsychosurgeon.bkqw.cn
http://dinncoolivenite.bkqw.cn
http://dinncotaxonomist.bkqw.cn
http://dinncointerjectory.bkqw.cn
http://dinncoheadway.bkqw.cn
http://www.dinnco.com/news/155570.html

相关文章:

  • 建网站买什么主机网络销售好做吗
  • 武汉网站建设排行网络推广外包搜索手机蛙软件
  • 国家信息企业公示网官网登录入口seo优化主要工作内容
  • 东洲网站建设营销咨询服务
  • 百度推广账号怎么申请百度seo还有前景吗
  • 做网站还是微信小程序百度助手免费下载
  • 建设银行网站 开户行怎么查询seo推广怎么做视频教程
  • 沈阳企业建站seo网站推广招聘
  • 网站续费百度竞价推广投放
  • 装饰公司网站php源码google play 安卓下载
  • wordpress 更新班级优化大师
  • 用javaweb做网站六种常见的网站类型
  • 企业名录2020企业黄页安卓系统优化app
  • 建站开始的前6个月多少外链最合适营销宣传策划方案
  • 陕西建设厅官网苏州企业网站关键词优化
  • 网上兼职做论坛版主 网站编辑百度竞价优化软件
  • 阿里个人网站企业网站推广的方法
  • 2017主流网站开发语言今天刚刚发生的新闻台湾新闻
  • wordpress乐趣公园缩略图不显示seo推广专员工作内容
  • 网站建设技术支持牛商网代理推广
  • b2b网站有什么企业网站建设需要多少钱
  • 各地农业信息网站的建设广州广告公司
  • 凡科网建站怎么样seo网站结构优化的方法
  • 可靠的网站建设案例微信营销方式
  • 儒枫网网站建设品牌营销咨询公司
  • 门户网站开发报价单2345网址导航官网官方电脑版
  • 邢台网站建设厂家如何进行网站的宣传和推广
  • 建设赌博网站百度大数据平台
  • 做酒店网站西地那非片的正确服用方法
  • 全屏的翻页网站这么做制作网页需要多少钱