96SEO 2026-02-19 09:50 0
。

它由以下几个核心组件构成#xff1a;数据爬虫#xff1a;
根据配置的时间定期的通过HTTP抓去metrics数据。
time-series
Prometheus官网地址https://prometheus.io/Prometheus是一个开源的监控系统起源于SoundCloud。
它由以下几个核心组件构成数据爬虫
根据配置的时间定期的通过HTTP抓去metrics数据。
time-series
Grafana官网地址https://grafana.com/Grafana使你能够把来自不同数据源比如Elasticsearch,
influxDB等多样的数据以绚丽的图标展示出来。
它也能基于你的metrics数据发出告警。
当一个告警状态改变时它能通知你通过emailslack或者其他途径。
Grafana是一个开源的度量分析与可视化套件纯JavaScript开发的前端工具通过访问库如InfluxDB展示自定义报表、显示图表等。
它的UI十分灵活有丰富的插件和模板功能强大。
一般用在时序数据的监控方面。
2、项目2.1
引入依赖dependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-actuator/artifactId
/dependencydependencygroupIdio.micrometer/groupIdartifactIdmicrometer-registry-prometheus/artifactIdscoperuntime/scope
配置文件management:metrics:tags:application:
${spring.application.name}export:prometheus:enabled:
true#开启暴露webendpoints:web:exposure:include:
访问地址http://localhost:8080/actuator/prometheus#
jvm_gc_memory_promoted_bytes_total
jvm_gc_memory_promoted_bytes_total
jvm_gc_memory_promoted_bytes_total{applicationprometheus-demo,}
executor_queue_remaining_tasks{applicationprometheus-demo,nameapplicationTaskExecutor,}
jvm_gc_pause_seconds_count{actionend
GC,applicationprometheus-demo,causeAllocation
jvm_gc_pause_seconds_sum{actionend
GC,applicationprometheus-demo,causeAllocation
jvm_gc_pause_seconds_count{actionend
GC,applicationprometheus-demo,causeErgonomics,}
jvm_gc_pause_seconds_sum{actionend
GC,applicationprometheus-demo,causeErgonomics,}
jvm_gc_pause_seconds_max{actionend
GC,applicationprometheus-demo,causeAllocation
jvm_gc_pause_seconds_max{actionend
GC,applicationprometheus-demo,causeErgonomics,}
tomcat_sessions_active_current_sessions
tomcat_sessions_active_current_sessions
tomcat_sessions_active_current_sessions{applicationprometheus-demo,}
jvm_threads_daemon_threads{applicationprometheus-demo,}
process_files_max_files{applicationprometheus-demo,}
http_server_requests_seconds_count{applicationprometheus-demo,exceptionNone,methodGET,outcomeSUCCESS,status200,uri/actuator,}
http_server_requests_seconds_sum{applicationprometheus-demo,exceptionNone,methodGET,outcomeSUCCESS,status200,uri/actuator,}
http_server_requests_seconds_count{applicationprometheus-demo,exceptionNone,methodGET,outcomeSUCCESS,status200,uri/actuator/prometheus,}
http_server_requests_seconds_sum{applicationprometheus-demo,exceptionNone,methodGET,outcomeSUCCESS,status200,uri/actuator/prometheus,}
http_server_requests_seconds_count{applicationprometheus-demo,exceptionNone,methodGET,outcomeCLIENT_ERROR,status404,uri/**,}
http_server_requests_seconds_sum{applicationprometheus-demo,exceptionNone,methodGET,outcomeCLIENT_ERROR,status404,uri/**,}
http_server_requests_seconds_max
http_server_requests_seconds_max
http_server_requests_seconds_max{applicationprometheus-demo,exceptionNone,methodGET,outcomeSUCCESS,status200,uri/actuator,}
http_server_requests_seconds_max{applicationprometheus-demo,exceptionNone,methodGET,outcomeSUCCESS,status200,uri/actuator/prometheus,}
http_server_requests_seconds_max{applicationprometheus-demo,exceptionNone,methodGET,outcomeCLIENT_ERROR,status404,uri/**,}
jvm_gc_memory_allocated_bytes_total
jvm_gc_memory_allocated_bytes_total
jvm_gc_memory_allocated_bytes_total{applicationprometheus-demo,}
jvm_threads_live_threads{applicationprometheus-demo,}
tomcat_sessions_active_max_sessions
tomcat_sessions_active_max_sessions
tomcat_sessions_active_max_sessions{applicationprometheus-demo,}
jvm_threads_states_threads{applicationprometheus-demo,staterunnable,}
jvm_threads_states_threads{applicationprometheus-demo,statenew,}
jvm_threads_states_threads{applicationprometheus-demo,statetimed-waiting,}
jvm_threads_states_threads{applicationprometheus-demo,stateblocked,}
jvm_threads_states_threads{applicationprometheus-demo,statewaiting,}
jvm_threads_states_threads{applicationprometheus-demo,stateterminated,}
jvm_classes_loaded_classes{applicationprometheus-demo,}
process_uptime_seconds{applicationprometheus-demo,}
executor_queued_tasks{applicationprometheus-demo,nameapplicationTaskExecutor,}
process_files_open_files{applicationprometheus-demo,}
process_cpu_usage{applicationprometheus-demo,}
disk_total_bytes{applicationprometheus-demo,path/root/project/prometheus/share/prometheus/prometheus-demo/target/.,}
application_started_time_seconds
application_started_time_seconds
application_started_time_seconds{applicationprometheus-demo,main_application_classcom.ybw.PrometheusDemoApplication,}
system_load_average_1m{applicationprometheus-demo,}
disk_free_bytes{applicationprometheus-demo,path/root/project/prometheus/share/prometheus/prometheus-demo/target/.,}
process_start_time_seconds{applicationprometheus-demo,}
application_ready_time_seconds{applicationprometheus-demo,main_application_classcom.ybw.PrometheusDemoApplication,}
jvm_memory_used_bytes{applicationprometheus-demo,areaheap,idPS
jvm_memory_used_bytes{applicationprometheus-demo,areaheap,idPS
jvm_memory_used_bytes{applicationprometheus-demo,areanonheap,idMetaspace,}
jvm_memory_used_bytes{applicationprometheus-demo,areanonheap,idCode
jvm_memory_used_bytes{applicationprometheus-demo,areaheap,idPS
jvm_memory_used_bytes{applicationprometheus-demo,areanonheap,idCompressed
jvm_gc_live_data_size_bytes{applicationprometheus-demo,}
jvm_buffer_count_buffers{applicationprometheus-demo,idmapped,}
jvm_buffer_count_buffers{applicationprometheus-demo,iddirect,}
jvm_memory_committed_bytes{applicationprometheus-demo,areaheap,idPS
jvm_memory_committed_bytes{applicationprometheus-demo,areaheap,idPS
jvm_memory_committed_bytes{applicationprometheus-demo,areanonheap,idMetaspace,}
jvm_memory_committed_bytes{applicationprometheus-demo,areanonheap,idCode
jvm_memory_committed_bytes{applicationprometheus-demo,areaheap,idPS
jvm_memory_committed_bytes{applicationprometheus-demo,areanonheap,idCompressed
tomcat_sessions_created_sessions_total
tomcat_sessions_created_sessions_total
tomcat_sessions_created_sessions_total{applicationprometheus-demo,}
executor_pool_size_threads{applicationprometheus-demo,nameapplicationTaskExecutor,}
executor_completed_tasks_total{applicationprometheus-demo,nameapplicationTaskExecutor,}
system_cpu_usage{applicationprometheus-demo,}
executor_pool_core_threads{applicationprometheus-demo,nameapplicationTaskExecutor,}
jvm_memory_max_bytes{applicationprometheus-demo,areaheap,idPS
jvm_memory_max_bytes{applicationprometheus-demo,areaheap,idPS
jvm_memory_max_bytes{applicationprometheus-demo,areanonheap,idMetaspace,}
jvm_memory_max_bytes{applicationprometheus-demo,areanonheap,idCode
jvm_memory_max_bytes{applicationprometheus-demo,areaheap,idPS
jvm_memory_max_bytes{applicationprometheus-demo,areanonheap,idCompressed
executor_pool_max_threads{applicationprometheus-demo,nameapplicationTaskExecutor,}
jvm_buffer_memory_used_bytes{applicationprometheus-demo,idmapped,}
jvm_buffer_memory_used_bytes{applicationprometheus-demo,iddirect,}
system_cpu_count{applicationprometheus-demo,}
jvm_classes_unloaded_classes_total
jvm_classes_unloaded_classes_total
jvm_classes_unloaded_classes_total{applicationprometheus-demo,}
jvm_gc_overhead_percent{applicationprometheus-demo,}
jvm_buffer_total_capacity_bytes
jvm_buffer_total_capacity_bytes
jvm_buffer_total_capacity_bytes{applicationprometheus-demo,idmapped,}
jvm_buffer_total_capacity_bytes{applicationprometheus-demo,iddirect,}
tomcat_sessions_alive_max_seconds
tomcat_sessions_alive_max_seconds
tomcat_sessions_alive_max_seconds{applicationprometheus-demo,}
jvm_threads_peak_threads{applicationprometheus-demo,}
executor_active_threads{applicationprometheus-demo,nameapplicationTaskExecutor,}
jvm_gc_max_data_size_bytes{applicationprometheus-demo,}
tomcat_sessions_expired_sessions_total
tomcat_sessions_expired_sessions_total
tomcat_sessions_expired_sessions_total{applicationprometheus-demo,}
logback_events_total{applicationprometheus-demo,levelinfo,}
logback_events_total{applicationprometheus-demo,leveltrace,}
logback_events_total{applicationprometheus-demo,levelwarn,}
logback_events_total{applicationprometheus-demo,leveldebug,}
logback_events_total{applicationprometheus-demo,levelerror,}
tomcat_sessions_rejected_sessions_total
tomcat_sessions_rejected_sessions_total
tomcat_sessions_rejected_sessions_total{applicationprometheus-demo,}
jvm_memory_usage_after_gc_percent
jvm_memory_usage_after_gc_percent
jvm_memory_usage_after_gc_percent{applicationprometheus-demo,areaheap,poollong-lived,}
Prometheus安装我们使用docker进行安装。
首先拉去镜像#
prom/prometheus准备配置文件prometheus.yml${host1}、${host2}为变量例如可以替换为localhost:8080scrape_configs:
采集服务的地址设置成Springboot应用所在服务器的具体地址static_configs:-
[${host1},${host2}]启动--log.leveldebug日志以debug输出--storage.tsdb.retention.time3d数据保留3天--config.file/etc/prometheus/prometheus.yml容器里面的默认路径docker
/root/docker-images/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
--storage.tsdb.retention.time3d
--config.file/etc/prometheus/prometheus.yml或者启动脚本docker
/root/docker-images/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
--config.file/etc/prometheus/prometheus.yml启动成功后访问地址http://${ip}:9090/页面展示3.2
grafana/grafana访问地址http://localhost:3000账号admin密码admin页面展示3.3
URL注意Name必须为首字母大写Prometheus不能全写成小写的prometheus。
因为Prometheus和Grafana都是docker安装所以url需要写外网地址。
2新建
Dashboard配置title、description配置Data
模板套用Grafana提供了许多优秀的模板可以网页https://grafana.com/grafana/dashboards
作为专业的SEO优化服务提供商,我们致力于通过科学、系统的搜索引擎优化策略,帮助企业在百度、Google等搜索引擎中获得更高的排名和流量。我们的服务涵盖网站结构优化、内容优化、技术SEO和链接建设等多个维度。
| 服务项目 | 基础套餐 | 标准套餐 | 高级定制 |
|---|---|---|---|
| 关键词优化数量 | 10-20个核心词 | 30-50个核心词+长尾词 | 80-150个全方位覆盖 |
| 内容优化 | 基础页面优化 | 全站内容优化+每月5篇原创 | 个性化内容策略+每月15篇原创 |
| 技术SEO | 基本技术检查 | 全面技术优化+移动适配 | 深度技术重构+性能优化 |
| 外链建设 | 每月5-10条 | 每月20-30条高质量外链 | 每月50+条多渠道外链 |
| 数据报告 | 月度基础报告 | 双周详细报告+分析 | 每周深度报告+策略调整 |
| 效果保障 | 3-6个月见效 | 2-4个月见效 | 1-3个月快速见效 |
我们的SEO优化服务遵循科学严谨的流程,确保每一步都基于数据分析和行业最佳实践:
全面检测网站技术问题、内容质量、竞争对手情况,制定个性化优化方案。
基于用户搜索意图和商业目标,制定全面的关键词矩阵和布局策略。
解决网站技术问题,优化网站结构,提升页面速度和移动端体验。
创作高质量原创内容,优化现有页面,建立内容更新机制。
获取高质量外部链接,建立品牌在线影响力,提升网站权威度。
持续监控排名、流量和转化数据,根据效果调整优化策略。
基于我们服务的客户数据统计,平均优化效果如下:
我们坚信,真正的SEO优化不仅仅是追求排名,而是通过提供优质内容、优化用户体验、建立网站权威,最终实现可持续的业务增长。我们的目标是与客户建立长期合作关系,共同成长。
Demand feedback