ARM64环境部署EFK8.15.3收集K8S集群容器日志

环境规划

主机IP系统部署方式ES版本CPU架构用户名密码
192.168.1.225Ubuntu 22.04.4 LTSdockerelasticsearch:8.15.3ARM64elasticllodyi4TMmZD

ES集群部署

创建持久化目录(所有节点)
mkdir -p  /data/es/{data,certs,logs,plugins}
mkdir -p /data/es/certs/{ca,es01}
服务器优化/配置(所有节点)
#提高进程及资源使用限制上线
vim /etc/security/limits.conf* soft nofile 65536
* hard nofile 65536
* soft nproc 32000
* hard nproc 32000
* hard memlock unlimited
* soft memlock unlimitedvim /etc/systemd/system.confDefaultLimitNOFILE=65536
DefaultLimitNPROC=32000
DefaultLimitMEMLOCK=infinity#重载配置文件
systemctl daemon-reload
systemctl daemon-reexec #修改虚拟内存最大映射数
vim /etc/sysctl.conf#添加参数
vm.max_map_count = 262144#重新加载/etc/sysctl.conf配置
sysctl -p
创建证书elastic-certificates.p12文件
[root@llody-dev ~]#docker run -itd --name es01 swr.cn-southwest-2.myhuaweicloud.com/llody/elasticsearch:8.15.3  /bin/bash
c5ace1a6f5a6d1fa623cbebf96a75b9c9b6d71e3832d9973fff809848e8ae4ac
[root@llody-dev ~]#docker exec -it es01 /bin/bash
elasticsearch@c5ace1a6f5a6:~$ ./bin/elasticsearch-certutil ca
This tool assists you in the generation of X.509 certificates and certificate
signing requests for use with SSL/TLS in the Elastic stack.The 'ca' mode generates a new 'certificate authority'
This will create a new X.509 certificate and private key that can be used
to sign certificate when running in 'cert' mode.Use the 'ca-dn' option if you wish to configure the 'distinguished name'
of the certificate authorityBy default the 'ca' mode produces a single PKCS#12 output file which holds:* The CA certificate* The CA's private keyIf you elect to generate PEM format certificates (the -pem option), then the output will
be a zip file containing individual files for the CA certificate and private keyPlease enter the desired output file [elastic-stack-ca.p12]: 
Enter password for elastic-stack-ca.p12 : 
elasticsearch@c5ace1a6f5a6:~$ ./bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12 --dns es01 --ip 192.168.1.225  
This tool assists you in the generation of X.509 certificates and certificate
signing requests for use with SSL/TLS in the Elastic stack.The 'cert' mode generates X.509 certificate and private keys.* By default, this generates a single certificate and key for useon a single instance.* The '-multiple' option will prompt you to enter details for multipleinstances and will generate a certificate and key for each one* The '-in' option allows for the certificate generation to be automated by describingthe details of each instance in a YAML file* An instance is any piece of the Elastic Stack that requires an SSL certificate.Depending on your configuration, Elasticsearch, Logstash, Kibana, and Beatsmay all require a certificate and private key.* The minimum required value for each instance is a name. This can simply be thehostname, which will be used as the Common Name of the certificate. A fulldistinguished name may also be used.* A filename value may be required for each instance. This is necessary when thename would result in an invalid file or directory name. The name provided hereis used as the directory name (within the zip) and the prefix for the key andcertificate files. The filename is required if you are prompted and the nameis not displayed in the prompt.* IP addresses and DNS names are optional. Multiple values can be specified as acomma separated string. If no IP addresses or DNS names are provided, you maydisable hostname verification in your SSL configuration.* All certificates generated by this tool will be signed by a certificate authority (CA)unless the --self-signed command line option is specified.The tool can automatically generate a new CA for you, or you can provide your own withthe --ca or --ca-cert command line options.By default the 'cert' mode produces a single PKCS#12 output file which holds:* The instance certificate* The private key for the instance certificate* The CA certificateIf you specify any of the following options:* -pem (PEM formatted output)* -multiple (generate multiple certificates)* -in (generate certificates from an input file)
then the output will be be a zip file containing individual certificate/key filesEnter password for CA (elastic-stack-ca.p12) : 
Please enter the desired output file [elastic-certificates.p12]: 
Enter password for elastic-certificates.p12 : Certificates written to /usr/share/elasticsearch/elastic-certificates.p12This file should be properly secured as it contains the private key for 
your instance.
This file is a self contained file and can be copied and used 'as is'
For each Elastic product that you wish to configure, you should copy
this '.p12' file to the relevant configuration directory
and then follow the SSL configuration instructions in the product guide.For client applications, you may only need to copy the CA certificate and
configure the client to trust this certificate.
elasticsearch@c5ace1a6f5a6:~$ ls
LICENSE.txt  NOTICE.txt  README.asciidoc  bin  config  data  elastic-certificates.p12  elastic-stack-ca.p12  jdk  lib  logs  modules  plugins
elasticsearch@c5ace1a6f5a6:~$ pwd
/usr/share/elasticsearch
elasticsearch@c5ace1a6f5a6:~$ exit
exit

