Prometheus+Grafana监控

news2024/10/5 14:21:26

1、简介

1.1 Prometheus

官网地址:https://prometheus.io/

Prometheus是一个开源的监控系统,起源于SoundCloud。它由以下几个核心组件构成:

  • 数据爬虫: 根据配置的时间定期的通过HTTP抓去metrics数据。

  • time-series 数据库: 存储所有的metrics数据。

  • 简单的用户交互接口: 可视化、查询和监控所有的metrics。

1.2 Grafana

官网地址:https://grafana.com/

Grafana使你能够把来自不同数据源比如Elasticsearch, Prometheus, Graphite, influxDB等多样的数据以绚丽的图标展示出来。它也能基于你的metrics数据发出告警。当一个告警状态改变时,它能通知你通过email,slack或者其他途径。

Grafana是一个开源的度量分析与可视化套件,纯JavaScript开发的前端工具,通过访问库(如InfluxDB),展示自定义报表、显示图表等。它的UI十分灵活,有丰富的插件和模板,功能强大。一般用在时序数据的监控方面。

2、项目

2.1 引入依赖

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

<dependency>
    <groupId>io.micrometer</groupId>
    <artifactId>micrometer-registry-prometheus</artifactId>
    <scope>runtime</scope>
</dependency>

2.2 配置文件

management:
  metrics:
    tags:
      application: ${spring.application.name}
    export:
      prometheus:
        enabled: true
  #开启暴露web
  endpoints:
    web:
      exposure:
        include: prometheus

2.3 访问地址

http://localhost:8080/actuator/prometheus

