从零开始的云计算生活——番外5,使用ELK实现对应用日志的监控

目录

一.环境准备

试验机安装

修改文件配置

二.收集测试机(test)日志

配置pipline文件

配置filebeat配置文件

三.收集测试机nginx日志

下载安装nginx

修改filebeat文件

修改pipline文件

四.收集网络服务模块日志

1.DHCP

下载dhcp

修改配置文件 

修改dhcp配置文件

配置logstash文件 

配置filebeat文件 

重启应用查看kibana

2.DNS

修改配置文件(/etc/named.conf)

创建日志目录并赋权 

​编辑配置filebeat文件

​编辑 配置logstash文件

全部启动后在kibana查看日志

3.SSH

配置文件

Filebeat配置

Logstash配置

重启应用

检查kibana

4.Rsync

配置rsync

Filebeat配置

logstash配置

五.收集Tomcat服务日志

1.安装tomcat

2.Tomcat启动验证

3.配置filebeat文件

4.配置logstash文件

5.重启服务查看kibana

六.MySQL数据库日志收集

1.安装MySQL

2.编辑MySQL日志生成配置

3.启动mysql并验证日志生成

4.配置filebeat文件

5.配置logstash文件

6.重启服务查看kibana

七.NFS日志收集

1.安装NFS

2.启用NFS日志

验证配置:

3.配置filebeat文件

4.配置logstash文件

5.重启服务查看kibana

八.Redis数据库日志收集

1.安装redis数据库

2.Redis日志生成配置

3.配置filebeat文件

4.配置logstash文件

5.重启服务查看kibana

九.LVS日志收集

1.下载安装ipvsadm

2.配置rsyslog文件

2.配置filebeat文件

3.配置logstash文件

十.Haproxy日志收集

1.安装haproxy

2.配置haproxy文件

3.配置Rsyslog收集HAProxy日志

4.修改filebeat文件

5.修改logstash文件

6.重启全部服务,登录kibana查看日志

十一.Keepalived日志收集

1.安装keepalived

2.配置keepalived日志输出

3.测试日志生成

4.修改filebeat文件

5.修改logstash文件

6.重启全部服务,检查kibana

十二.汇总


一.环境准备

角色主机名IP地址
图形展示kibana192.168.71.178
日志存储es192.168.71.179
日志收集分析lostash192.168.71.180
日志采集test192.168.71.181

试验机安装

分别安装elasticsearch,logstash,kibana,filebeat

优化logstash命令

ln -s /usr/share/logstash/bin/logstash /usr/local/bin/

修改文件配置

elasticsearch:

kibana:

可以正常登录5601端口 

编写pipline文件

 初始文件内容

input {file {path => "/var/log/messages"start_position => "beginning"}
}
output {elasticsearch {hosts => ["http://192.168.71.179:9200"]index => "system-log-%{+YYYY.MM.dd}"}stdout {codec => rubydebug}
}

运行logstash获取日志,并在kibana查看

成功运行,并且成功获取日志

二.收集测试机(test)日志

配置pipline文件

新加一个端口(未使用的都可以)

input {file {path => "/var/log/messages"start_position => "beginning"}beats {port => 5044}
}
filter {if [host][name] {mutate { add_field => { "hostname" => "%{[host][name]}" } }}else if [agent][hostname] {mutate { add_field => { "hostname" => "%{[agent][hostname]}" } }}else {mutate { add_field => { "hostname" => "%{host}" } }}
}
output {if [hostname] ==  "logstash" {elasticsearch {hosts => ["192.168.71.179:9200"]index => "system-log-%{+YYYY.MM.dd}"}
}else if [hostname] ==  "test" {elasticsearch {hosts => ["192.168.71.179:9200"]index => "test-log-%{+YYYY.MM.dd}"}
}stdout {codec => rubydebug}
}

配置filebeat配置文件

将false改为ture打开该功能,然后填写日志路径

将ES注释掉并打开logstash

修改完成后启动logstash,此时再次查看kibana发现多出test上的日志文件。

三.收集测试机nginx日志

下载安装nginx

修改filebeat文件

修改pipline文件

在test下新增如下内容

登录nginx(不改主页会有一个错误日志)

