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

windows单节点验证victoriametrics结合AlertManger实现告警推送webhook

安装victoriametrics

https://docs.victoriametrics.com/single-server-victoriametrics/

下载地址

https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.113.0

找到​​victoria-metrics-windows-amd64-v1.113.0.zip​​

https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v1.113.0/victoria-metrics-windows-amd64-v1.113.0.zip

解压并在cmd里启动

victoria-metrics-windows-amd64-prod.exe

启动结果

......
2025-03-21T07:17:44.495Z        info    VictoriaMetrics/app/vmselect/promql/rollup_result_cache.go:156  loaded rollupResult cache from "victoria-metrics-data/cache/rollupResult" in 0.010 seconds; entriesCount: 0, sizeBytes: 0
2025-03-21T07:17:44.495Z        info    VictoriaMetrics/app/vmselect/prometheus/prometheus.go:1297      limiting -search.maxUniqueTimeseries to 8547304 according to -search.maxConcurrentRequests=16 and remaining memory=27351374234 bytes. To increase the limit, reduce -search.maxConcurrentRequests or increase memory available to the process.
2025-03-21T07:17:44.496Z        info    VictoriaMetrics/app/victoria-metrics/main.go:105        started VictoriaMetrics in 0.203 seconds
2025-03-21T07:17:44.500Z        info    VictoriaMetrics/lib/httpserver/httpserver.go:169        started server at http://0.0.0.0:8428/
2025-03-21T07:17:44.502Z        info    VictoriaMetrics/lib/httpserver/httpserver.go:171        pprof handlers are exposed at http://0.0.0.0:8428/debug/pprof/

访问​​

http://127.0.0.1:8428​​

安装vmutils-windows

vmutils-windows包里包含众多VictoriaMetrics组件

https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v1.113.0/vmutils-windows-amd64-v1.113.0.zip

解压​​vmutils-windows-amd64-v1.113.0.zip​​

启动vmagent

https://docs.victoriametrics.com/vmagent/

启动命令

vmagent-windows-amd64-prod.exe -promscrape.config=prometheus.yml -remoteWrite.url=http://127.0.0.1:8428/api/v1/write

安装victoriametrics

https://docs.victoriametrics.com/single-server-victoriametrics/

下载地址

https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.113.0

找到​​victoria-metrics-windows-amd64-v1.113.0.zip​​

https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v1.113.0/victoria-metrics-windows-amd64-v1.113.0.zip

解压并在cmd里启动

victoria-metrics-windows-amd64-prod.exe

启动结果

......
2025-03-21T07:17:44.495Z        info    VictoriaMetrics/app/vmselect/promql/rollup_result_cache.go:156  loaded rollupResult cache from "victoria-metrics-data/cache/rollupResult" in 0.010 seconds; entriesCount: 0, sizeBytes: 0
2025-03-21T07:17:44.495Z        info    VictoriaMetrics/app/vmselect/prometheus/prometheus.go:1297      limiting -search.maxUniqueTimeseries to 8547304 according to -search.maxConcurrentRequests=16 and remaining memory=27351374234 bytes. To increase the limit, reduce -search.maxConcurrentRequests or increase memory available to the process.
2025-03-21T07:17:44.496Z        info    VictoriaMetrics/app/victoria-metrics/main.go:105        started VictoriaMetrics in 0.203 seconds
2025-03-21T07:17:44.500Z        info    VictoriaMetrics/lib/httpserver/httpserver.go:169        started server at http://0.0.0.0:8428/
2025-03-21T07:17:44.502Z        info    VictoriaMetrics/lib/httpserver/httpserver.go:171        pprof handlers are exposed at http://0.0.0.0:8428/debug/pprof/

访问​​

http://127.0.0.1:8428​​

安装vmutils-windows

vmutils-windows包里包含众多VictoriaMetrics组件

https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v1.113.0/vmutils-windows-amd64-v1.113.0.zip

解压​​vmutils-windows-amd64-v1.113.0.zip​​