# HELP jvm_gc_memory_promoted_bytes_total Count of positive increases in the size of the old generation memory pool before GC to after GC
# TYPE jvm_gc_memory_promoted_bytes_total counter
jvm_gc_memory_promoted_bytes_total{application="prometheus-demo",} 3765576.0
# HELP executor_queue_remaining_tasks The number of additional elements that this queue can ideally accept without blocking
# TYPE executor_queue_remaining_tasks gauge
executor_queue_remaining_tasks{application="prometheus-demo",name="applicationTaskExecutor",} 2.147483647E9
# HELP jvm_gc_pause_seconds Time spent in GC pause
# TYPE jvm_gc_pause_seconds summary
jvm_gc_pause_seconds_count{action="end of minor GC",application="prometheus-demo",cause="Allocation Failure",} 1.0
jvm_gc_pause_seconds_sum{action="end of minor GC",application="prometheus-demo",cause="Allocation Failure",} 0.012
jvm_gc_pause_seconds_count{action="end of major GC",application="prometheus-demo",cause="Ergonomics",} 1.0
jvm_gc_pause_seconds_sum{action="end of major GC",application="prometheus-demo",cause="Ergonomics",} 0.078
# HELP jvm_gc_pause_seconds_max Time spent in GC pause
# TYPE jvm_gc_pause_seconds_max gauge
jvm_gc_pause_seconds_max{action="end of minor GC",application="prometheus-demo",cause="Allocation Failure",} 0.012
jvm_gc_pause_seconds_max{action="end of major GC",application="prometheus-demo",cause="Ergonomics",} 0.078
# HELP tomcat_sessions_active_current_sessions  
# TYPE tomcat_sessions_active_current_sessions gauge
tomcat_sessions_active_current_sessions{application="prometheus-demo",} 0.0
# HELP jvm_threads_daemon_threads The current number of live daemon threads
# TYPE jvm_threads_daemon_threads gauge
jvm_threads_daemon_threads{application="prometheus-demo",} 15.0
# HELP process_files_max_files The maximum file descriptor count
# TYPE process_files_max_files gauge
process_files_max_files{application="prometheus-demo",} 65535.0
# HELP http_server_requests_seconds Duration of HTTP server request handling
# TYPE http_server_requests_seconds summary
http_server_requests_seconds_count{application="prometheus-demo",exception="None",method="GET",outcome="SUCCESS",status="200",uri="/actuator",} 1.0
http_server_requests_seconds_sum{application="prometheus-demo",exception="None",method="GET",outcome="SUCCESS",status="200",uri="/actuator",} 0.017622173
http_server_requests_seconds_count{application="prometheus-demo",exception="None",method="GET",outcome="SUCCESS",status="200",uri="/actuator/prometheus",} 8.0
http_server_requests_seconds_sum{application="prometheus-demo",exception="None",method="GET",outcome="SUCCESS",status="200",uri="/actuator/prometheus",} 0.14188689
http_server_requests_seconds_count{application="prometheus-demo",exception="None",method="GET",outcome="CLIENT_ERROR",status="404",uri="/**",} 2.0
http_server_requests_seconds_sum{application="prometheus-demo",exception="None",method="GET",outcome="CLIENT_ERROR",status="404",uri="/**",} 0.020303186
# HELP http_server_requests_seconds_max Duration of HTTP server request handling
# TYPE http_server_requests_seconds_max gauge
http_server_requests_seconds_max{application="prometheus-demo",exception="None",method="GET",outcome="SUCCESS",status="200",uri="/actuator",} 0.017622173
http_server_requests_seconds_max{application="prometheus-demo",exception="None",method="GET",outcome="SUCCESS",status="200",uri="/actuator/prometheus",} 0.093066747
http_server_requests_seconds_max{application="prometheus-demo",exception="None",method="GET",outcome="CLIENT_ERROR",status="404",uri="/**",} 0.017153903
# HELP jvm_gc_memory_allocated_bytes_total Incremented for an increase in the size of the (young) heap memory pool after one GC to before the next
# TYPE jvm_gc_memory_allocated_bytes_total counter
jvm_gc_memory_allocated_bytes_total{application="prometheus-demo",} 8.0216064E7
# HELP jvm_threads_live_threads The current number of live threads including both daemon and non-daemon threads
# TYPE jvm_threads_live_threads gauge
jvm_threads_live_threads{application="prometheus-demo",} 19.0
# HELP tomcat_sessions_active_max_sessions  
# TYPE tomcat_sessions_active_max_sessions gauge
tomcat_sessions_active_max_sessions{application="prometheus-demo",} 0.0
# HELP jvm_threads_states_threads The current number of threads
# TYPE jvm_threads_states_threads gauge
jvm_threads_states_threads{application="prometheus-demo",state="runnable",} 5.0
jvm_threads_states_threads{application="prometheus-demo",state="new",} 0.0
jvm_threads_states_threads{application="prometheus-demo",state="timed-waiting",} 2.0
jvm_threads_states_threads{application="prometheus-demo",state="blocked",} 0.0
jvm_threads_states_threads{application="prometheus-demo",state="waiting",} 12.0
jvm_threads_states_threads{application="prometheus-demo",state="terminated",} 0.0
# HELP jvm_classes_loaded_classes The number of classes that are currently loaded in the Java virtual machine
# TYPE jvm_classes_loaded_classes gauge
jvm_classes_loaded_classes{application="prometheus-demo",} 7335.0
# HELP process_uptime_seconds The uptime of the Java virtual machine
# TYPE process_uptime_seconds gauge
process_uptime_seconds{application="prometheus-demo",} 134.962
# HELP executor_queued_tasks The approximate number of tasks that are queued for execution
# TYPE executor_queued_tasks gauge
executor_queued_tasks{application="prometheus-demo",name="applicationTaskExecutor",} 0.0
# HELP process_files_open_files The open file descriptor count
# TYPE process_files_open_files gauge
process_files_open_files{application="prometheus-demo",} 28.0
# HELP process_cpu_usage The "recent cpu usage" for the Java Virtual Machine process
# TYPE process_cpu_usage gauge
process_cpu_usage{application="prometheus-demo",} 0.003040668947168377
# HELP disk_total_bytes Total space for path
# TYPE disk_total_bytes gauge
disk_total_bytes{application="prometheus-demo",path="/root/project/prometheus/share/prometheus/prometheus-demo/target/.",} 8.4416294912E10
# HELP application_started_time_seconds Time taken (ms) to start the application
# TYPE application_started_time_seconds gauge
application_started_time_seconds{application="prometheus-demo",main_application_class="com.ybw.PrometheusDemoApplication",} 3.1
# HELP system_load_average_1m The sum of the number of runnable entities queued to available processors and the number of runnable entities running on the available processors averaged over a period of time
# TYPE system_load_average_1m gauge
system_load_average_1m{application="prometheus-demo",} 0.04
# HELP disk_free_bytes Usable space for path
# TYPE disk_free_bytes gauge
disk_free_bytes{application="prometheus-demo",path="/root/project/prometheus/share/prometheus/prometheus-demo/target/.",} 6.4089042944E10
# HELP process_start_time_seconds Start time of the process since unix epoch.
# TYPE process_start_time_seconds gauge
process_start_time_seconds{application="prometheus-demo",} 1.676960826636E9
# HELP application_ready_time_seconds Time taken (ms) for the application to be ready to service requests
# TYPE application_ready_time_seconds gauge
application_ready_time_seconds{application="prometheus-demo",main_application_class="com.ybw.PrometheusDemoApplication",} 3.135
# HELP jvm_memory_used_bytes The amount of used memory
# TYPE jvm_memory_used_bytes gauge
jvm_memory_used_bytes{application="prometheus-demo",area="heap",id="PS Survivor Space",} 522208.0
jvm_memory_used_bytes{application="prometheus-demo",area="heap",id="PS Old Gen",} 1.1626216E7
jvm_memory_used_bytes{application="prometheus-demo",area="nonheap",id="Metaspace",} 3.7158344E7
jvm_memory_used_bytes{application="prometheus-demo",area="nonheap",id="Code Cache",} 9744256.0
jvm_memory_used_bytes{application="prometheus-demo",area="heap",id="PS Eden Space",} 8.0009112E7
jvm_memory_used_bytes{application="prometheus-demo",area="nonheap",id="Compressed Class Space",} 5006064.0
# HELP jvm_gc_live_data_size_bytes Size of long-lived heap memory pool after reclamation
# TYPE jvm_gc_live_data_size_bytes gauge
jvm_gc_live_data_size_bytes{application="prometheus-demo",} 1.1626216E7
# HELP jvm_buffer_count_buffers An estimate of the number of buffers in the pool
# TYPE jvm_buffer_count_buffers gauge
jvm_buffer_count_buffers{application="prometheus-demo",id="mapped",} 0.0
jvm_buffer_count_buffers{application="prometheus-demo",id="direct",} 10.0
# HELP jvm_memory_committed_bytes The amount of memory in bytes that is committed for the Java virtual machine to use
# TYPE jvm_memory_committed_bytes gauge
jvm_memory_committed_bytes{application="prometheus-demo",area="heap",id="PS Survivor Space",} 2621440.0
jvm_memory_committed_bytes{application="prometheus-demo",area="heap",id="PS Old Gen",} 1.6252928E7
jvm_memory_committed_bytes{application="prometheus-demo",area="nonheap",id="Metaspace",} 4.0108032E7
jvm_memory_committed_bytes{application="prometheus-demo",area="nonheap",id="Code Cache",} 1.015808E7
jvm_memory_committed_bytes{application="prometheus-demo",area="heap",id="PS Eden Space",} 9.2274688E7
jvm_memory_committed_bytes{application="prometheus-demo",area="nonheap",id="Compressed Class Space",} 5505024.0
# HELP tomcat_sessions_created_sessions_total  
# TYPE tomcat_sessions_created_sessions_total counter
tomcat_sessions_created_sessions_total{application="prometheus-demo",} 0.0
# HELP executor_pool_size_threads The current number of threads in the pool
# TYPE executor_pool_size_threads gauge
executor_pool_size_threads{application="prometheus-demo",name="applicationTaskExecutor",} 0.0
# HELP executor_completed_tasks_total The approximate total number of tasks that have completed execution
# TYPE executor_completed_tasks_total counter
executor_completed_tasks_total{application="prometheus-demo",name="applicationTaskExecutor",} 0.0
# HELP system_cpu_usage The "recent cpu usage" of the system the application is running in
# TYPE system_cpu_usage gauge
system_cpu_usage{application="prometheus-demo",} 0.01596351197263398
# HELP executor_pool_core_threads The core number of threads for the pool
# TYPE executor_pool_core_threads gauge
executor_pool_core_threads{application="prometheus-demo",name="applicationTaskExecutor",} 8.0
# HELP jvm_memory_max_bytes The maximum amount of memory in bytes that can be used for memory management
# TYPE jvm_memory_max_bytes gauge
jvm_memory_max_bytes{application="prometheus-demo",area="heap",id="PS Survivor Space",} 2621440.0
jvm_memory_max_bytes{application="prometheus-demo",area="heap",id="PS Old Gen",} 1.32120576E9
jvm_memory_max_bytes{application="prometheus-demo",area="nonheap",id="Metaspace",} -1.0
jvm_memory_max_bytes{application="prometheus-demo",area="nonheap",id="Code Cache",} 2.5165824E8
jvm_memory_max_bytes{application="prometheus-demo",area="heap",id="PS Eden Space",} 6.53787136E8
jvm_memory_max_bytes{application="prometheus-demo",area="nonheap",id="Compressed Class Space",} 1.073741824E9
# HELP executor_pool_max_threads The maximum allowed number of threads in the pool
# TYPE executor_pool_max_threads gauge
executor_pool_max_threads{application="prometheus-demo",name="applicationTaskExecutor",} 2.147483647E9
# HELP jvm_buffer_memory_used_bytes An estimate of the memory that the Java virtual machine is using for this buffer pool
# TYPE jvm_buffer_memory_used_bytes gauge
jvm_buffer_memory_used_bytes{application="prometheus-demo",id="mapped",} 0.0
jvm_buffer_memory_used_bytes{application="prometheus-demo",id="direct",} 81920.0
# HELP system_cpu_count The number of processors available to the Java virtual machine
# TYPE system_cpu_count gauge
system_cpu_count{application="prometheus-demo",} 2.0
# HELP jvm_classes_unloaded_classes_total The total number of classes unloaded since the Java virtual machine has started execution
# TYPE jvm_classes_unloaded_classes_total counter
jvm_classes_unloaded_classes_total{application="prometheus-demo",} 1.0
# HELP jvm_gc_overhead_percent An approximation of the percent of CPU time used by GC activities over the last lookback period or since monitoring began, whichever is shorter, in the range [0..1]
# TYPE jvm_gc_overhead_percent gauge
jvm_gc_overhead_percent{application="prometheus-demo",} 6.81195699160739E-4
# HELP jvm_buffer_total_capacity_bytes An estimate of the total capacity of the buffers in this pool
# TYPE jvm_buffer_total_capacity_bytes gauge
jvm_buffer_total_capacity_bytes{application="prometheus-demo",id="mapped",} 0.0
jvm_buffer_total_capacity_bytes{application="prometheus-demo",id="direct",} 81920.0
# HELP tomcat_sessions_alive_max_seconds  
# TYPE tomcat_sessions_alive_max_seconds gauge
tomcat_sessions_alive_max_seconds{application="prometheus-demo",} 0.0
# HELP jvm_threads_peak_threads The peak live thread count since the Java virtual machine started or peak was reset
# TYPE jvm_threads_peak_threads gauge
jvm_threads_peak_threads{application="prometheus-demo",} 19.0
# HELP executor_active_threads The approximate number of threads that are actively executing tasks
# TYPE executor_active_threads gauge
executor_active_threads{application="prometheus-demo",name="applicationTaskExecutor",} 0.0
# HELP jvm_gc_max_data_size_bytes Max size of long-lived heap memory pool
# TYPE jvm_gc_max_data_size_bytes gauge
jvm_gc_max_data_size_bytes{application="prometheus-demo",} 1.32120576E9
# HELP tomcat_sessions_expired_sessions_total  
# TYPE tomcat_sessions_expired_sessions_total counter
tomcat_sessions_expired_sessions_total{application="prometheus-demo",} 0.0
# HELP logback_events_total Number of events that made it to the logs
# TYPE logback_events_total counter
logback_events_total{application="prometheus-demo",level="info",} 6.0
logback_events_total{application="prometheus-demo",level="trace",} 0.0
logback_events_total{application="prometheus-demo",level="warn",} 0.0
logback_events_total{application="prometheus-demo",level="debug",} 0.0
logback_events_total{application="prometheus-demo",level="error",} 0.0
# HELP tomcat_sessions_rejected_sessions_total  
# TYPE tomcat_sessions_rejected_sessions_total counter
tomcat_sessions_rejected_sessions_total{application="prometheus-demo",} 0.0
# HELP jvm_memory_usage_after_gc_percent The percentage of long-lived heap pool used after the last GC event, in the range [0..1]
# TYPE jvm_memory_usage_after_gc_percent gauge
jvm_memory_usage_after_gc_percent{application="prometheus-demo",area="heap",pool="long-lived",} 0.008799701266818576