创建证书时。必须指定节点固定IP,否则证书将不可用。

拷贝加密文件到conf下(分发到所有节点)
[root@llody-dev ~]#docker cp es01:/usr/share/elasticsearch/elastic-stack-ca.p12 /data/es/certs/ca/ca.p12
[root@llody-dev ~]#docker cp es01:/usr/share/elasticsearch/elastic-certificates.p12 /data/es/certs/es01/es01.p12
[root@llody-dev ~]#openssl pkcs12 -in /data/es/certs/ca/ca.p12 -clcerts -nokeys -out /data/es/certs/ca/ca.crt
Enter Import Password:
MAC verified OK
[root@llody-dev ~]#openssl pkcs12 -in /data/es/certs/ca/ca.p12 -nocerts -nodes -out /data/es/certs/ca/ca.key
Enter Import Password:
MAC verified OK
[root@llody-dev ~]#openssl pkcs12 -in /data/es/certs/es01/es01.p12 -clcerts -nokeys -out /data/es/certs/es01/es01.crt
Enter Import Password:
MAC verified OK
[root@llody-dev ~]#openssl pkcs12 -in /data/es/certs/es01/es01.p12 -nocerts -nodes -out /data/es/certs/es01/es01.key
Enter Import Password:
MAC verified OK

密码与elastic密码保持一致即可。

数据目录授权
[root@llody-dev ~]#chown -R 1000:1000 /data/es/*
[root@llody-dev ~]#chmod 600 /data/es/certs/ca/*
[root@llody-dev ~]#chmod 600 /data/es/certs/es01/*
创建网络命名空间
[root@llody-dev ~]#docker network create elk
启动ElasticSearch服务

es01.yaml

# 创建运维目录
mkdir /root/shell
# 创建es01.yaml文件
vim /root/shell/es01.yaml
version: '3'services:es01:image: swr.cn-southwest-2.myhuaweicloud.com/llody/elasticsearch:8.15.3container_name: es01restart: alwaysports:- "9200:9200"- "9300:9300"environment:- node.name=es01- cluster.name=es-cluster- cluster.initial_master_nodes=es01- bootstrap.memory_lock=true- "ES_JAVA_OPTS=-Xms512m -Xmx512m"- xpack.security.enabled=true- xpack.security.http.ssl.enabled=true- xpack.security.http.ssl.key=certs/es01/es01.key- xpack.security.http.ssl.certificate=certs/es01/es01.crt- xpack.security.http.ssl.certificate_authorities=certs/ca/ca.crt- xpack.security.transport.ssl.enabled=true- xpack.security.transport.ssl.verification_mode=certificate- xpack.security.transport.ssl.key=certs/es01/es01.key- xpack.security.transport.ssl.certificate=certs/es01/es01.crt- xpack.security.transport.ssl.certificate_authorities=certs/ca/ca.crtuser: "1000:1000"ulimits:memlock:soft: -1hard: -1volumes:- /data/es/data/:/usr/share/elasticsearch/data- /data/es/logs/:/usr/share/elasticsearch/logs- /data/es/plugins/:/usr/share/elasticsearch/plugins- /data/es/certs:/usr/share/elasticsearch/config/certsnetworks:- elknetworks:elk:external: truename: elk
# es01节点启动
docker-compose -p es -f shell/es01.yml up -d