启动vmagent

https://docs.victoriametrics.com/vmagent/

启动命令

vmagent-windows-amd64-prod.exe -promscrape.config=prometheus.yml -remoteWrite.url=http://127.0.0.1:8428/api/v1/write

其中​​prometheus.yml​​​为prometheus配置文件;​​http://127.0.0.1:8428/api/v1/write​​为victoriametrics服务地址

prometheus.yml配置文件内容如下

global:scrape_interval: 15sscrape_configs:- job_name: "victoriametrics"static_configs:- targets: ["127.0.0.1:8429"]- job_name: "zookeeper"static_configs:- targets: ["127.0.0.1:7000"]- job_name: "mysql"static_configs:- targets: ["127.0.0.1:9104"]- job_name: "windows"static_configs:- targets: ["127.0.0.1:9182"]

启动日志如下

2025-03-21T07:32:48.747Z        info    VictoriaMetrics/app/vmagent/main.go:169 started vmagent in 0.380 seconds
2025-03-21T07:32:48.747Z        info    VictoriaMetrics/lib/promscrape/scraper.go:118   reading scrape configs from "prometheus.yml"
2025-03-21T07:32:48.748Z        info    VictoriaMetrics/lib/httpserver/httpserver.go:169        started server at http://0.0.0.0:8429/
2025-03-21T07:32:48.749Z        info    VictoriaMetrics/lib/httpserver/httpserver.go:171        pprof handlers are exposed at http://0.0.0.0:8429/debug/pprof/
2025-03-21T07:32:48.753Z        info    VictoriaMetrics/lib/promscrape/config.go:149    starting service discovery routines...
2025-03-21T07:32:48.754Z        info    VictoriaMetrics/lib/promscrape/config.go:155    started 5 service discovery routines in 0.001 seconds
2025-03-21T07:32:48.754Z        info    VictoriaMetrics/lib/promscrape/scraper.go:439   static_configs: added targets: 5, removed targets: 0; total targets: 5

启动vmalert

https://docs.victoriametrics.com/vmalert/

启动命令

vmalert-windows-amd64-prod.exe -rule=rule-first.yml -datasource.url=http://127.0.0.1:8428 -notifier.url=http://127.0.0.1:9093 -notifier.url=http://127.0.0.1:9093 -remoteWrite.url=http://127.0.0.1:8428 -remoteRead.url=http://127.0.0.1:8428 -external.label=cluster=east-1 -external.label=replica=a

其中rule-first.yml为规则文件;​​http://127.0.0.1:8428​​​为victoriametrics服务地址;​​http://127.0.0.1:9093​​为AlertManger地址。

rule-first.yml规则配置文件内容如下

groups:- name: InstanceDown_Rulerules:- alert: InstanceDown  # 告警名称expr: up == 0        # 告警条件for: 30s              # 告警触发前需要持续满足条件的时间labels:severity: critical # 告警的严重程度instance: "{{$labels.instance}}"annotations:summary: "Instance {{ $labels.instance }} down"description: "Instance {{ $labels.instance }} has been down for more than 30 seconds."

启动日志如下

......
2025-03-21T07:39:41.952Z        info    VictoriaMetrics/app/vmalert/config/log/logger.go:52     found 1 files to read from "Local FS{MatchPattern: \"rule-first.yml\"}"
2025-03-21T07:39:41.955Z        info    VictoriaMetrics/app/vmalert/config/log/logger.go:52     finished reading 1 files in 889.8µs from "Local FS{MatchPattern: \"rule-first.yml\"}"
2025-03-21T07:39:41.956Z        info    VictoriaMetrics/app/vmalert/rule/group.go:497   group "InstanceDown_Rule" will start in 8.357938405s; interval=1m0s; eval_offset=<nil>; concurrency=1
2025-03-21T07:39:41.959Z        info    VictoriaMetrics/lib/httpserver/httpserver.go:169        started server at http://0.0.0.0:8880/
2025-03-21T07:39:41.960Z        info    VictoriaMetrics/lib/httpserver/httpserver.go:171        pprof handlers are exposed at http://0.0.0.0:8880/debug/pprof/访问地址