3、安装

3.1 Prometheus安装

我们使用docker进行安装。

首先拉去镜像

# 拉取docker镜像
docker pull prom/prometheus

准备配置文件prometheus.yml,${host1}、${host2}为变量,例如可以替换为localhost:8080

scrape_configs:
# 可随意指定
- job_name: 'spring'
  # 多久采集一次数据
  scrape_interval: 15s
  # 采集时的超时时间
  scrape_timeout: 10s
  # 采集的路径
  metrics_path: '/actuator/prometheus'
  # 采集服务的地址,设置成Springboot应用所在服务器的具体地址
  static_configs:
  - targets: ['${host1}','${host2}']

启动

  • --log.level=debug:日志以debug输出

  • --storage.tsdb.retention.time=3d,数据保留3天

  • --config.file=/etc/prometheus/prometheus.yml:容器里面的默认路径

docker run -d -p 9090:9090 -v /root/docker-images/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml --name prometheus  prom/prometheus:latest --log.level=debug --storage.tsdb.retention.time=3d --config.file=/etc/prometheus/prometheus.yml

或者启动脚本

docker run -d -p 9090:9090 -v /root/docker-images/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml --name prometheus  prom/prometheus:latest  --config.file=/etc/prometheus/prometheus.yml

启动成功后,访问地址:http://${ip}:9090/,页面展示