如果是集群,一定要使用固定IP,并在创建证书时进行指定。

设置密码
[root@llody-dev ~]#docker exec -it es01 /bin/bash
elasticsearch@437bd4edc09f:~$  /usr/share/elasticsearch/bin/elasticsearch-setup-passwords interactive -u https://192.168.1.225:9200
******************************************************************************
Note: The 'elasticsearch-setup-passwords' tool has been deprecated. This       command will be removed in a future release.
******************************************************************************Initiating the setup of passwords for reserved users elastic,apm_system,kibana,kibana_system,logstash_system,beats_system,remote_monitoring_user.
You will be prompted to enter passwords as the process progresses.
Please confirm that you would like to continue [y/N]yEnter password for [elastic]: 
Reenter password for [elastic]: 
Enter password for [apm_system]: 
Reenter password for [apm_system]: 
Enter password for [kibana_system]: 
Reenter password for [kibana_system]: 
Enter password for [logstash_system]: 
Reenter password for [logstash_system]: 
Enter password for [beats_system]: 
Reenter password for [beats_system]: 
Enter password for [remote_monitoring_user]: 
Reenter password for [remote_monitoring_user]: 
Changed password for user [apm_system]
Changed password for user [kibana_system]
Changed password for user [kibana]
Changed password for user [logstash_system]
Changed password for user [beats_system]
Changed password for user [remote_monitoring_user]
Changed password for user [elastic]
elasticsearch@437bd4edc09f:~$ exit
exit
查看状态
[root@llody-dev ~]#curl -k  -u elastic:llodyi4TMmZD https://192.168.1.225:9200/_cat/nodes?v
ip         heap.percent ram.percent cpu load_1m load_5m load_15m node.role   master name
172.18.0.2           32          56  10    0.22    0.42     0.43 cdfhilmrstw *      es01
[root@llody-dev ~]#curl --cacert /data/es/certs/ca/ca.crt -u elastic:llodyi4TMmZD -X GET "https://192.168.1.225:9200/_cluster/health?pretty"
{"cluster_name" : "es-cluster","status" : "green","timed_out" : false,"number_of_nodes" : 1,"number_of_data_nodes" : 1,"active_primary_shards" : 1,"active_shards" : 1,"relocating_shards" : 0,"initializing_shards" : 0,"unassigned_shards" : 0,"delayed_unassigned_shards" : 0,"number_of_pending_tasks" : 0,"number_of_in_flight_fetch" : 0,"task_max_waiting_in_queue_millis" : 0,"active_shards_percent_as_number" : 100.0
}

部署Kibana

配置Kibana与ES认证 证书
  1. 创建证书目录

    [root@llody-dev ~]#mkdir -p /data/kibana/certs
    
  2. 拷贝ES的ca证书

    [root@llody-dev ~/shell]#cp /data/es/certs/ca/ca.crt /data/kibana/certs/ca.crt
    
  3. 配置权限

    [root@llody-dev ~]#chown -R 1000:1000 /data/kibana
    [root@llody-dev ~]#chmod 600 /data/kibana/certs/*
    