http://127.0.0.1:8880/

部署AlertManger

下载AlertManger

https://github.com/prometheus/alertmanager/releases

下载地址

https://github.com/prometheus/alertmanager/releases/download/v0.28.1/alertmanager-0.28.1.windows-amd64.zip

解压并启动,启动命令如下

alertmanager.exe --config.file=alertmanager.yml --log.level=debug

其中alertmanager.yml为alertmanager的配置文件,配置文件内容如下:

route:
#  group_by: ['alertname', 'instance', 'job']group_by: [...]group_wait: 10sgroup_interval: 20srepeat_interval: 30sreceiver: 'web.hook'
receivers:- name: 'web.hook'webhook_configs:- url: 'http://127.0.0.1:5001/user/alert'send_resolved: true
#inhibit_rules:
#  - source_match:
#      severity: 'critical'
#    target_match:
#      severity: 'warning'
#    equal: ['alertname', 'instance', 'job']
global:resolve_timeout: 5m​​

http://127.0.0.1:5001/user/alert​​配置推送到应用服务的服务端点

启动日志如下

......
ts=2025-03-21T07:49:26.950Z caller=main.go:348 level=debug externalURL=http://P7507787A244:9093
ts=2025-03-21T07:49:26.951Z caller=coordinator.go:113 level=info component=configuration msg="Loading configuration file" file=alertmanager.yml
ts=2025-03-21T07:49:26.954Z caller=coordinator.go:126 level=info component=configuration msg="Completed loading of configuration file" file=alertmanager.yml
ts=2025-03-21T07:49:26.958Z caller=main.go:495 level=debug routePrefix=/
ts=2025-03-21T07:49:26.960Z caller=tls_config.go:313 level=info msg="Listening on" address=[::]:9093
ts=2025-03-21T07:49:26.962Z caller=tls_config.go:316 level=info msg="TLS is disabled." http2=false address=[::]:9093

访问地址

http://127.0.0.1:9093

其中​​prometheus.yml​​​为prometheus配置文件;​​http://127.0.0.1:8428/api/v1/write​​为victoriametrics服务地址

prometheus.yml配置文件内容如下

global:scrape_interval: 15sscrape_configs:- job_name: "victoriametrics"static_configs:- targets: ["127.0.0.1:8429"]- job_name: "zookeeper"static_configs:- targets: ["127.0.0.1:7000"]- job_name: "mysql"static_configs:- targets: ["127.0.0.1:9104"]- job_name: "windows"static_configs:- targets: ["127.0.0.1:9182"]

启动日志如下

2025-03-21T07:32:48.747Z        info    VictoriaMetrics/app/vmagent/main.go:169 started vmagent in 0.380 seconds
2025-03-21T07:32:48.747Z        info    VictoriaMetrics/lib/promscrape/scraper.go:118   reading scrape configs from "prometheus.yml"
2025-03-21T07:32:48.748Z        info    VictoriaMetrics/lib/httpserver/httpserver.go:169        started server at http://0.0.0.0:8429/
2025-03-21T07:32:48.749Z        info    VictoriaMetrics/lib/httpserver/httpserver.go:171        pprof handlers are exposed at http://0.0.0.0:8429/debug/pprof/
2025-03-21T07:32:48.753Z        info    VictoriaMetrics/lib/promscrape/config.go:149    starting service discovery routines...
2025-03-21T07:32:48.754Z        info    VictoriaMetrics/lib/promscrape/config.go:155    started 5 service discovery routines in 0.001 seconds
2025-03-21T07:32:48.754Z        info    VictoriaMetrics/lib/promscrape/scraper.go:439   static_configs: added targets: 5, removed targets: 0; total targets: 5

启动vmalert

https://docs.victoriametrics.com/vmalert/

启动命令

