prometheus常用exporter

一、node-exporter

node_exporter:用于监控Linux系统的指标采集器。
未在k8s集群内的linux机器监控

GitHub - prometheus/node_exporter: Exporter for machine metrics

常用指标:

•CPU
• 内存
• 硬盘
• 网络流量
• 文件描述符
• 系统负载
• 系统服务
数据接口:http://IP:9100/metrics

第一种方式:linux主机安装

#x86_64主机下载此客户端
wget --no-check-certificate http://foreman.chinamcloud.com:8080/source/node_exporter-1.6.1.linux-amd64.tar.gz
#安装
useradd prometheus -s /sbin/nologin
#x86_64主机
tar zxvf node_exporter-1.6.1.linux-amd64.tar.gz -C /tmp/
#x86_64主机
mv /tmp/node_exporter-1.6.1.linux-amd64 /usr/local/node_exporter
#目录授权
chown prometheus:prometheus -R /usr/local/node_exporter
#封装service
tee /etc/systemd/system/node-exporter.service <<-'EOF'
[Unit]
Description=Prometheus Node Exporter
After=network.target
[Service]
ExecStart=/usr/local/node_exporter/node_exporter
User=prometheus
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable node-exporter
systemctl start node-exporter
验证监控,访问http://ip:9100/metrics

 第二种方式:docker容器启动

docker run -d --name node-exporter --restart=always -p 9100:9100 -v "/proc:/host/proc:ro" -v "/sys:/host/sys:ro" -v "/:/rootfs:ro" prom/node-exporter

 配置Prometheus,接入windows的metrics

配置映射里Prometheus.yaml新加一个job
- job_name: linux-exporter
  static_configs:
  - targets:
    - 192.168.1.1:9100
    - 192.168.1.2:9100
    - 192.168.1.3:9100
    - x.x.x.x:9100
将linux的ip加入到配置文件里

常用指标
主机 内存 使用率 > 90%
(1 - (node_memory_MemAvailable_bytes{environment=~"项目标志"} / (node_memory_MemTotal_bytes{environment=~"项目标志"})))* 100  >90

主机 CPU 使用率> 90%

(1 - avg(rate(node_cpu_seconds_total{environment=~"项目标志",mode="idle"})) by (instance))*100 >90

主机NTP时间差[5m] > 5s

node_timex_tai_offset_seconds{environment=~"项目标志"}>3

主机磁盘使用率>80%

(node_filesystem_size_bytes{environment=~"项目标志",fstype=~"ext.*|xfs",mountpoint !~".*pod.*"}-node_filesystem_free_bytes{environment=~"项目标志",fstype=~"ext.*|xfs",mountpoint !~".*pod.*"}) *100/(node_filesystem_avail_bytes {environment=~"项目标志",fstype=~"ext.*|xfs",mountpoint !~".*pod.*"}+(node_filesystem_size_bytes{environment=~"项目标志",fstype=~"ext.*|xfs",mountpoint !~".*pod.*"}-node_filesystem_free_bytes{environment=~"项目标志",fstype=~"ext.*|xfs",mountpoint !~".*pod.*"})) >80

主机Inode 使用率[5m] > 80%

(1-node_filesystem_files_free{environment=~"项目标志",fstype=~"ext.?|xfs"} / node_filesystem_files{environment=~"项目标志",fstype=~"ext.?|xfs"})*100 >80

二、windows-exporter

GitHub - prometheus-community/windows_exporter: Prometheus exporter for Windows machineswindows-exporter安装部署
1、安装包下载

windows_exporter-0.22.0-amd64.msi

2、直接双击运行该msi程序即可正常安装

安装完成后,打开任务管理器,会看到里面有个windows-exporter的服务

 

3、使用127.0.0.1:9182端口,可看到对应的metrics

配置Prometheus,接入windows的metrics

配置映射里Prometheus.yaml新加一个job

- job_name: windows-exporter
  static_configs:
  - targets:
    - 192.168.1.1:9182
    - 192.168.1.2:9182
    - 192.168.1.3:9182
    - x.x.x.x:9182

 将windows的ip加入到配置文件里