3.2 Grafana安装

拉去镜像

docker pull grafana/grafana

运行示例

docker run -d -p 3000:3000 grafana/grafana
  • 访问地址:http://localhost:3000

  • 账号:admin

  • 密码:admin

页面展示

3.3 Grafana配置Prometheus数据源

(1)Date Sources--> 选择 Prometheus,配置 Name 和 URL,注意:Name必须为首字母大写Prometheus,不能全写成小写的prometheus。因为Prometheus和Grafana都是docker安装,所以url需要写外网地址。

(2)新建 Dashboard

Create Dashboard

配置title、description

配置Data Source

选择指标

保存

3.4 模板套用

Grafana提供了许多优秀的模板,可以网页https://grafana.com/grafana/dashboards 查找。

导入模板id

复制模板id

导入

导入后,可以看到监控效果了

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

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

相关文章

Ubantu 安装到VMware详解

想要在VMware中运行Linux系统&#xff0c;那么就需要Linux系统安装到VMware虚拟机上面。在这里&#xff0c;以把ubantu16.04安装到VMware虚拟机中为教程进行图文讲解&#xff0c;共分为三个步骤&#xff0c;分别是创建新的虚拟机、安装到ubantu系统、安装VMware Tools。 1.1 创…

响应式网络建站公司网站源码+完整教程