vmalert-windows-amd64-prod.exe -rule=rule-first.yml -datasource.url=http://127.0.0.1:8428 -notifier.url=http://127.0.0.1:9093 -notifier.url=http://127.0.0.1:9093 -remoteWrite.url=http://127.0.0.1:8428 -remoteRead.url=http://127.0.0.1:8428 -external.label=cluster=east-1 -external.label=replica=a

其中rule-first.yml为规则文件;​​http://127.0.0.1:8428​​​为victoriametrics服务地址;​​http://127.0.0.1:9093​​为AlertManger地址。

rule-first.yml规则配置文件内容如下

groups:- name: InstanceDown_Rulerules:- alert: InstanceDown  # 告警名称expr: up == 0        # 告警条件for: 30s              # 告警触发前需要持续满足条件的时间labels:severity: critical # 告警的严重程度instance: "{{$labels.instance}}"annotations:summary: "Instance {{ $labels.instance }} down"description: "Instance {{ $labels.instance }} has been down for more than 30 seconds."

启动日志如下

......
2025-03-21T07:39:41.952Z        info    VictoriaMetrics/app/vmalert/config/log/logger.go:52     found 1 files to read from "Local FS{MatchPattern: \"rule-first.yml\"}"
2025-03-21T07:39:41.955Z        info    VictoriaMetrics/app/vmalert/config/log/logger.go:52     finished reading 1 files in 889.8µs from "Local FS{MatchPattern: \"rule-first.yml\"}"
2025-03-21T07:39:41.956Z        info    VictoriaMetrics/app/vmalert/rule/group.go:497   group "InstanceDown_Rule" will start in 8.357938405s; interval=1m0s; eval_offset=<nil>; concurrency=1
2025-03-21T07:39:41.959Z        info    VictoriaMetrics/lib/httpserver/httpserver.go:169        started server at http://0.0.0.0:8880/
2025-03-21T07:39:41.960Z        info    VictoriaMetrics/lib/httpserver/httpserver.go:171        pprof handlers are exposed at http://0.0.0.0:8880/debug/pprof/

访问地址

http://127.0.0.1:8880/

部署AlertManger

下载AlertManger

https://github.com/prometheus/alertmanager/releases

下载地址

https://github.com/prometheus/alertmanager/releases/download/v0.28.1/alertmanager-0.28.1.windows-amd64.zip

解压并启动,启动命令如下

alertmanager.exe --config.file=alertmanager.yml --log.level=debug

其中alertmanager.yml为alertmanager的配置文件,配置文件内容如下:

route:
#  group_by: ['alertname', 'instance', 'job']group_by: [...]group_wait: 10sgroup_interval: 20srepeat_interval: 30sreceiver: 'web.hook'
receivers:- name: 'web.hook'webhook_configs:- url: 'http://127.0.0.1:5001/user/alert'send_resolved: true
#inhibit_rules:
#  - source_match:
#      severity: 'critical'
#    target_match:
#      severity: 'warning'
#    equal: ['alertname', 'instance', 'job']
global:resolve_timeout: 5m​​

http://127.0.0.1:5001/user/alert​​配置推送到应用服务的服务端点

启动日志如下

......
ts=2025-03-21T07:49:26.950Z caller=main.go:348 level=debug externalURL=http://P7507787A244:9093
ts=2025-03-21T07:49:26.951Z caller=coordinator.go:113 level=info component=configuration msg="Loading configuration file" file=alertmanager.yml
ts=2025-03-21T07:49:26.954Z caller=coordinator.go:126 level=info component=configuration msg="Completed loading of configuration file" file=alertmanager.yml
ts=2025-03-21T07:49:26.958Z caller=main.go:495 level=debug routePrefix=/
ts=2025-03-21T07:49:26.960Z caller=tls_config.go:313 level=info msg="Listening on" address=[::]:9093
ts=2025-03-21T07:49:26.962Z caller=tls_config.go:316 level=info msg="TLS is disabled." http2=false address=[::]:9093

访问地址

http://127.0.0.1:9093