GitHub - prometheus-community/windows_exporter: Prometheus exporter for Windows machines

注意

默认收集只收集了cpu,cs,logical_disk,net,os,service,system,textfile相关的指标,若要开启其他的,需配置—collectors.enabled
1.新增C:\Program Files\windows_exporter\config.yml文件
collectors:
  enabled: "[defaults],process,cpu_info,memory,remote_fx,tcp"
collector:
  service:
    services-where: "Name='windows_exporter'"
log:
  level: warn
2.修改windows启动参数
sc config   windows_exporter  binPath= "\"C:\Program Files\windows_exporter\windows_exporter.exe\" --config.file=\"C:\Program Files\windows_exporter\config.yml\" "
3.重启windows_exporter服务
sc stop windows_exporter
sc start windows_exporter

二、powershell脚本一键安装windows_exporter,windows_exporter.ps1

Set-Location -Path $Env:TEMP
(New-Object Net.WebClient).DownloadFile('http://foreman.chinamcloud.com:8080/source/windows_exporter-0.23.1-amd64.msi', $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath('./windows_exporter-0.23.1-amd64.msi'))
Start-Process  ./windows_exporter-0.23.1-amd64.msi
Add-Content "C:\Program Files\windows_exporter\config.yml" "collectors:"
Add-Content "C:\Program Files\windows_exporter\config.yml" "  enabled: ""[defaults],process,cpu_info,memory,remote_fx,tcp"" "
Add-Content "C:\Program Files\windows_exporter\config.yml" "collector:"
Add-Content "C:\Program Files\windows_exporter\config.yml" "  service:"
Add-Content "C:\Program Files\windows_exporter\config.yml" "    services-where: ""Name='windows_exporter'"""
Add-Content "C:\Program Files\windows_exporter\config.yml" "log:"
Add-Content "C:\Program Files\windows_exporter\config.yml" "  level: warn"
sleep 30
sc.exe config "windows_exporter" binpath= """""""C:\Program Files\windows_exporter\windows_exporter.exe"""""" --config.file=""""""C:\Program Files\windows_exporter\config.yml"""""""
sc.exe config "windows_exporter" binpath= """""""C:\Program Files\windows_exporter\windows_exporter.exe"""""" --config.file=""""""C:\Program Files\windows_exporter\config.yml"""""""
sc.exe stop windows_exporter
sc.exe start  windows_exporter
sleep 10
常用指标
主机CPU使用率
100 - avg(irate(windows_cpu_time_total{job=~"$job",instance=~"$instance",mode="idle"}[5m]))*100

主机内存使用率
100 - 100 * (windows_os_physical_memory_free_bytes{job=~"$job"} / windows_cs_physical_memory_bytes{job=~"$job"})

主机磁盘使用率
100-(windows_logical_disk_free_bytes/windows_logical_disk_size_bytes)*100

主机mpc相关进程句柄数
windows_process_handles{environment=~"$environment",job="windows-exporter",process=~'MPC.*|cloudia.*|APPBaseInTT.*|AppBaseInTT.*'}

三、blackbox-exporter

GitHub - prometheus/blackbox_exporter: Blackbox prober exporter

Blackbox Exporter是Prometheus社区提供的官方黑盒监控解决方案,其允许用户通过:HTTP、HTTPS、DNS、TCP以及ICMP的方式对网络进行探测。

应用场景

  • HTTP 测试
  • 定义 Request Header 信息 判断 Http status Http Respones Header Http Body 内容
  • TCP 测试
  • 业务组件端口状态监听 应用层协议定义与监听
  • ICMP 测试
  • 主机探活机制
  • POST 测试
  • 接口联通性
  • SSL 证书过期时间
    运行Blackbox Exporter时,需要用户提供探针的配置信息,这些配置信息可能是一些自定义的HTTP头信息,也可能是探测时需要的一些TSL配置,也可能是探针本身的验证行为。在Blackbox Exporter每一个探针配置称为一个module,并且以YAML配置文件的形式提供给Blackbox Exporter。每一个module主要包含以下配置内容,包括探针类型(prober)、验证访问超时时间(timeout)、以及当前探针的具体配置项:
    探针类型:http、 tcp、 dns、 icmp.
    prober: <prober_string>
    超时时间
    [ timeout: <duration> ]
    探针的详细配置,最多只能配置其中的一个
    [ http: <http_probe> ]
    [ tcp: <tcp_probe> ]
    [ dns: <dns_probe> ]
    [ icmp: <icmp_probe> ]

安装部署blackbox-exporter

1.rancher内导入下面的blackbox-exporter.yml文件到Prometheus
apiVersion: apps/v1
kind: Deployment
metadata:
  generation: 1
  labels:
    cattle.io/creator: norman
    workload.user.cattle.io/workloadselector: deployment-prometheus-blackbox-exporter
  name: blackbox-exporter
  namespace: prometheus
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      workload.user.cattle.io/workloadselector: deployment-prometheus-blackbox-exporter
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      annotations:
        field.cattle.io/ports: '[[{"containerPort":9115,"dnsName":"blackbox-exporter","hostPort":0,"kind":"ClusterIP","name":"blackbox-port","protocol":"TCP","sourcePort":0}]]'
      creationTimestamp: null
      labels:
        app.kubernetes.io/name: blackbox
        workload.user.cattle.io/workloadselector: deployment-prometheus-blackbox-exporter
    spec:
      containers:
      - args:
        - --config.file=/etc/blackbox_exporter/blackbox.yml
        - --log.level=info
        - --web.listen-address=:9115
        image: prom/blackbox-exporter:v0.16.0
        imagePullPolicy: Always
        livenessProbe:
          failureThreshold: 3
          initialDelaySeconds: 10
          periodSeconds: 2
          successThreshold: 1
          tcpSocket:
            port: 9115
          timeoutSeconds: 2
        name: blackbox-exporter
        ports:
        - containerPort: 9115
          name: blackbox-port
          protocol: TCP
        readinessProbe:
          failureThreshold: 3
          initialDelaySeconds: 10
          periodSeconds: 2
          successThreshold: 2
          tcpSocket:
            port: 9115
          timeoutSeconds: 2
        resources: {}
        securityContext:
          allowPrivilegeEscalation: false
          capabilities: {}
          privileged: false
          readOnlyRootFilesystem: false
          runAsNonRoot: false
        stdin: true
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        tty: true
        volumeMounts:
        - mountPath: /etc/blackbox_exporter
          name: vol1
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
      volumes:
      - configMap:
          defaultMode: 420
          name: blackbox-exporter
          optional: false
        name: vol1
2.rancher内导入下面yml,新增服务发现blackbox-exporter
apiVersion: v1
kind: Service
metadata:
  annotations:
  labels:
    app.kubernetes.io/name: blackbox
  name: blackbox-exporter
  namespace: prometheus
  selfLink: /api/v1/namespaces/prometheus/services/blackbox-exporter
spec:
  ports:
  - name: balckbox
    port: 9115
    protocol: TCP
    targetPort: 9115
  selector:
    app.kubernetes.io/name: blackbox
  sessionAffinity: None
  type: ClusterIP
Prometheus下配置映射新增blackbox-exporter

blackbox.yml

modules:
  http_2xx:
    prober: http
    timeout: 5s
    http:
      valid_http_versions: ["HTTP/1.1", "HTTP/2"]
      valid_status_codes: [200,301,302,403,405]
      method: GET
      preferred_ip_protocol: "ipv4"
  https_2xx:
    prober: https
    timeout: 5s
    http:
      valid_http_versions: ["HTTP/1.1", "HTTP/2"]
      valid_status_codes: [200,301,302,403,405]
      method: POST
      preferred_ip_protocol: "ipv4"
  tcp_connect:
    prober: tcp
    timeout: 2s
  http_403:
    prober: http
    timeout: 2s
    http:
      valid_http_versions: ["HTTP/1.1", "HTTP/2"]
      valid_status_codes: [403,405]
      method: GET
      preferred_ip_protocol: "ipv4"
  https_403:
    prober: https
    timeout: 2s
    http:
      valid_http_versions: ["HTTP/1.1", "HTTP/2"]
      valid_status_codes: [403,405]
      method: GET
      preferred_ip_protocol: "ipv4"
  icmp:
    prober: icmp/etc/blackbox_exporter
prometheus配置映射内新增job

如配置证书的监控,修改Prometheus内配置映射的prometheus.yml

- job_name: "blackbox_ssl"
  metrics_path: /probe
  params:
    module: [http_2xx]
  static_configs:
  - targets:
    - https://login.demo.chinamcloud.cn
  relabel_configs:
  - source_labels: [__address__]
    target_label: instance
  - source_labels: [__address__]
    target_label: __param_target
  - target_label: __address__
    replacement: blackbox-exporter:9115

 如配置TCP端口检测,修改Prometheus内配置映射的prometheus.yml

- job_name: "tcp-port-check"
  scrape_interval: 30s
  metrics_path: /probe
  params:
    module: [tcp_connect]
  static_configs:
  - targets:
    - mpc.server:8088
    - mysql.server:3306
    - redis.server:6379
    - kafka.kafka:9092
    labels: 
      server: 'tcp-port-check'
  relabel_configs:
  - source_labels: [__address__]
    target_label: instance
  - source_labels: [__address__]
    target_label: __param_target
  - target_label: __address__
    replacement: blackbox-exporter:9115

POST 测试,监听业务接口地址,用来判断接口是否在线

- job_name: 'blackbox_http_2xx_post'
  scrape_interval: 10s
  metrics_path: /probe
  params:
    module: [http_post_2xx_query]
  static_configs:
  - targets:
    - https://xx.xxx.com/api/xx/xx/xx/query.action
    labels:
      group: 'Interface monitoring'
  relabel_configs:
  - source_labels: [__address__]
    target_label: __param_target
  - source_labels: [__param_target]
    target_label: instance
  - target_label: __address__
    replacement: blackbox-exporter:9115

常用指标

probe_success == 0 ##联通性异常
probe_success == 1 ##联通性正常

证书过期时间低于30天
(probe_ssl_earliest_cert_expiry-time()) / 86400 <30

http状态码
probe_http_status_code

请求耗时 
probe_duration_seconds{job=~"blackbox_ssl"}
http请求耗时
probe_http_duration_seconds

四、elasticsearch_exporter

GitHub - prometheus-community/elasticsearch_exporter: Elasticsearch stats exporter for Prometheus

elasticsearch_exporter安装部署

1.在k8s内导入下面这个yml文件,创建elasticsearch-exporter

http://elasticsearch.server:9200换成项目上的es地址
若es配置了账号密码,http://账号:密码@elasticsearch.server:9200

apiVersion: apps/v1
kind: Deployment
metadata:
  name: elasticsearch-exporter
  namespace: prometheus
spec:
  selector:
    matchLabels:
      workload.user.cattle.io/workloadselector: deployment-prometheus-elasticsearch-exporter
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    type: RollingUpdate
  template:
    metadata:
      labels:
        app.kubernetes.io/name: elasticsearch-exporter
        workload.user.cattle.io/workloadselector: deployment-prometheus-elasticsearch-exporter
    spec:
      containers:
      - args:
        - --es.uri=http://elasticsearch.server:9200
        - --es.all
        - --es.indices
        - --es.indices_settings
        - --es.shards
        - --es.snapshots
        - --collector.clustersettings
        image: quay.io/prometheuscommunity/elasticsearch-exporter:v1.6.0
        imagePullPolicy: Always
        name: elasticsearch-exporter
        ports:
        - containerPort: 9114
          name: tcp
          protocol: TCP

2.导入下面yml文件,创建elasticsearch-exporter的服务发现

apiVersion: v1
kind: Service
metadata:
  name: elasticsearch-exporter
  namespace: prometheus
spec:
  clusterIP: None
  ports:
  - name: tcp
    port: 9114
    protocol: TCP
    targetPort: 9114
  selector:
    app.kubernetes.io/name: elasticsearch-exporter

3.prometheus的配置文件prometheus.yml内新增elasticsearch-exporter的job

- job_name: elasticsearch-exporter
  metrics_path: '/metrics'
  static_configs:
  - targets:
    - elasticsearch-exporter.prometheus:9114

4.验证该job状态是否正常,访问Prometheus

5.导入grafana内模板

常用告警指标说明
# ES集群状态YELLOW
elasticsearch_cluster_health_status{environment=~"csp.*",color="yellow"} =1
# ES集群状态RED
elasticsearch_cluster_health_status{environment=~"csp.*",color="red"} =1
# ES集群状态正常
elasticsearch_cluster_health_status{environment=~"csp.*",color="greeen"} =1
#ES总节点数
sum(elasticsearch_cluster_health_number_of_nodes{cluster=~"haihe3"})
#ES数据节点数
sum(elasticsearch_cluster_health_number_of_data_nodes{cluster=~"haihe3"})

 五、kong接入prometheus

1.kong的dashboard内新加插件Prometheus

2. 修改Prometheus.yaml文件配置,新加kong的job监控

静态注册
- job_name: cmc-kong-monitoring
  metrics_path: "/metrics"
  static_configs:
  - targets:
    - kong.cmc:8001
动态注册:使用kubernetes_sd_configs自动发现kong的endpoints【如CSP环境】
#框架cmc下kong
- job_name: csp-cmc-kong    
  kubernetes_sd_configs:
  - role: endpoints
  scheme: http
  relabel_configs:
  - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name,__meta_kubernetes_endpoint_port_name]
    regex: cmc;kong;http8001
    action: keep
#kong下的kong
- job_name: csp-kong-kong    
  kubernetes_sd_configs:
  - role: endpoints
  scheme: http
  relabel_configs:
  - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name,__meta_kubernetes_endpoint_port_name]
    regex: kong;kong;8001to8001-kong
    action: keep
#云教kong kong下kongedu
- job_name: csp-kong-kongedu    
  kubernetes_sd_configs:
  - role: endpoints
  scheme: http
  relabel_configs:
  - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name,__meta_kubernetes_endpoint_port_name]
    regex: kong;kongedu;8001tcp80012
    action: keep

grafana上导入kong的大屏 

常用指标

名称                                  类型         单位           说明
kong_bandwidth                       counter      字节数bytes      kong中每个服务消耗的总带宽(字节)
kong_datastore_reachable             gauge          是否           kong对数据库是否可以访问(1:正常 2:不正常)
kong_http_status                     counter      服务数          kong中每个服务的状态码
kong_latency_count                     counter      调用次数         kong中每个服务的调用次数
kong_latency_sum                     counter      调用耗时ms     kong中每个服务的调用耗时
kong_latency_bucket                     histogram      服务数          kong中的服务在各个耗时区间的分布(类型设有:kong内部处理耗时 request请求耗时 ,upstream代理上游服务器耗时)
kong_nginx_http_current_connections     gauge          连接数          kong当前的连接数(状态设有:accepted、active、handled、reading、total、waiting、writing)
    total      客户端请求总数
    accepted    接受的客户端连接的总数
    handled       处理连接的总数。一般来说,除非达到一定的资源限制,否则参数值与接受值相同
    active      包括等待连接的活动客户端连接的当前数量
    reading      当前Kong正在读取请求头的连接数
    writing      将响应写入客户端的连接的当前数量
    waiting      等待请求的空闲客户端连接的当前数量

kong_nginx_metric_errors_total         counter      个数           kong prometheus插件错误的指标数

 kubernetes_sd_configs内新增kong=csp灰度框架kong标签

- job_name: kong-cmc-endpoints    
  kubernetes_sd_configs:
  - role: endpoints
  scheme: http
  relabel_configs:
  - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name,__meta_kubernetes_endpoint_port_name]
    regex: cmc;kong;http8001
    action: keep
  - action: replace
    replacement: csp灰度框架kong
    target_label: kong

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

黑马程序员 Java设计模式学习笔记(一)

目录 一、设计模式概述 1.1、23种设计模式有哪些&#xff1f; 1.2、软件设计模式的概念 1.3、学习设计模式的必要性 1.4、设计模式分类 二、UML图 2.1、类图概述 2.2、类图的作用 2.3、类图表示法 类的表示方式 类与类之间关系的表示方式 关联关系 聚合关系 组合…

记录汇川:H5U于Factory IO测试13

主程序&#xff1a; 子程序&#xff1a; IO映射 子程序&#xff1a; 辅助出料 子程序&#xff1a; 模式选择 子程序&#xff1a; 示教程序 子程序&#xff1a; 手动程序 子程序&#xff1a; 统计程序 子程序&#xff1a; 异常报警 子程序&#xff1a; 自动程序&#xff1a; F…

PXIe‑6378国产替代,16路AI(16位,3.5 MS/s/ch),4路AO,48路DIO,PXI多功能I/O模块

PXIe&#xff0c;16路AI&#xff08;16位&#xff0c;3.5 MS/s/ch&#xff09;&#xff0c;4路AO&#xff0c;48路DIO&#xff0c;PXI多功能I/O模块 PXIe‑6378是一款同步采样的多功能DAQ设备。 该模块提供了模拟 I/O、数字I/O、四个32位计数器和模拟和数字触发。 板载NI‑STC3…

SIC单晶衬底的常用检测技术

碳化硅&#xff08;SiC&#xff09;作为第三代半导体材料&#xff0c;因其宽禁带宽度、高击穿电场强度和高热导率等优异性能&#xff0c;在众多高端应用领域表现出色&#xff0c;已成为半导体材料技术的重要发展方向之一。SiC衬底分为导电型和半绝缘型两种&#xff0c;各自适用…

c++ 开发生态环境、工作流程、生命周期-拾遗

拾遗 1 生态环境初识 当您使用Visual Studio 2019进行C开发时&#xff0c;您将进入C生态环境。以下是一些重要的概念和步骤&#xff1a; C程序的结构&#xff1a; 一个典型的C程序包括源文件&#xff08;.cpp&#xff09;、头文件&#xff08;.h&#xff09;、编译后的目标文…

javacv和opencv对图文视频编辑-裸眼3D图片制作

通过斗鸡眼&#xff0c;将左右两张相似的图片叠加到一起看&#xff0c;就会有3D效果。 3D图片&#xff0c;3D眼镜&#xff0c;3D视频等原理类似&#xff0c;都是通过两眼视觉差引起脑补产生3D效果。 图片&#xff1a; 图片来源&#xff1a; 一些我拍摄的真*裸眼3D照片 - 哔哩…

LeetCode-1523/1491/860/976

1.在区间范围内统计奇数数目&#xff08;1523&#xff09; 题目描述&#xff1a; 给你两个非负整数 low 和 high 。请你返回 low 和 high 之间&#xff08;包括二者&#xff09;奇数的数目。 思路一&#xff1a; 这里肯定会想到以low和high分别为上下限&#xff0c;然后遍历…

JS实现网页轮播图

轮播图也称为焦点图&#xff0c;是网页中比较常见的网页特效。 1、页面基本结构&#xff1a; 大盒子focus&#xff0c;里面包含 左右按钮ul 包含很多个li &#xff08;每个li里面包含了图片&#xff09;下面有很多个小圆圈 因为我们想要点击按钮&#xff0c;轮播图左右播放&a…

MCU最小系统原理图中四个问题详解——芯片中有很多电源管脚的原因(VDD/VSS/VBAT)、LC滤波、两级滤波、NC可切换元件

前言&#xff1a;本文对MCU最小系统原理图中的四个问题进行详解&#xff1a;芯片中有很多电源管脚的原因&#xff08;VDD/VSS/VBAT&#xff09;、LC滤波、两级滤波、NC可切换元件。本文以GD32F103C8T6最小系统原理图举例 目录&#xff1a; 芯片中有很多电源管脚的原因&#x…

ssh远程登录

ssh协议 ---基于 tcp 的 22 号端口 确认是否有ssh包&#xff1a; [rootserver ~] rpm -qa | grep sshopenssh-clients-8.7p1-24.el9_1.x86_64openssh-server-8.7p1-24.el9_1.x86_64 1、 ssh的验证过程 第一阶段&#xff1a;版本协商以及tcp三次握手 第二阶段&#xff1a;秘钥和…

WebServer 跑通/运行/测试(详解版)

&#x1f442; 椿 - 沈以诚 - 单曲 - 网易云音乐 目录 &#x1f382;前言 &#x1f33c;跑通 &#xff08;1&#xff09;系统环境 &#xff08;2&#xff09;克隆源码 &#xff08;3&#xff09;安装和配置 Mysql &#xff08;4&#xff09;写 sql 语句 &#xff08;5&…

LeetCode114二叉树展开为链表(相关话题:后序遍历)

题目描述 给你二叉树的根结点 root &#xff0c;请你将它展开为一个单链表&#xff1a; 展开后的单链表应该同样使用 TreeNode &#xff0c;其中 right 子指针指向链表中下一个结点&#xff0c;而左子指针始终为 null 。展开后的单链表应该与二叉树 先序遍历 顺序相同。 示例…

LabVIEW通过视频识别开发布氏硬度机自动化测量系统

LabVIEW通过视频识别开发布氏硬度机自动化测量系统 概述&#xff1a; 在当前的工业检测与自动化领域&#xff0c;对于精确测量技术的需求日益增长。特别是在材料硬度测试领域&#xff0c;布氏硬度机的自动化测量出现在越来越多的使用中。展示了一个基于LabVIEW开发的布氏硬度…

工业异常检测AnomalyGPT-训练试跑及问题解决

写在前面&#xff0c;AnomalyGPT训练试跑遇到的坑大部分好解决&#xff0c;只有在保存模型失败的地方卡了一天才解决&#xff0c;本来是个小问题&#xff0c;昨天没解决的时候尝试放弃在单卡的4090上训练&#xff0c;但换一台机器又遇到了新的问题&#xff0c;最后决定还是回来…

详谈Python的开发工具

Python作为一种流行的编程语言&#xff0c;在开发过程中需要使用各种工具来提高效率、简化工作流程和改善开发体验。在本文中&#xff0c;我们将介绍一些常用的Python开发工具&#xff0c;包括文本编辑器、集成开发环境&#xff08;IDE&#xff09;、虚拟环境管理工具、包管理器…

【数据结构与算法】之数组系列-20240113

这里写目录标题 一、66. 加一二、121. 买卖股票的最佳时机三、136. 只出现一次的数字四、268. 丢失的数字五、350. 两个数组的交集 II 一、66. 加一 简单 给定一个由 整数 组成的 非空 数组所表示的非负整数&#xff0c;在该数的基础上加一。 最高位数字存放在数组的首位&…

这可能是最全面的Java集合面试八股文了

内容摘自我的学习网站&#xff1a;topjavaer.cn 常见的集合有哪些&#xff1f; Java集合类主要由两个接口Collection和Map派生出来的&#xff0c;Collection有三个子接口&#xff1a;List、Set、Queue。 Java集合框架图如下&#xff1a; List代表了有序可重复集合&#xff0c…

第 10 章 树结构的基础部分

文章目录 10.1 二叉树10.1.1 为什么需要树这种数据结构10.1.2 树示意图10.1.3 二叉树的概念10.1.4 二叉树遍历的说明10.1.5 二叉树遍历应用实例(前序,中序,后序)10.1.6 二叉树-查找指定节点10.1.7 二叉树-删除节点10.1.8 二叉树-删除节点 10.2 顺序存储二叉树10.2.1 顺序存储二…

《2023年终总结》

笔者来回顾一下2023年的个人成长。 2023年总的来说&#xff0c;工作和生活都相对比较顺利。 工作上领导给予了肯定的评价&#xff0c;升职加薪&#xff0c;对我的鼓舞很大&#xff1b; 生活上和女朋友的感情越来越好&#xff0c;生气频率降低&#xff0c;也能相互理解&#xf…

《Spring》--使用application.yml特性提供多环境开发解决方案/开发/测试/线上--方案2

阿丹-有话说&#xff1a; 第二种多环境的配置选择解决方案&#xff0c;这个更加的灵活没在配置方面都选择了一种yml的书写方式。 原理&#xff1a; 在Spring Boot中&#xff0c;spring.profiles.active 属性用于指定当前应用程序应激活哪个环境配置。当Spring Boot应用启动时…