分享一个开源的自适应的三网合一的网络建站公司网站的完整源码&#xff0c;当做互联网公司官网特别合适&#xff0c;带完整搭建教程。此款网站源码适用于小程序制作公司、网络公司、网站建设公司等等&#xff0c;这些都可以用这个网站模板&#xff0c;网站整体非常高端大气&…

vue+vite项目部署会遇到的几个问题

今天来打包硅谷外卖项目&#xff0c;通过解决项目中遇到的问题来加深对vite打包的理解。 运行yarn build 报错,报[WARNING] Expected identifier but found “*” [css-syntax-error] 既然zoom:1是没有变化&#xff0c;直接把它去掉即可。 然后继续yarn build 不出所料还是报…

有序表的应用:设计一个增、删、查数据的时间复杂度均为O(logN)的结构

1、题目描述 设计一个结构包含如下三个方法&#xff1a; void add(int index, int num); //把num加入到index位置 int get(int index); //取出index位置的值&#xff08;是自然序的index位置&#xff0c;非排序后&#xff09; void remove(int index); //把index位置上的值删…

【Linux】vim拒绝服务安全漏洞修复

根据国家信息安全漏洞共享平台于2023年2月19日发布的安全漏洞通知&#xff0c;Linux系统自带的vim编辑器存在两个高危安全漏洞&#xff08;CNVD-2023-09166、CNVD-2023-09647&#xff09;&#xff0c;攻击者可以利用该漏洞发起拒绝服务攻击&#xff0c;并可能运行&#xff08;恶…