相关文章:

windows单节点验证victoriametrics结合AlertManger实现告警推送webhook

安装victoriametrics https://docs.victoriametrics.com/single-server-victoriametrics/下载地址 https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.113.0找到​​victoria-metrics-windows-amd64-v1.113.0.zip​​ https://github.com/VictoriaMetric…...

鸿蒙保姆级教学

鸿蒙&#xff08;HarmonyOS&#xff09;是华为推出的一款面向全场景的分布式操作系统&#xff0c;支持手机、平板、智能穿戴、智能家居、车载设备等多种设备。鸿蒙系统的核心特点是分布式架构、一次开发多端部署和高性能。以下是从入门到大神级别的鸿蒙开发深度分析&#xff0c…...

w264民族婚纱预定系统

&#x1f64a;作者简介&#xff1a;多年一线开发工作经验&#xff0c;原创团队&#xff0c;分享技术代码帮助学生学习&#xff0c;独立完成自己的网站项目。 代码可以查看文章末尾⬇️联系方式获取&#xff0c;记得注明来意哦~&#x1f339;赠送计算机毕业设计600个选题excel文…...

Compose 实践与探索十五 —— 自定义触摸

1、自定义触摸与一维滑动监测 之前我们在讲 Modifier 时讲过如下与手势检测相关的 Modifier&#xff1a; Modifier.clickable { } Modifier.combinedClickable { } Modifier.pointerInput {detectTapGestures { } }这里对以上内容就不再赘述了&#xff0c;直接去讲解更复杂的…...

炫酷的3D按钮效果实现 - CSS3高级特性应用

炫酷的3D按钮效果实现 - CSS3高级特性应用 这里写目录标题 炫酷的3D按钮效果实现 - CSS3高级特性应用项目介绍核心技术实现1. 基础结构设计2. 视觉效果实现2.1 背景渐变2.2 立体感营造 3. 交互动效设计3.1 悬停效果3.2 按压效果 技术要点分析1. 深度层次感2. 动画过渡3. 性能优…...

Flutter小白零基础入门到高级项目实战全集

Flutter零基础入门到高级项目实战全集内容如下&#xff1a; Dart入门基础教程16讲、Null safety 、late 关键字、空类型声明符&#xff1f;、非空断言&#xff01;、required 、Flutter入门基础、Flutter瀑布流布局、Flutter动画、Flutter异步流、GlobalKey 、Flutter国际化、…...

teaming技术

一.介绍 在CentOS 6与RHEL 6系统中&#xff0c;双网卡绑定采用的是bonding技术。到了CentOS 7&#xff0c;不仅能继续沿用bonding&#xff0c;还新增了teaming技术。在此推荐使用teaming&#xff0c;因其在查看与监控方面更为便捷 。 二.原理 这里介绍两种最常见的双网卡绑定…...

前端开发:Vue以及Vue的路由

Vue是什么 警告&#xff1a;本文作者是底层程序员&#xff0c;对Vue只是偶尔用到&#xff0c;研究并不深入&#xff0c;对Vue的理解可能非常肤浅甚至存在错误&#xff0c;请多包含。以下文字只为外行记录分享&#xff0c;专业前端朋友可以略过。 作为一个底层老程序员&#x…...

【JavaEE进阶】Linux常用命令

目录 &#x1f343;前言 &#x1f334;pwd 与 ls &#x1f6a9;pwd &#x1f6a9;ls &#x1f38d;cd &#x1f332;mkdir与touch &#x1f6a9;mkdir &#x1f6a9;touch &#x1f340;cat与rm &#x1f6a9;cat &#x1f6a9;rm &#x1f38b;vim &#x1f6a9;…...

【FastGPT】利用知识库创建AI智能助手

【FastGPT】利用知识库创建AI智能助手 摘要创建知识库上传文档创建应用准备提示词准备开场白关联知识库AI回答效果 摘要 关于FastGPT的部署&#xff0c;官方提供了docker-compose方式的部署文档&#xff0c;如果使用的是podman和podman-compose的同学&#xff0c;可以参考这篇…...