登录查看kibana,生成日志文件

四.收集网络服务模块日志

1.DHCP

下载dhcp

将完整dhcpd.conf文件复制过来

修改配置文件 

修改dhcp配置文件

全部删除,只保留以下字段 

修改/etc/rsyslog.conf,指向dhcpd.log(日志文件)

配置logstash文件 

配置filebeat文件 

重启应用查看kibana

2.DNS

下载DNS(bind)

修改配置文件(/etc/named.conf)

logging {channel default_debug {file "data/named.run";severity dynamic;};channel dns_log {file "/var/log/named/dns.log" versions 3 size 20m;severity dynamic;print-time yes;};category default { dns_log; };category queries { dns_log; };
};

创建日志目录并赋权 

配置filebeat文件

 配置logstash文件

全部启动后在kibana查看日志

3.SSH

ssh的日志文件路径为/var/log/secure

配置文件

Filebeat配置

Logstash配置

重启应用

检查kibana

4.Rsync

配置rsync

下载rsync

创建服务配置文件

sudo tee /usr/lib/systemd/system/rsyncd.service <<'EOF'
[Unit]
Description=fast remote file copy program daemon
Documentation=man:rsyncd(8)
After=network.target[Service]
EnvironmentFile=/etc/sysconfig/rsyncd
ExecStart=/usr/bin/rsync --daemon --no-detach $OPTIONS[Install]
WantedBy=multi-user.target
EOF

创建环境配置文件

sudo tee /etc/sysconfig/rsyncd <<'EOF'
# Options for rsync daemon
OPTIONS=""
EOF

创建主配置文件

sudo tee /etc/rsyncd.conf <<'EOF'
# 最小化配置示例
uid = root
gid = root
use chroot = yes
max connections = 4
pid file = /var/run/rsyncd.pid# 示例模块
[backup]path = /tmp/backupcomment = Backup Arearead only = no
EOF

创建日志文件并赋权:

启动服务

Filebeat配置

logstash配置

重启服务,使用rsync命令向目标主机传输文件以生成日志

在kibana上查看

五.收集Tomcat服务日志

1.安装tomcat

解压安装包

Tomcat安装

优化启动和关闭命令

2.Tomcat启动验证

3.配置filebeat文件

4.配置logstash文件

5.重启服务查看kibana

六.MySQL数据库日志收集

1.安装MySQL

2.编辑MySQL日志生成配置