【编程入门】应用市场(Vue版)

背景 前面已输出多个系列&#xff1a; 《十余种编程语言做个计算器》 《十余种编程语言写2048小游戏》 《17种编程语言10种排序算法》 《十余种编程语言写博客系统》 《十余种编程语言写云笔记》 《N种编程语言做个记事本》 目标 为编程初学者打造入门学习项目&#xff0c;使…

双因素方差分析

一、案例与数据 一家大型商业银行在多地区设有分行&#xff0c;其业务主要是进行基础设施建设&#xff0c;国家重点项目建设&#xff0c;固定资产投资等项目的贷款。近年来&#xff0c;该银行的贷款额平稳增长&#xff0c;但不良贷款额也有较大比例的提高&#xff0c;这给银行…

数据库

一、数据库系统管理 ACID&#xff0c;是指数据库管理系统&#xff08;DBMS&#xff09;在写入或更新资料的过程中&#xff0c;为保证事务&#xff08;transaction&#xff09;是正确可靠的&#xff0c;所必须具备的四个特性&#xff1a;原子性&#xff08;atomicity&#xff0…

【微信小程序】一文带你吃透开发中的常用组件

写在前面 小程序中的组件也是由宿主环境提供的&#xff0c;开发者可以基于组件快速搭建出漂亮的页面结构。 官方把小程序的组件分为了9大类&#xff0c;分别是: 1.视图容器 2.基础内容 3.表单组件 4.导航组件 5.媒体组件 6.地图组件 7.画布组件 …

QMap 判断是否value是否已经存在,结合Sleep函数测试

网上查了资料&#xff0c;基本说的都是通过.value判断是否已经之前的key值&#xff0c;但是尝试.了一下发现有.key的函数&#xff0c;对比着来就感觉这个函数是用来判断是否已经存在value值&#xff0c;于是开始百度也几乎没有找到相关资料&#xff0c;只好自己看官方文档&…

Fortinet推出新一代自研安全芯片,跨所有网络边缘加速网络与安全融合

专注网络与安全融合的全球网络安全领导者 Fortinet&#xff08;NASDAQ&#xff1a;FTNT&#xff09;&#xff0c;近日宣布推出新一代自研安全芯片 FortiSP5&#xff0c;作为 Fortinet ASIC 技术的最新突破&#xff0c;有力推动了分布式网络边缘安全的重大飞跃。FortiSP5 源自 F…