【DeepSeek 学c++】dynamic_cast 原理

用于向下转化。 父类引用指向指类对象 假设父亲是a, 子类是b. B* pb new B; 子类对象 A* pa 父类引用指向子类对象&#xff0c; 那么向上转化 Apa pb 这个是自动完成的&#xff0c;隐式转化&#xff0c;不需要dynamic_cast 向下转化指的是 A pa new B。 这个是指向子类对象…...

设计一套水产养殖系统

设计一套水产养殖系统 引言 水产养殖在全球粮食安全和经济发展中日益重要。它不仅为不断增长的人口提供了重要的蛋白质来源&#xff0c;还在许多地区创造了就业机会并促进了经济增长 。全球超过一半的人类消费的海产品来自水产养殖&#xff0c;并且这一比例预计将继续上升 。…...

【递归,搜索与回溯算法篇】- 名词解释

一. 递归 1. 什么是递归&#xff1f; 定义&#xff1a; 函数自己调用自己的情况关键点&#xff1a; ➀终止条件&#xff1a; 必须明确递归出口&#xff0c;避免无限递归 ➁子问题拆分&#xff1a; 问题需能分解成结构相同的更小的子问题缺点&#xff1a; ➀栈溢出风险&#x…...

以mysql 为例, 在cmd 命令行连接数据,操作数据库,关闭数据库的详细步骤

以下是使用 Windows 命令行&#xff08;cmd&#xff09; 操作 MySQL 的详细步骤&#xff0c;涵盖 连接数据库、基本操作、关闭数据库 的全流程&#xff1a; 1. 确保 MySQL 服务已启动 步骤&#xff1a; 打开命令行&#xff08;cmd&#xff09; 按 Win R&#xff0c;输入 cmd&…...

【数学建模】TOPSIS法简介及应用

文章目录 TOPSIS法的基本原理TOPSIS法的基本步骤TOPSIS法的应用总结 在 多目标决策分析中&#xff0c;我们常常需要在多个选择中找到一个最优解。 TOPSIS&#xff08;Technique for Order Preference by Similarity to Ideal Solution&#xff09;法是一个广泛应用的决策方法…...

Beans模块之工厂模块注解模块@Qualifier

博主介绍&#xff1a;✌全网粉丝5W&#xff0c;全栈开发工程师&#xff0c;从事多年软件开发&#xff0c;在大厂呆过。持有软件中级、六级等证书。可提供微服务项目搭建与毕业项目实战&#xff0c;博主也曾写过优秀论文&#xff0c;查重率极低&#xff0c;在这方面有丰富的经验…...

清晰易懂的 Conda 彻底卸载与清理教程

一、Windows 系统卸载 Conda&#xff08;Anaconda/Miniconda&#xff09; 步骤 1&#xff1a;通过控制面板卸载主程序 打开 控制面板 → 程序 → 程序和功能。在列表中找到 Anaconda 或 Miniconda&#xff0c;右键选择 卸载。 提示&#xff1a;若安装的是 Miniconda 且未通过…...

pytorch小土堆学习有感

一、环境修改问题 pip install tensorboard pip uninstall tensorboard pip install tensorboard2.12.0 常用pip install torch来安装pytorch 版本合适才可以用的哈。 二、控制台和代码调试 变量可以在控制台方便查看 或者点行号左边打一个断点&#xff0c;便于使用deb…...

ChatTTS 开源文本转语音模型本地部署 API 使用和搭建 WebUI 界面

ChatTTS&#xff08;Chat Text To Speech&#xff09;&#xff0c;专为对话场景设计的文本生成语音(TTS)模型&#xff0c;适用于大型语言模型(LLM)助手的对话任务&#xff0c;以及诸如对话式音频和视频介绍等应用。支持中文和英文&#xff0c;还可以穿插笑声、说话间的停顿、以…...

【linux】统信操作系统修改默认编辑模式从nano改为vim