配置kibana.yml文件
server.host: "0.0.0.0"
server.port: 5601
elasticsearch.requestTimeout: 60000
monitoring.ui.container.elasticsearch.enabled: true
elasticsearch.hosts: ["https://192.168.1.225:9200"]
elasticsearch.username: "kibana_system"
elasticsearch.password: "llodyi4TMmZD"
elasticsearch.ssl.certificateAuthorities: ["/usr/share/kibana/config/certs/ca.crt"]
i18n.locale: "zh-CN"
配置kibana.yaml
version: '3'services:kibana:image: swr.cn-southwest-2.myhuaweicloud.com/llody/kibana:8.15.3 container_name: kibanarestart: alwaysuser: "1000:1000"ports:- "5601:5601"volumes:- /data/kibana/certs:/usr/share/kibana/config/certs- /data/kibana/config/kibana.yml:/usr/share/kibana/config/kibana.ymlnetworks:- elknetworks:elk:external: truename: elk
[root@llody-dev ~]#docker-compose -p kibana -f /root/shell/kibana.yaml up -d

查看容器状态

容器状态

部署filebeat

Docker
创建数据目录
[root@dev-2 ~]# mkdir -p /data/fluentd/{certs,config}
[root@dev-2 ~]# tree /data/filebeat/
/data/filebeat/
├── certs
│   └── ca.crt
└── config└── filebeat.yml2 directories, 2 files

上传ES的ca证书到指定目录下。