编辑MySQL配置文件(/etc/my.cnf/etc/mysql/mysql.conf.d/mysqld.cnf

[mysqld]
general_log = 1
general_log_file = /var/log/mysql/general.log
slow_query_log = 1
slow_query_log_file = /var/log/mysql/slow.log
long_query_time = 2  # 慢查询阈值(秒)

3.启动mysql并验证日志生成

4.配置filebeat文件

5.配置logstash文件

6.重启服务查看kibana

通用日志和慢日志

七.NFS日志收集

1.安装NFS

2.启用NFS日志

编辑NFS配置文件(通常为/etc/nfs.conf/etc/sysconfig/nfs),确保日志模块启用并指定路径

配置rsyslog.log文件,为nfs增加日志路径

创建日志文件

在NFS配置中指定facility

重启rsyslog服务

验证配置:

发送测试日志(使用local4 facility),检查日志是否生成

3.配置filebeat文件

4.配置logstash文件

5.重启服务查看kibana

八.Redis数据库日志收集

1.安装redis数据库

2.Redis日志生成配置

修改Redis配置文件
编辑/etc/redis.conf,启用日志并指定路径:

验证日志生成

3.配置filebeat文件

4.配置logstash文件

5.重启服务查看kibana

九.LVS日志收集

1.下载安装ipvsadm

2.配置rsyslog文件

在/etc/rsyslog.conf内加入

kern.*    /var/log/lvs.log

手动触发LVS日志生成

通过模拟请求触发LVS转发,使系统产生日志:

curl http://<VIP>  # 替换为你的虚拟IP(VIP)

或在另一台机器访问VIP服务。

或者可以手动添加规则使日志内容增加

ifconfig ens34:0 192.168.71.200/24 #生成临时网址ipvsadm -a -t 192.168.71.200:80 -s rr
ipvsadm -E -t 192.168.71.200:80 -s rr -p 60
ipvsadm -a -t 192.168.71.200:80 -r 192.168.1.101:80 -g
ipvsadm -a -t 192.168.71.200:80 -r 192.168.1.102:80 -g

查看日志内容是否生成

2.配置filebeat文件

3.配置logstash文件

4.重启服务后查看kibana

十.Haproxy日志收集

1.安装haproxy

2.配置haproxy文件

cat > /etc/haproxy/haproxy.cfg <<'EOF'
globallog 127.0.0.1 local0 info  # 重要:使用local0设备defaultslog     globalmode    httpoption  httplogoption  dontlognulltimeout connect 5000timeout client  50000timeout server  50000# 添加您的具体frontend/backend配置
# frontend示例:
frontend http-inbind *:80default_backend serversbackend serversserver server1 192.168.1.100:80 check
EOF

3.配置Rsyslog收集HAProxy日志

创建文件 /etc/rsyslog.d/haproxy.conf

$ModLoad imudp
$UDPServerRun 514
local0.* /var/log/haproxy.log  # 本地存储
local0.* @logstash_ip:5140     # 转发到Logstash

4.修改filebeat文件

5.修改logstash文件

6.重启全部服务,登录kibana查看日志

十一.Keepalived日志收集

1.安装keepalived

2.配置keepalived日志输出

创建日志目录

sudo mkdir -p /var/log/keepalived
sudo touch /var/log/keepalived/keepalived.log
sudo chown -R root:keepalived /var/log/keepalived

编辑keepalived配置文件,

vim /etc/sysconfig/keepalived

添加以下行

KEEPALIVED_OPTIONS="-D -d -S 0"

 配置rsyslog,在文件末尾添加

local0.* /var/log/keepalived/keepalived.log

重启服务

3.测试日志生成

4.修改filebeat文件

5.修改logstash文件

6.重启全部服务,检查kibana

十二.汇总

logstash

经过全部配置后,logstash上的pipline.conf全部内容如下

input {file {path => "/var/log/messages"start_position => "beginning"}beats {port => 5044}
}
filter {if [host][name] {mutate { add_field => { "hostname" => "%{[host][name]}" } }}else if [agent][hostname] {mutate { add_field => { "hostname" => "%{[agent][hostname]}" } }}else {mutate { add_field => { "hostname" => "%{host}" } }}
}
output {if [hostname] ==  "logstash" {elasticsearch {hosts => ["192.168.71.179:9200"]index => "system-log-%{+YYYY.MM.dd}"}
}else if [hostname] ==  "test" {if "system" in [tags] {elasticsearch {hosts => ["192.168.71.179:9200"]index => "test-log-%{+YYYY.MM.dd}"}}if "nginx-access" in [tags] {elasticsearch {hosts => ["192.168.71.179:9200"]index => "nginx-access-log-%{+YYYY.MM.dd}"}}if "nginx-error" in [tags] {elasticsearch {hosts => ["192.168.71.179:9200"]index => "nginx-error-log-%{+YYYY.MM.dd}"}}if "dhcp" in [tags] {elasticsearch {hosts => ["192.168.71.179:9200"]index => "dhcp-log-%{+YYYY.MM.dd}"}}if "dns" in [tags] {elasticsearch {hosts => ["192.168.71.179:9200"]index => "dns-log-%{+YYYY.MM.dd}"}}if "ssh" in [tags] {elasticsearch {hosts => ["192.168.71.179:9200"]index => "ssh-log-%{+YYYY.MM.dd}"}}if "rsyncd" in [tags] {elasticsearch {hosts => ["192.168.71.179:9200"]index => "rsyncd-log-%{+YYYY.MM.dd}"}}if "tomcat" in [tags] {elasticsearch {hosts => ["192.168.71.179:9200"]index => "tomcat-log-%{+YYYY.MM.dd}"}}
}if "mysql" in [tags] {elasticsearch {hosts => ["192.168.71.179:9200"]index => "mysql-log-%{+YYYY.MM.dd}"}}if "mysql-slow" in [tags] {elasticsearch {hosts => ["192.168.71.179:9200"]index => "mysql-slow-log-%{+YYYY.MM.dd}"}}if "nfs" in [tags] {elasticsearch {hosts => ["192.168.71.179:9200"]index => "nfs-log-%{+YYYY.MM.dd}"}}if "redis" in [tags] {elasticsearch {hosts => ["192.168.71.179:9200"]index => "redis-log-%{+YYYY.MM.dd}"}}if "lvs" in [tags] {elasticsearch {hosts => ["192.168.71.179:9200"]index => "lvs-log-%{+YYYY.MM.dd}"}}if "haproxy" in [tags] {elasticsearch {hosts => ["192.168.71.179:9200"]index => "haproxy-log-%{+YYYY.MM.dd}"}}if "keepalived" in [tags] {elasticsearch {hosts => ["192.168.71.179:9200"]index => "keepalived-log-%{+YYYY.MM.dd}"}}stdout {codec => rubydebug}
}

filebeat

filebeat上的filebeat.yml内容如下

###################### Filebeat Configuration Example ########################## This file is an example configuration file highlighting only the most common
# options. The filebeat.reference.yml file from the same directory contains all the
# supported options with more comments. You can use it as a reference.
#
# You can find the full configuration reference here:
# https://www.elastic.co/guide/en/beats/filebeat/index.html# For more available modules and options, please see the filebeat.reference.yml sample
# configuration file.#=========================== Filebeat inputs =============================filebeat.inputs:# Each - is an input. Most options can be set at the input level, so
# you can use different inputs for various configurations.
# Below are the input specific configurations.
- type: log# Change to true to enable this input configuration.enabled: true# Paths that should be crawled and fetched. Glob based paths.paths:- /var/log/messages#tags: "system"  #- c:\programdata\elasticsearch\logs\*
- type: logenabled: truepaths:- /var/log/nginx/access.logtags: "nginx-access"  
- type: logenabled: truepaths:- /var/log/nginx/error.logtags: "nginx-error"  
- type: logenabled: truepaths:- /var/log/dhcpd.logtags: "dhcp"  
- type: logenabled: truepaths:- /var/log/named/dns.logtags: "dns"  
- type: logenabled: truepaths:- /var/log/securetags: "ssh"  
- type: logenabled: truepaths:- /var/log/rsyncd.logtags: "rsyncd"  
- type: logenabled: truepaths:- /usr/local/tomcat8/logs/*.logtags: "tomcat"  
- type: logenabled: truepaths:- /var/log/mysql/general.logtags: "mysql"  
- type: logenabled: truepaths:- /var/log/mysql/slow.logtags: "mysql-slow"  
- type: logenabled: truepaths:- /var/log/nfs.logtags: "nfs"  
- type: logenabled: truepaths:- /var/log/redis/redis.logtags: "redis"  
- type: logenabled: truepaths:- /var/log/lvs.logtags: "lvs"  
- type: logenabled: truepaths:- /var/log/haproxy.logtags: "haproxy"  
- type: logenabled: truepaths:- /var/log/keepalived/keepalived.logtags: "keepalived"  # Exclude lines. A list of regular expressions to match. It drops the lines that are# matching any regular expression from the list.#exclude_lines: ['^DBG']# Include lines. A list of regular expressions to match. It exports the lines that are# matching any regular expression from the list.#include_lines: ['^ERR', '^WARN']# Exclude files. A list of regular expressions to match. Filebeat drops the files that# are matching any regular expression from the list. By default, no files are dropped.#exclude_files: ['.gz$']# Optional additional fields. These fields can be freely picked# to add additional information to the crawled log files for filtering#fields:#  level: debug#  review: 1### Multiline options# Multiline can be used for log messages spanning multiple lines. This is common# for Java Stack Traces or C-Line Continuation# The regexp Pattern that has to be matched. The example pattern matches all lines starting with [#multiline.pattern: ^\[# Defines if the pattern set under pattern should be negated or not. Default is false.#multiline.negate: false# Match can be set to "after" or "before". It is used to define if lines should be append to a pattern# that was (not) matched before or after or as long as a pattern is not matched based on negate.# Note: After is the equivalent to previous and before is the equivalent to to next in Logstash#multiline.match: after#============================= Filebeat modules ===============================filebeat.config.modules:# Glob pattern for configuration loadingpath: ${path.config}/modules.d/*.yml# Set to true to enable config reloadingreload.enabled: false# Period on which files under path should be checked for changes#reload.period: 10s#==================== Elasticsearch template setting ==========================setup.template.settings:index.number_of_shards: 1#index.codec: best_compression#_source.enabled: false#================================ General =====================================# The name of the shipper that publishes the network data. It can be used to group
# all the transactions sent by a single shipper in the web interface.
#name:# The tags of the shipper are included in their own field with each
# transaction published.
#tags: ["service-X", "web-tier"]# Optional fields that you can specify to add additional information to the
# output.
#fields:
#  env: staging#============================== Dashboards =====================================
# These settings control loading the sample dashboards to the Kibana index. Loading
# the dashboards is disabled by default and can be enabled either by setting the
# options here or by using the `setup` command.
#setup.dashboards.enabled: false# The URL from where to download the dashboards archive. By default this URL
# has a value which is computed based on the Beat name and version. For released
# versions, this URL points to the dashboard archive on the artifacts.elastic.co
# website.
#setup.dashboards.url:#============================== Kibana =====================================# Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API.
# This requires a Kibana endpoint configuration.
setup.kibana:# Kibana Host# Scheme and port can be left out and will be set to the default (http and 5601)# In case you specify and additional path, the scheme is required: http://localhost:5601/path# IPv6 addresses should always be defined as: https://[2001:db8::1]:5601#host: "localhost:5601"# Kibana Space ID# ID of the Kibana Space into which the dashboards should be loaded. By default,# the Default Space will be used.#space.id:#============================= Elastic Cloud ==================================# These settings simplify using filebeat with the Elastic Cloud (https://cloud.elastic.co/).# The cloud.id setting overwrites the `output.elasticsearch.hosts` and
# `setup.kibana.host` options.
# You can find the `cloud.id` in the Elastic Cloud web UI.
#cloud.id:# The cloud.auth setting overwrites the `output.elasticsearch.username` and
# `output.elasticsearch.password` settings. The format is `<user>:<pass>`.
#cloud.auth:#================================ Outputs =====================================# Configure what output to use when sending the data collected by the beat.#-------------------------- Elasticsearch output ------------------------------
#output.elasticsearch:
#  # Array of hosts to connect to.
#  # hosts: ["localhost:9200"]
# hosts: ["192.168.71.179:9200"]
# indices:
#  - index: "LVS-logs"
#    when:
#     contains:
#      { "message": "ipvs"}
#setup.ilm.enabled: false
#setup.template.name: "LVS"
#setup.template.pattern: "LVS-*"# Optional protocol and basic auth credentials.#protocol: "https"#username: "elastic"#password: "changeme"#----------------------------- Logstash output --------------------------------
output.logstash:# The Logstash hostshosts: ["192.168.71.180:5044"]# Optional SSL. By default is off.# List of root certificates for HTTPS server verifications#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]# Certificate for SSL client authentication#ssl.certificate: "/etc/pki/client/cert.pem"# Client Certificate Key#ssl.key: "/etc/pki/client/cert.key"#================================ Processors =====================================# Configure processors to enhance or manipulate events generated by the beat.processors:- add_host_metadata: ~- add_cloud_metadata: ~#================================ Logging =====================================# Sets log level. The default log level is info.
# Available log levels are: error, warning, info, debug
#logging.level: debug# At debug level, you can selectively enable logging only for some components.
# To enable all selectors use ["*"]. Examples of other selectors are "beat",
# "publish", "service".
#logging.selectors: ["*"]#============================== Xpack Monitoring ===============================
# filebeat can export internal metrics to a central Elasticsearch monitoring
# cluster.  This requires xpack monitoring to be enabled in Elasticsearch.  The
# reporting is disabled by default.# Set to true to enable the monitoring reporter.
#xpack.monitoring.enabled: false# Uncomment to send the metrics to Elasticsearch. Most settings from the
# Elasticsearch output are accepted here as well. Any setting that is not set is
# automatically inherited from the Elasticsearch output configuration, so if you
# have the Elasticsearch output configured, you can simply uncomment the
# following line.
#xpack.monitoring.elasticsearch:#================================= Migration ==================================# This allows to enable 6.7 migration aliases
#migration.6_to_7.enabled: true

kibana

kibana总览

 

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Node.js:函数、路由、全局对象

Node.js函数 在JavaScript中&#xff0c;一个函数可以作为另一个函数的参数&#xff0c;可以先定义一个函数&#xff0c;然后进行传递&#xff0c;也可以在传参的地方直接定义 function sayhello(){console.log("hello"); } function run(hello, value){hello();cons…

2025暑期—06神经网络-常见网络3

VGG16网络64个卷积核做两次卷积&#xff0c;填充后编程224X224X64 pooling 两次卷 pooling 三次卷...分辨率降低一半&#xff0c;通道数增加1倍所有卷积核都是3x3, 所有的pooling 都是2x2残差网络每一层的块都有越层的连接。

使用 FastAPI 构建 Elasticsearch API

作者&#xff1a;来自 Elastic Jeffrey Rengifo 学习如何使用 Pydantic 模式和 FastAPI 后台任务&#xff0c;通过实际示例构建一个 Elasticsearch API。 想获得 Elastic 认证吗&#xff1f;查看下一期 Elasticsearch Engineer 培训的时间&#xff01; Elasticsearch 拥有丰富…

[2025CVPR-目标检测方向]FSHNet:一种用于3D物体检测的全稀疏混合网络。

1. ​简介​ 论文提出了FSHNet&#xff08;Fully Sparse Hybrid Network&#xff09;&#xff0c;一种用于3D物体检测的全稀疏混合网络。FSHNet旨在解决现有稀疏3D检测器的两大核心问题&#xff1a;长距离交互能力弱和网络优化困难。稀疏检测器&#xff08;如VoxelNeXt和SAFDN…

MySql 8.0.42 zip版安装教程和使用

今天要装个MySQL&#xff0c;就按照自己以前的教程来做&#xff0c;不知道是不是版本更新了的原因&#xff0c;又遇到了一点小阻碍&#xff0c;于是再记录一下吧。 下载MySQL 下载链接&#xff1a;MySQL :: Download MySQL Community Serverhttps://dev.mysql.com/downloads/…

【lucene】实现knn

在 Lucene 中&#xff0c;可以通过 KnnFloatVectorQuery 和 KnnFloatVectorField 来实现 KNN&#xff08;k-Nearest Neighbors&#xff09;搜索。以下是具体介绍&#xff1a;1. 功能原理KnnFloatVectorQuery 是 Lucene 用于执行最近邻搜索的查询类&#xff0c;它可以在一个字段…

RabbitMQ实践学习笔记

RabbitMQ实践 以下是关于RabbitMQ实践的整理,涵盖常见场景和示例代码(基于Markdown格式)。内容按模块分类,避免步骤词汇,直接提供可操作的方法: 基础连接与队列声明 使用Python的pika库建立连接并声明队列: import pikaconnection = pika.BlockingConnection(pika.C…

量子生成对抗网络:量子计算与生成模型的融合革命

引言&#xff1a;当生成对抗网络遇上量子计算在人工智能与量子计算双重浪潮的交汇处&#xff0c;量子生成对抗网络&#xff08;Quantum Generative Adversarial Networks, QGAN&#xff09;正成为突破经典算力瓶颈的关键技术。传统生成对抗网络&#xff08;GAN&#xff09;在图…

VBA 多个选项,将选中的选项录入当前选中的单元格

1、使用LISTBOX插件&#xff0c;选中后回车录入 维护好数据&#xff0c;并新增一个activeX列表框插件 Private Sub Worksheet_SelectionChange(ByVal Target As Range)If Target.Count > 1 Then Exit SubIf Target.Row > 2 And Target.Row < 10 And Target.Column 2…

【NLP舆情分析】基于python微博舆情分析可视化系统(flask+pandas+echarts) 视频教程 - 主页-微博点赞量Top6实现

大家好&#xff0c;我是java1234_小锋老师&#xff0c;最近写了一套【NLP舆情分析】基于python微博舆情分析可视化系统(flaskpandasecharts)视频教程&#xff0c;持续更新中&#xff0c;计划月底更新完&#xff0c;感谢支持。今天讲解主页-微博点赞量Top6实现 视频在线地址&…

SAP调用外部API

SAP需求将中文字符转化为对应的拼音具体思路,由于sap中没有将中文字符转化为拼音的函数或方法类,则以http请求访问外部服务器发布的API服务,然后获取其返回值即可1.调用外部网站上提供的api缺点:免费次数有限,后需要充值这里是用www格式的json报文*&----------------------…

(12)机器学习小白入门YOLOv:YOLOv8-cls 模型微调实操

YOLOv8-cls 模型微调实操 (1)机器学习小白入门YOLOv &#xff1a;从概念到实践 (2)机器学习小白入门 YOLOv&#xff1a;从模块优化到工程部署 (3)机器学习小白入门 YOLOv&#xff1a; 解锁图片分类新技能 (4)机器学习小白入门YOLOv &#xff1a;图片标注实操手册 (5)机器学习小…

基于Matlab传统图像处理技术的车辆车型识别与分类方法研究

随着计算机视觉和图像处理技术的发展&#xff0c;车辆检测与识别已经成为智能交通系统中的一个重要研究方向。传统图像处理方法通过对图像进行预处理、特征提取、分类与识别&#xff0c;提供了一种无需复杂深度学习模型的解决方案。本研究基于MATLAB平台&#xff0c;采用传统图…

未来趋势:LeafletJS 与 Web3/AI 的融合

引言 LeafletJS 作为一个轻量、灵活的 JavaScript 地图库&#xff0c;以其模块化设计和高效渲染能力在 Web 地图开发中占据重要地位。随着 Web3 和人工智能&#xff08;AI&#xff09;的兴起&#xff0c;地图应用的开发范式正在发生变革。Web3 技术&#xff08;如区块链、去中…

Spring AI 系列之二十一 - EmbeddingModel

之前做个几个大模型的应用&#xff0c;都是使用Python语言&#xff0c;后来有一个项目使用了Java&#xff0c;并使用了Spring AI框架。随着Spring AI不断地完善&#xff0c;最近它发布了1.0正式版&#xff0c;意味着它已经能很好的作为企业级生产环境的使用。对于Java开发者来说…

LFU算法及优化

继上一篇的LRU算法的实现和讲解&#xff0c;这一篇来讲述LFU最近使用频率高的数据很大概率将会再次被使用,而最近使用频率低的数据,将来大概率不会再使用。做法&#xff1a;把使用频率最小的数据置换出去。这种算法更多是从使用频率的角度&#xff08;但是当缓存满时&#xff0…

关于原车一键启动升级手机控车的核心信息及注意事项

想知道如何给原车已经有一键启动功能的车辆加装手机远程启动。这是个很实用的汽车改装需求&#xff0c;尤其适合想在冬天提前热车、夏天提前开空调的车主。一、适配方案与核心功能 ‌升级专车专用4G手机控车模块‌&#xff0c;推荐安装「移动管家YD361-3」系统&#xff0c;该方…

数据结构与算法:类C语言有关操作补充

数据结构与算法:类C语言操作补充 作为老师,我将详细讲解类C语言(如C或C++)中的关键操作,包括动态内存分配和参数传递。这些内容在数据结构与算法中至关重要,例如在实现动态数组、链表或高效函数调用时。我会用通俗易懂的语言和代码示例逐步解释,确保你轻松掌握。内容基…

Go 并发(协程,通道,锁,协程控制)

一.协程&#xff08;Goroutine&#xff09;并发&#xff1a;指程序能够同时执行多个任务的能力&#xff0c;多线程程序在一个核的cpu上运行&#xff0c;就是并发。并行&#xff1a;多线程程序在多个核的cpu上运行&#xff0c;就是并行。并发主要由切换时间片来实现"同时&q…

图机器学习(15)——链接预测在社交网络分析中的应用

图机器学习&#xff08;15&#xff09;——链接预测在社交网络分析中的应用0. 链接预测1. 数据处理2. 基于 node2vec 的链路预测3. 基于 GraphSAGE 的链接预测3.1 无特征方法3.2 引入节点特征4. 用于链接预测的手工特征5. 结果对比0. 链接预测 如今&#xff0c;社交媒体已成为…