统信操作系统修改默认编辑模式从nano改为vim 适用命令update-alternatives --config editor rootuos-PC:~# update-alternatives --config editor 有 3 个候选项可用于替换 editor (提供 /usr/bin/editor)。选择 路径 优先级 状态 ---------------------…...

单一职责原则开闭原则其他开发原则

一、单一职责原则&#xff08;Single Responsibility Principle, SRP&#xff09; 定义 一个类应该有且仅有一个引起它变化的原因&#xff08;即一个类只负责一个职责&#xff09;。 核心思想 高内聚&#xff1a;类的功能高度集中 低耦合&#xff1a;减少不同职责之间的相互影…...

数据结构---图的深度优先遍历(DFS)

一、与树的深度优先遍历之间的联系 1.类似于树的先根遍历。 递归访问各个结点&#xff1a; 2.图的深度优先遍历 先设置一个数组&#xff0c;初始值全部设置为false&#xff0c;先访问一个结点&#xff0c;在用一个循环&#xff0c;依次检查和这个结点相邻的其他结点&#xff0c…...

健康养生:拥抱生活,从呵护身心开始

在这个瞬息万变的时代&#xff0c;人们好似不停旋转的陀螺&#xff0c;在忙碌中迷失了对健康的关注。然而&#xff0c;健康养生绝非可有可无的点缀&#xff0c;它是幸福生活的基石&#xff0c;如同阳光与空气&#xff0c;滋养并支撑着我们的生命。当我们懂得拥抱健康养生&#…...

基线定位系统:长基线与超短基线的原理与应用

基线定位系统&#xff1a;长基线与超短基线的原理与应用 在测量、导航、天文等领域&#xff0c;基线是两个已知位置之间的距离或方向&#xff0c;常用于三角测量、卫星定位等方法来确定其他位置的相对关系。本文将深入探讨长基线&#xff08;Long Baseline, LBL&#xff09;与…...

QT网页显示的几种方法及对比

一.直接跳转打开网页 1.使用QDesktopServices::openUrl调用系统浏览器 原理&#xff1a;直接调用操作系统默认浏览器打开指定URL&#xff0c;不在应用程序内嵌入网页。 优点&#xff1a; 实现简单&#xff0c;无需额外模块或依赖。 适用于仅需跳转外部浏览器的场景。 缺点&…...

深入浅出理解LLM PPO:基于verl框架的实现解析之一

1. 写在前面 强化学习(Reinforcement Learning,RL)在大型语言模型(Large Language Model,LLM)的训练中扮演着越来越重要的角色。特别是近端策略优化(Proximal Policy Optimization,PPO)算法,已成为对齐LLM与人类偏好的主流方法之一。本文将基于verl框架(很多复刻De…...

Linux python 安装 conda(内部自带的有python的版本了)

位置网站 https://repo.anaconda.com/miniconda/也可以在https://www.anaconda.com/download/success 官方下载之后方linux中 切换路径之后 执行 bash Miniconda3-py310_25.1.1-2-Linux-x86_64.sh [rootVM-4-5-centos ~]# [rootVM-4-5-centos ~]# uname -a Linux VM-4-5-cen…...

git原理与常用命令及其使用

认识工作区、暂存区、版本库 ⼯作区&#xff1a;是在电脑上你要写代码或⽂件的⽬录。 暂存区&#xff1a;英⽂叫 stage 或 index。⼀般存放在 .git ⽬录下的 index ⽂件&#xff08;.git/index&#xff09;中&#xff0c;我们 把暂存区有时也叫作索引&#xff08;index&#xf…...

19681 01背包

19681 01背包 ⭐️难度&#xff1a;中等 &#x1f31f;考点&#xff1a;动态规划、01背包 &#x1f4d6; &#x1f4da; import java.util.Arrays; import java.util.LinkedList; import java.util.Queue; import java.util.Scanner;public class Main {static int N 10001…...

Guava:Google开源的Java工具库,太强大了

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