配置filebeat.yml
filebeat.inputs:
- type: containerenabled: truestream: allformat: dockerpaths:- '/var/lib/docker/containers/*/*.log'multiline:# 做多行日志聚合,此处是针对java的异常堆栈信息聚合(所有非年-月-日开头的日志会被聚合到最开始匹配到的那一行展示)type: patternpattern: '^\d+.\d+.\d+|^\d+.\w{3}.\d+'negate: truematch: afterprocessors:- add_docker_metadata:host: "unix:///var/run/docker.sock"# 去掉不需要的字段- drop_fields:ignore_missing: true # 字段不存在时不报错fields: - agent.type.keyword- agent.type- agent.name- agent.id.keyword- agent.id- host.name- host.name.keyword- script:lang: javascripttimeout: 100source: > function process(event) { var s = event.Get('container.image.name');if (!s) {return event;}var sp = s.lastIndexOf('/');sp = sp < 0 ? 0 : sp + 1;var ep = s.indexOf(':');if (ep < 0) {event.Put('service', s.substring(sp));}event.Put('service', s.substring(sp, ep));}- drop_event:when: or:- contains:service: 'filebeat'output.elasticsearch:hosts: ["https://192.168.1.225:9200"]username: "elastic"password: "llodyi4TMmZD"# 传输压缩级别compression_level: 4ssl.certificate_authorities: ["/usr/share/filebeat/certs/ca.crt"]indices:# service会作为上报的日志文件的名字参与进去- index: "host-log-%{[service]}-%{+yyyy.MM.dd}"when.has_fields:- service- index: "host-log-default-%{+yyyy.MM.dd}"setup.template.enabled: false
setup.ilm.enabled: false
配置filebeat.yaml启动文件
version: '3'services:filebeat:image: swr.cn-southwest-2.myhuaweicloud.com/llody/filebeat:8.15.3container_name: filebeatrestart: alwaysuser: rootenvironment:- ELASTICSEARCH_HOSTS=https://192.168.1.225:9200- ELASTICSEARCH_USERNAME=elastic- ELASTICSEARCH_PASSWORD=llodyi4TMmZD- ELASTICSEARCH_SSL_CERTIFICATEAUTHORITIES=/usr/share/filebeat/certs/ca/ca.crtvolumes:- /var/lib/docker/containers:/var/lib/docker/containers- /var/run/docker.sock:/var/run/docker.sock- /etc/localtime:/etc/localtime:ro- /data/filebeat/config/filebeat.yml:/usr/share/filebeat/filebeat.yml- /data/filebeat/certs:/usr/share/filebeat/certsnetworks:- elknetworks:elk:external: truename: elk
部署
[root@dev-2 ~]# docker-compose -p filebeat -f /root/shell/filebeat.yaml up -d
WARN[0000] /root/shell/filebeat.yaml: `version` is obsolete 
[+] Running 1/1✔ Container filebeat  Started  
K8S
创建filebeat-dm.yaml文件
apiVersion: v1
kind: ConfigMap
metadata:name: filebeat-confignamespace: kube-system
data:filebeat.yml: |filebeat.inputs:- type: containerenabled: truestream: allformat: dockerpaths:- /var/log/containers/*_dev_*.logprocessors:- add_kubernetes_metadata:in_cluster: truematchers:- logs_path:logs_path: "/var/log/containers/"output.elasticsearch:hosts: ["https://192.168.1.225:9200"]username: "elastic"password: "llodyi4TMmZD"compression_level: 4ssl.certificate_authorities: ["/usr/share/filebeat/certs/ca.crt"]indices:- index: "k8s-log-%{[kubernetes.namespace]}-%{[kubernetes.pod.name]}-%{+yyyy.MM.dd}"when.has_fields:- kubernetes.namespace- kubernetes.pod.name- index: "k8s-log-default-%{+yyyy.MM.dd}"setup.template.enabled: falsesetup.ilm.enabled: false
---
apiVersion: v1
kind: ConfigMap
metadata:name: filebeat-es-canamespace: kube-system
data:ca.crt: |Bag AttributesfriendlyName: calocalKeyID: 54 69 6D 65 20 31 37 33 31 34 38 34 39 36 33 35 39 39 subject=/CN=Elastic Certificate Tool Autogenerated CAissuer=/CN=Elastic Certificate Tool Autogenerated CA-----BEGIN CERTIFICATE-----MIIDSjCCAjKgAwIBAgIVAPrLZp0pnA1sbAZRSsG0l5E+O9d5MA0GCSqGSIb3DQEBCwUAMDQxMjAwBgNVBAMTKUVsYXN0aWMgQ2VydGlmaWNhdGUgVG9vbCBBdXRvZ2VuZXJhdGVkIENBMB4XDTI0MTExMzA4MDIzMFoXDTI3MTExMzA4MDIzMFowNDEyMDAGA1UEAxMpRWxhc3RpYyBDZXJ0aWZpY2F0ZSBUb29sIEF1dG9nZW5lcmF0ZWQgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDVDUcg4ABSs7M984pxvw1Fg329j6FOxBk+NtmBWkMEl9aou0qMVcXGCBIp1MxGnhVSuxhDPG1hS3hX5PlfNGJMgzvymW6oVf6+SiTqbSTl+psEbSeZyK2nzrTEOfyB+lEZ11+Owo0XwTVSVqKUj5B1KaRBbBOo5O99eo97Rv8HkbVVlCD1R4TCJqQXh29c8RZuMFQ8DacqvH6Gwj1YvntmRT/QudQja1vED85MiSFPY8LdOrDHqzEhTY3scqC5gPrc/C7XJSbE+cfkPk56OEEUBCSZBiY8DR4b+30SiyZ3Miu4xUU/HRdLn1CtpZ6c8xooJipddInPlloyy3K0F24fAgMBAAGjUzBRMB0GA1UdDgQWBBT3xLSl9WS6321QvOUbP1qnzC9j8TAfBgNVHSMEGDAWgBT3xLSl9WS6321QvOUbP1qnzC9j8TAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAfFkd4ocTbZhtb456E9p+eR25HX1CqhOXOUfKTCy48qXCvq3uXmCxUJY/4+oeMFtv2DLYUi9cZ3BMzjGpXVGlKPhTGat+aELUgCTvf6YelniveAYktjcDmc6VPrIzIZ9PcH+6BhTykgO6cV0MRgo4R0K3u+QydhokzX3cpiAGHbgHPDM2NF2tNYVKsOK0x8XrRVHZa75ZLsClkePtqWmWKcQ5Qh8vt8dDv8GCHPi95AiitIEXNEBfStwNV+xFmQdfbjO5KAilXJdYnbdN/t2xQt9xJBHQ3t+tAWNdXoY6reXui/EftuD/YRKSJT0GMtC98HlpHP/gVv5kMXkKwMPqI-----END CERTIFICATE-----
---
apiVersion: apps/v1
kind: DaemonSet
metadata:name: filebeatnamespace: kube-systemlabels:k8s-app: filebeat
spec:selector:matchLabels:k8s-app: filebeattemplate:metadata:labels:k8s-app: filebeatspec:serviceAccountName: filebeatterminationGracePeriodSeconds: 30containers:- name: filebeatimage: swr.cn-southwest-2.myhuaweicloud.com/llody/filebeat:8.15.3args: ["--strict.perms=false",  # 忽略权限问题"-c", "/usr/share/filebeat/filebeat.yml","-e",]env:- name: NODE_NAMEvalueFrom:fieldRef:fieldPath: spec.nodeNamesecurityContext:runAsUser: 0resources:limits:memory: 200Mirequests:cpu: 100mmemory: 100MivolumeMounts:- name: configmountPath: /usr/share/filebeat/filebeat.ymlsubPath: filebeat.yml- name: varlibdockercontainersmountPath: /var/lib/docker/containersreadOnly: true- name: varlogmountPath: /var/logreadOnly: true- name: certsmountPath: /usr/share/filebeat/certsreadOnly: truevolumes:- name: configconfigMap:defaultMode: 0600name: filebeat-config- name: certsconfigMap:defaultMode: 0600name: filebeat-es-ca- name: varlibdockercontainershostPath:path: /var/lib/docker/containers- name: varloghostPath:path: /var/log---
apiVersion: v1
kind: ServiceAccount
metadata:name: filebeatnamespace: kube-system---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:name: filebeat
subjects:
- kind: ServiceAccountname: filebeatnamespace: kube-system
roleRef:kind: ClusterRolename: filebeatapiGroup: rbac.authorization.k8s.io---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:name: filebeatlabels:k8s-app: filebeat
rules:
- apiGroups: [""]resources:- namespaces- podsverbs:- get- watch- list

注意:

1、挂载了filebeat.yml文件和ES的ca证书文件。

2、只收集dev命名空间日志,如要收集所有日志修改paths:/var/log/containers/*.log

3、创建的K8S集群日志索引规则:k8s-log-命名空间-容器名称-时间

部署
[root@node1 ~]#kubectl apply -f es/filebeat-dm.yaml 
configmap/filebeat-config configured
configmap/filebeat-es-ca unchanged
daemonset.apps/filebeat unchanged
serviceaccount/filebeat unchanged
clusterrolebinding.rbac.authorization.k8s.io/filebeat unchanged
clusterrole.rbac.authorization.k8s.io/filebeat unchanged
服务状态

在这里插入图片描述

验证日志上传

索引管理

在这里插入图片描述
在这里插入图片描述

主机Docker索引规则:host-log-容器名称-时间

K8S集群索引规则:k8s-log-命名空间-容器名称-时间

创建视图

在这里插入图片描述

Discover查看创建的视图

在这里插入图片描述
在这里插入图片描述

java报错日志查询示例

在这里插入图片描述

总结

EFK可以非常方便的收集容器的日志,可以通过设置部分指标提供告警等功能,后续再出实践,如果有帮助欢迎一键三连。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.xdnf.cn/news/18877.html

如若内容造成侵权/违法违规/事实不符,请联系一条长河网进行投诉反馈,一经查实,立即删除!

相关文章

【网络安全 | 漏洞挖掘】邮件HTML注入

文章目录 Email 中的 HTML 注入漏洞漏洞挖掘过程1. 初步信息收集2. 发现私信功能3. 功能测试与 HTML 注入测试测试步骤请求拦截与分析4. 绕过防护机制绕过方法附加威胁漏洞影响漏洞报告与奖励Email 中的 HTML 注入漏洞 HTML 注入是一种安全漏洞,攻击者通过将任意 HTML 标签注…

《自定义类型:结构体》

1. 结构体回顾 结构体的声明 结构体的初始化 2. 结构体的特殊声明 匿名结构体&#xff1a; 不需要给结构体名字&#xff0c;但是只能使用一次。 这里的使用一次具体是什么意思呢&#xff0c;刚开始学的时候我自己的理解是有误解的&#xff0c;下面给出一个示例; 注意&…

基于Java Springboot城市公交运营管理系统

一、作品包含 源码数据库设计文档万字PPT全套环境和工具资源部署教程 二、项目技术 前端技术&#xff1a;Html、Css、Js、Vue、Element-ui 数据库&#xff1a;MySQL 后端技术&#xff1a;Java、Spring Boot、MyBatis 三、运行环境 开发工具&#xff1a;IDEA/eclipse 数据…

【杂谈】无人机测绘技术知识

无人机测绘技术知识 随着科技技术的不断进步和低空经济的快速推进&#xff0c;无人机技术已经从最初的军事侦察、航拍娱乐&#xff0c;逐渐深入到各个行业领域&#xff0c;其中无人机测绘技术&#xff08;航空摄影测量&#xff09;更是凭借其高效、精准、灵活的特性&#xff0…

数据挖掘复习

一、绪论 分类 classify 上涨或跌 回归 regression 描述具体数值 分类模型评估 1.混淆&#xff08;误差&#xff09;矩阵 confusion matrix 2.ROC曲线 receiver operating characteristic curve 接收者操作特征曲线 3.AUC面积 area under curve ROC曲线下与坐标轴围成的面…

Springboot 整合 Java DL4J 构建股票预测系统

&#x1f9d1; 博主简介&#xff1a;CSDN博客专家&#xff0c;历代文学网&#xff08;PC端可以访问&#xff1a;https://literature.sinhy.com/#/literature?__c1000&#xff0c;移动端可微信小程序搜索“历代文学”&#xff09;总架构师&#xff0c;15年工作经验&#xff0c;…

ZSTD 内存泄漏问题

优质博文&#xff1a;IT-BLOG-CN Zstandard&#xff08;简称zstd&#xff09;是一种无损压缩算法&#xff0c;由Facebook开发并开源。它旨在提供高压缩比和高解压速度的平衡&#xff0c;适用于多种数据压缩需求。 特点 【1】高压缩比&#xff1a; zstd能够在保持较高压缩比的…

嵌入式硬件电子电路设计(五)LDO低压差线性稳压器全面详解

引言&#xff1a; LDO&#xff08;Low Dropout Regulator&#xff0c;低压差线性稳压器&#xff09;是一种常用的电源管理组件&#xff0c;用于提供稳定的输出电压&#xff0c;同时允许较小的输入电压与输出电压之间的差值。LDO广泛应用于各种电子设备中&#xff0c;特别是在对…

D3基础:绘制圆形、椭圆形、多边形、线、路径、矩形

在D3.js中&#xff0c;可以通过SVG元素来创建各种几何图形。以下是D3.js中常用的几何图形及其简单的创建方法&#xff1a; 1. 圆形 (Circle) 圆形是最基本的形状之一&#xff0c;可以通过<circle>标签来创建。 <!DOCTYPE html> <html> <head><met…

17.100ASK_T113-PRO 配置QT运行环境(三)

前言 1.打开QT,新建项目. 做成以下效果,会QT都没有问题吧 编译输出: /home/book/LED_and_TempHumi/build-LED_and_TempHumi-100ask-Debug LED_and_TempHumi 2.下载程序与测试 设置运行环境 export QT_QPA_PLATFORMlinuxfb 这个地方还需要加字体,不然不会显示字体.

React 实现网页首页设计

目录 页面分解 项目初始化 项目结构 运行项目 页面分解 页面主要元素&#xff1a; Header&#xff08;导航栏&#xff09; 包含网站 logo 和导航菜单。Hero Section&#xff08;主横幅&#xff09; 大背景图片、标题文字、描述文字。Features Section&#xff08;功能展示…

[Go实战]:SSE消息推送

前言 在现代Web开发中&#xff0c;前后端分离已成为主流趋势。为了实现实时数据推送&#xff0c;Server-Sent Events (SSE) 是一种高效且易于实现的技术。本文将介绍如何在Go语言中实现SSE服务端&#xff0c;并在前端使用JavaScript进行集成&#xff0c;实现一个完整的实时数据…

使用OkHttp进行HTTPS请求的Kotlin实现

OkHttp简介 OkHttp是一个高效的HTTP客户端&#xff0c;它支持同步和异步请求&#xff0c;自动处理重试和失败&#xff0c;支持HTTPS&#xff0c;并且可以轻松地与Kotlin协程集成。OkHttp的设计目标是提供最简洁的API&#xff0c;同时保持高性能和低延迟。 为什么选择OkHttp …

【技术解析】Dolphinscheduler实现MapReduce任务的高效管理

MapReduce是一种编程模型&#xff0c;用于处理和生成大数据集&#xff0c;主要用于大规模数据集&#xff08;TB级数据规模&#xff09;的并行运算。本文详细介绍了Dolphinscheduler在MapReduce任务中的应用&#xff0c;包括GenericOptionsParser与args的区别、hadoop jar命令参…

Linux :进程间通信之管道

一、进程间通信 1.1 是什么和为什么 1、进程间通信是什么&#xff1f;&#xff1f; ——>两个或多个进程实现数据层面的交互&#xff0c;但是由于进程独立性的存在&#xff0c;导致通信的成本比较高。 2、既然通信成本高&#xff0c;那为什么还要通信呢&#xff1f;&…

Vue基础(2)_el和data的两种写法

举例&#xff1a; <div id"root"><h1>你好&#xff0c;{{name}}</h1> </div> el和data的2种写法 1.el有2种写法 (1).new Vue时候配置el属性。 // 第一种写法&#xff1a;new Vue时候配置el属性。// 优点&#xff1a;简单、直接new Vue({e…

【汇编语言】数据处理的两个基本问题(二) —— 解密汇编语言:数据长度与寻址方式的综合应用

文章目录 前言1. 指令要处理的数据有多长&#xff1f;1.1 通过寄存器指明数据的尺寸1.1.1 字操作1.1.2 字节操作 1.2 用操作符X ptr指明内存单元的长度1.2.1 访问字单元1.2.2 访问字节单元1.2.3 为什么要用操作符X ptr指明 1.3 其他方法 2. 寻址方式的综合应用2.1 问题背景&…

c++多态(深度刨析)

C系列-----多态 文章目录 C系列-----多态前言一、多态的概念二、多态的定义及实现2.1、多态构成的条件2.1.1、虚函数2.1.2、虚函数的重写 2.2、C11 override 和 final2.3、重载、覆盖(重写)、隐藏(重定义)的对比2.4、抽象类2.5、 接口继承和实现继承 三、多态的原理3.1、虚函数…

FPGA开发技能(9)快速生成约束XDC文件

文章目录 1.从Cadence导出csv约束文件2.python程序将csv导出为xdc文件。3.python生成exe4.exe使用注意事项5.传送门 前言&#xff1a; 作为一名FPGA工程师&#xff0c;通常公司会对该岗位的人有一定的硬件能力的要求&#xff0c;最基础的就是需要依据原理图的设计进行FPGA工程内…

css uniapp背景图宽度固定高度自适应可以重复

page {height: 100%;background-image: url(https://onlinekc.a.hlidc.cn/uploads/20241115/350f94aaf493d05625a7ddbc86c7804e.png);background-repeat: repeat;background-size: contain;} 如果不要重复 把background-repeat: repeat;替换background-repeat: no-repeat;