【LeetCode】剑指 Offer 10- I. 斐波那契数列 p74 -- Java Version

题目链接&#xff1a; 1. 题目介绍&#xff08;&#xff09; 写一个函数&#xff0c;输入 n &#xff0c;求斐波那契&#xff08;Fibonacci&#xff09;数列的第 n 项&#xff08;即 F(N)&#xff09;。斐波那契数列的定义如下&#xff1a; F(0) 0, F(1) 1F(N) F(N - 1) F…

修复 K8s SSL/TLS 漏洞(CVE-2016-2183)指南

作者&#xff1a;老 Z&#xff0c;中电信数智科技有限公司山东分公司运维架构师&#xff0c;云原生爱好者&#xff0c;目前专注于云原生运维&#xff0c;云原生领域技术栈涉及 Kubernetes、KubeSphere、DevOps、OpenStack、Ansible 等。 前言 测试服务器配置 主机名IPCPU内存系…

模电中的负反馈

文章目录一、反馈是什么&#xff1f;二、负反馈对于放大性能的影响1.负反馈的作用三、正反馈总结– 一、反馈是什么&#xff1f; 反馈的定义&#xff1a;凡是将放大电路输出端信号&#xff08;电压或电流&#xff09;的一部分或者全部引回到输入端&#xff0c;与输入信号叠加…

【C语言】宏

&#x1f680;write in front&#x1f680; &#x1f4dc;所属专栏&#xff1a;> c语言学习 &#x1f6f0;️博客主页&#xff1a;睿睿的博客主页 &#x1f6f0;️代码仓库&#xff1a;&#x1f389;VS2022_C语言仓库 &#x1f3a1;您的点赞、关注、收藏、评论&#xff0c;是…

打造Ai作图studio需要哪些工具

这篇文章依然是比较轻松的方式跟大家介绍Ai生成会使用到的一些工具&#xff0c;希望这些工具可以帮助到你更好的更稳定的快捷的生成高质量图片。说来轻松其实也不算轻松&#xff0c;虽然我已经按照生成的链路对工具做了规整。但是里面涉及到的工具其实确实不算少&#xff0c;并…

2023-02-20 Qt 5.13.1 + OpenCV 4.5.4环境编译

引言 OpenCV图像处理在Qt中编译记录。 之前一直是在Python中使用OpenCV&#xff0c;Python中使用某些模块使用pip工具很容易将对应的模块安装在系统中。根据项目需求项目都要转移在国产化中使用&#xff0c;为了适应国产化需求&#xff0c;将代码转移到Qt开发环境中&#xff0c…

django项目实战四(django+bootstrap实现增删改查)进阶时间控件

接上一篇《django项目实战三&#xff08;djangobootstrap实现增删改查&#xff09;进阶分页》 知识点&#xff1a; 使用bootstrap-datepicker实现时间控件 一、优化layout.html模版 主要新增2个块 {% block css %}{% endblock %}{% block js %}{% endblock %} {% load static…

nginx.conf配置方法详细介绍

从前面的内容学习中&#xff0c;我们知道Nginx的核心配置文件默认是放在/usr/local/nginx/conf/nginx.conf&#xff0c;这一节&#xff0c;我们就来学习下nginx.conf的内容和基本配置方法。读取Nginx自带的Nginx配置文件&#xff0c;我们将其中的注释部分【学习一个技术点就是在…

第20讲:Python列表、元组、字符串使用自定义排序规则

文章目录1.自定义排序方法2.常用作自定义排序的函数、方法3.列表、元组、字符串自定义排序方法3.1.当列表、元组中元素为字符串的排序规则3.2.三者采用str.lower方法实现自定义排序3.2.三者采用len函数实现自定义排序1.自定义排序方法 列表、元组、字符串都可以进行排序&#…