网站快速备案多少钱认证我自己做的网站怎么能查到

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

网站快速备案多少钱认证,我自己做的网站怎么能查到,喜茶vi设计手册,产品经理网站开发需求背景 如果你要为应用程序构建规范或用户故事#xff0c;那么务必先把应用程序每个组件的监控指标考虑进来#xff0c;千万不要等到项目结束或部署之前再做这件事情。——《Prometheus监控实战》 去年写了一篇在Docker环境下部署若依微服务ruoyi-cloud项目的文章#xff0c;当…背景 如果你要为应用程序构建规范或用户故事那么务必先把应用程序每个组件的监控指标考虑进来千万不要等到项目结束或部署之前再做这件事情。——《Prometheus监控实战》 去年写了一篇在Docker环境下部署若依微服务ruoyi-cloud项目的文章当时使用的是 docker-compose 在单台机器上部署若依微服务 ruoyi-cloud 项目在这个基础上作为演示项目我们计划实现对所有基础组件和微服务的监控。之前记录了搭建 Prometheus 与 Grafana 监控系统的过程。今天这篇文章主要是记录下对 Nginx 和 Nacos 服务的监测用到的 exporter 是 nginx-prometheus-exporter Nacos 自带了一个用于监控的内置端点。 虚机资源 共用到了2台虚机1台作为应用服务节点1台运维监控节点。 主机名IP说明svc192.168.44.168服务节点ops192.168.44.169监控节点 基本选用当前最新版本即将安装的 Prometheus 和 Grafana 及组件版本信息如下 Prometheus版本v2.54.1Grafana版本11.2.0nginx-prometheus-exporter版本v1.3.0 系统环境 [rootops ~]# uname -a Linux ops 5.10.0-182.0.0.95.oe2203sp3.x86_64 #1 SMP Sat Dec 30 13:10:36 CST 2023 x86_64 x86_64 x86_64 GNU/Linux [rootops ~]# cat /proc/version Linux version 5.10.0-182.0.0.95.oe2203sp3.x86_64 (rootdc-64g.compass-ci) (gcc_old (GCC) 10.3.1, GNU ld (GNU Binutils) 2.37) #1 SMP Sat Dec 30 13:10:36 CST 2023ops节点docker-compose安装Prometheus与Grafana 参考云原生之运维监控实践-OpenEuler22.03SP3上安装Prometheus与Grafana实现主机状态监测 svc节点docker-compose安装nginx-prometheus-exporter 有了 Prometheus 与 Grafana 的基础环境我们来实现对 Nginx 状态的监控通过 nginx-prometheus-exporter 快速采集 Nginx 运行数据如请求数、连接数、响应时间等并以 Prometheus 格式提供供 Prometheus 进行采集和分析。 验证Nginx的指标端点 命令行输入 nginx -V 21 | grep -o with-http_stub_status_module如果在终端中输出with-http_stub_status_module则说明Nginx已启用stub_status模块。如果未输出任何结果则可以使用–with-http_stub_status_module参数从源码重新配置编译Nginx。 在安装 nginx-prometheus-exporter 之前需要先在 Nginx 的配置文件中开放 stub_status 端点。 location /stub_status { # 具体路径可根据业务情况进行调整stub_status;}浏览器访问验证端点http://192.168.44.168/stub_status Active connections: 60 server accepts handled requests86247 86247 113387 Reading: 0 Writing: 5 Waiting: 55 安装nginx-prometheus-exporter 在需要监测的主机上编辑 docker-compose.yml 文件增加安装 nginx-prometheus-exporter 配置。 [rootsvc monitoring]# vi docker-compose.yml version: 3 services:ops-nginx-exporter:container_name: ops-nginx-exporterimage: nginx/nginx-prometheus-exporter:1.3.0networks:- custom_networkenvironment:SCRAPE_URI: http://192.168.44.168/stub_statusports:- 9113:9113restart: unless-stopped通过命令 docker-compose up -d 完成镜像拉取、并启动 ops-nginx-exporter 服务。 修改Prometheus配置 在 Prometheus 配置中增加对svc主机上 Nginx 运行状态的抓取配置。 [rootops monitoring]# vi ./prometheus/conf/prometheus.yml scrape_configs:- job_name: ops-nginxscrape_interval: 15sstatic_configs:- targets:- 192.168.44.168:9113 重启 Prometheus 容器。 [rootops monitoring]# docker restart ops-prometheus验证nginx-prometheus-exporter安装结果 浏览器验证metrics端点 浏览器访问http://192.168.44.168:9113/metrics Prometheus控制台验证nginx相关的指标 配置Grafana对主机状态的可视化 浏览器访问http://192.168.44.169:3000。 配置数据源 点击左侧菜单中的Add new connection。选择或搜索Data Sources。点击Add data source并选择Prometheus。在HTTP部分输入Prometheus地址eghttp://192.168.44.169:9090点击Save Test确认连接成功。 查看现成的仪表板 https://grafana.com/grafana/dashboards/这个页面是 Grafana 的官方仪表板目录用户可以在这里找到和共享各种现成的 Grafana 仪表板。这些仪表板覆盖了多种监控需求包括系统性能、应用监控、网络流量等。用户可以根据自己的需求搜索和导入适合的仪表板提高监控效率和可视化效果。这里我们搜索 Nginx 结果中有个 NGINX by nginxinc 点击进去可以查看详细的UI效果复制仪表板的id此处是11199。 导入现成的仪表板 在右侧菜单中点击New按钮然后选择Import。在输入框中可以直接输入现成仪表板的ID或者上传JSON文件。常用的主机监控仪表板ID是11199NGINX by nginxinc。点击Load随后选择已配置好的数据源。点击Import完成导入。 Nginx监控效果 svc节点Nacos服务 无需 exporter Nacos 提供了一个用于监控的内置端点可以通过该端点获取 Nacos 的各种监控指标并将其暴露给 Prometheus 进行采集和存储。 Nacos 本身是一个 SpringBoot 应用通过内置的监控端点 /actuator/prometheus 可以获取 Nacos 的各种监控指标包括服务注册与发现的状态、配置管理的信息、健康检查的结果等。 修改Prometheus配置 在 Prometheus 配置中增加对svc主机上 Nacos 运行状态的抓取配置。 [rootops monitoring]# vi ./prometheus/conf/prometheus.yml scrape_configs:- job_name: ops-nacosmetrics_path: /nacos/actuator/prometheusscrape_interval: 15sstatic_configs:- targets:- 192.168.44.168:8848重启 Prometheus 容器。 [rootops monitoring]# docker restart ops-prometheus验证nacos指标端点 浏览器验证metrics端点 浏览器访问http://192.168.44.168:8848/nacos/actuator/prometheus Prometheus控制台验证nacos相关的指标 配置Grafana对主机状态的可视化 浏览器访问http://192.168.44.169:3000。 配置数据源 点击左侧菜单中的Add new connection。选择或搜索Data Sources。点击Add data source并选择Prometheus。在HTTP部分输入Prometheus地址eghttp://192.168.44.169:9090点击Save Test确认连接成功。 查看现成的仪表板 https://grafana.com/grafana/dashboards/这个页面是 Grafana 的官方仪表板目录用户可以在这里找到和共享各种现成的 Grafana 仪表板。这些仪表板覆盖了多种监控需求包括系统性能、应用监控、网络流量等。用户可以根据自己的需求搜索和导入适合的仪表板提高监控效率和可视化效果。这里我们搜索 Nacos 结果中有个 Nacos 点击进去可以查看详细的UI效果复制仪表板的id此处是13221。 导入现成的仪表板 在右侧菜单中点击New按钮然后选择Import。在输入框中可以直接输入现成仪表板的ID或者上传JSON文件。常用的主机监控仪表板ID是13221Nacos。点击Load随后选择已配置好的数据源。点击Import完成导入。 Nacos监控效果 小总结 If you can’t measure it, you can’t improve it! 没有度量就没有改进实际上监控系统有以下两个客户技术业务。上述内容即是对技术组件的监控方便技术方面的改进与优化。 本文记录了在 Docker 环境下通过 Prometheus 和 Grafana 实现对 Nginx 和 Nacos 服务的监控。具体步骤包括在服务节点上使用 docker-compose 安装 nginx-prometheus-exporter 配置 Prometheus 抓取 Nginx 和 Nacos 的监控数据并在 Grafana 中配置数据源和导入现成的监控仪表板以实现对反向代理服务和注册中心服务的性能监控和可视化。 Reference https://github.com/nginxinc/nginx-prometheus-exporter/releaseshttps://grafana.com/grafana/dashboards/ If you have any questions or any bugs are found, please feel free to contact me. Your comments and suggestions are welcome!