spring-prometheus的指标含义_http_server_requests_seconds_sum-程序员宅基地

技术标签: 运维  监控  服务器  

前言

spring-boot作为一个长时间运行的服务,需要也应该能采集到一些指标来反映系统自身的运行状态。下面就spring-boot输出的一些指标分类说明。

依赖

spring-boot开启指标采集需要加入prometheus依赖

指标处理

name type data
http_server_requests_seconds summary http_server_requests_seconds_count{exception=“None”,method=“GET”,outcome=“SUCCESS”,status=“200”,uri=“/actuator/prometheus”,} 27.0
http_server_requests_seconds_sum{exception=“None”,method=“GET”,outcome=“SUCCESS”,status=“200”,uri=“/actuator/prometheus”,} 0.588996633
http_server_requests_seconds_max gauge http_server_requests_seconds_max{exception=“None”,method=“GET”,outcome=“SUCCESS”,status=“200”,uri=“/actuator/prometheus”,} 0.0
jvm_buffer_count_buffers gauge jvm_buffer_count_buffers{id=“direct”,} 14.0
jvm_buffer_count_buffers{id=“mapped”,} 0.0
jvm_buffer_memory_used_bytes gauge jvm_buffer_memory_used_bytes{id=“direct”,} 84505.0
jvm_buffer_memory_used_bytes{id=“mapped”,} 0.0
jvm_buffer_total_capacity_bytes gauge jvm_buffer_total_capacity_bytes{id=“direct”,} 84504.0
jvm_buffer_total_capacity_bytes{id=“mapped”,} 0.0
jvm_classes_loaded_classes gauge jvm_classes_loaded_classes 20253.0
jvm_classes_unloaded_classes_total counter jvm_classes_unloaded_classes_total 0.0
jvm_gc_live_data_size_bytes gauge jvm_gc_live_data_size_bytes 0.0
jvm_gc_max_data_size_bytes gauge jvm_gc_max_data_size_bytes 0.0
jvm_gc_memory_allocated_bytes_total counter jvm_gc_memory_allocated_bytes_total 2.7926361312E10
jvm_gc_memory_promoted_bytes_total counter jvm_gc_memory_promoted_bytes_total 9.8676712E7
jvm_gc_pause_seconds summary jvm_gc_pause_seconds_count{action=“end of minor GC”,cause=“Allocation Failure”,} 29.0
jvm_gc_pause_seconds_sum{action=“end of minor GC”,cause=“Allocation Failure”,} 0.627
jvm_gc_pause_seconds_max gauge jvm_gc_pause_seconds_max{action=“end of minor GC”,cause=“Allocation Failure”,} 0.0
jvm_memory_committed_bytes gauge jvm_memory_committed_bytes{area=“heap”,id=“PS Survivor Space”,} 2.6738688E7
jvm_memory_committed_bytes{area=“heap”,id=“PS Old Gen”,} 1.073741824E9
jvm_memory_committed_bytes{area=“heap”,id=“PS Eden Space”,} 1.018167296E9
jvm_memory_committed_bytes{area=“nonheap”,id=“Metaspace”,} 1.1665408E8
jvm_memory_committed_bytes{area=“nonheap”,id=“Code Cache”,} 5.4460416E7
jvm_memory_committed_bytes{area=“nonheap”,id=“Compressed Class Space”,} 1.5204352E7
jvm_memory_max_bytes gauge jvm_memory_max_bytes{area=“heap”,id=“PS Survivor Space”,} 2.6738688E7
jvm_memory_max_bytes{area=“heap”,id=“PS Old Gen”,} 1.073741824E9
jvm_memory_max_bytes{area=“heap”,id=“PS Eden Space”,} 1.021837312E9
jvm_memory_max_bytes{area=“nonheap”,id=“Metaspace”,} 5.36870912E8
jvm_memory_max_bytes{area=“nonheap”,id=“Code Cache”,} 2.5165824E8
jvm_memory_max_bytes{area=“nonheap”,id=“Compressed Class Space”,} 1.073741824E9
jvm_memory_used_bytes gauge jvm_memory_used_bytes{area=“heap”,id=“PS Survivor Space”,} 950272.0
jvm_memory_used_bytes{area=“heap”,id=“PS Old Gen”,} 9.8824184E7
jvm_memory_used_bytes{area=“heap”,id=“PS Eden Space”,} 2.52719712E8
jvm_memory_used_bytes{area=“nonheap”,id=“Metaspace”,} 1.1141044E8
jvm_memory_used_bytes{area=“nonheap”,id=“Code Cache”,} 5.4003136E7
jvm_memory_used_bytes{area=“nonheap”,id=“Compressed Class Space”,} 1.4348728E7
jvm_threads_daemon_threads gauge jvm_threads_daemon_threads 76.0
jvm_threads_live_threads gauge jvm_threads_live_threads 145.0
jvm_threads_peak_threads gauge jvm_threads_peak_threads 153.0
jvm_threads_states_threads gauge jvm_threads_states_threads{state=“runnable”,} 26.0
jvm_threads_states_threads{state=“blocked”,} 0.0
jvm_threads_states_threads{state=“waiting”,} 93.0
jvm_threads_states_threads{state=“timed-waiting”,} 26.0
jvm_threads_states_threads{state=“new”,} 0.0
jvm_threads_states_threads{state=“terminated”,} 0.0
logback_events_total counter logback_events_total{level=“warn”,} 4.0
logback_events_total{level=“debug”,} 0.0
logback_events_total{level=“error”,} 0.0
logback_events_total{level=“trace”,} 0.0
logback_events_total{level=“info”,} 76.0
process_cpu_usage gauge process_cpu_usage 1.0818998160770312E-4
process_files_max_files gauge process_files_max_files 1048576.0
process_files_open_files gauge process_files_open_files 186.0
process_start_time_seconds gauge process_start_time_seconds 1.64880968199E9
process_uptime_seconds gauge process_uptime_seconds 95315.395
rabbitmq_acknowledged_published_total counter rabbitmq_acknowledged_published_total{name=“rabbit”,} 0.0
rabbitmq_acknowledged_total counter rabbitmq_acknowledged_total{name=“rabbit”,} 126.0
rabbitmq_channels gauge rabbitmq_channels{name=“rabbit”,} 5.0
rabbitmq_connections gauge rabbitmq_connections{name=“rabbit”,} 2.0
rabbitmq_consumed_total counter rabbitmq_consumed_total{name=“rabbit”,} 126.0
rabbitmq_failed_to_publish_total counter rabbitmq_failed_to_publish_total{name=“rabbit”,} 0.0
rabbitmq_not_acknowledged_published_total counter rabbitmq_not_acknowledged_published_total{name=“rabbit”,} 0.0
rabbitmq_published_total counter rabbitmq_published_total{name=“rabbit”,} 126.0
rabbitmq_rejected_total counter rabbitmq_rejected_total{name=“rabbit”,} 0.0
rabbitmq_unrouted_published_total counter rabbitmq_unrouted_published_total{name=“rabbit”,} 0.0
spring_integration_channels gauge spring_integration_channels 10.0
spring_integration_handlers gauge spring_integration_handlers 10.0
spring_integration_send_seconds summary spring_integration_send_seconds_count{exception=“none”,name=“unknown”,result=“success”,type=“handler”,} 126.0
spring_integration_send_seconds_sum{exception=“none”,name=“unknown”,result=“success”,type=“handler”,} 4.624411586
spring_integration_send_seconds_count{exception=“none”,name=“_INPUT”,result=“success”,type=“channel”,} 126.0
spring_integration_send_seconds_sum{exception=“none”,name=“_INPUT”,result=“success”,type=“channel”,} 4.628215394
spring_integration_send_seconds_count{exception=“none”,name=“_OUTPUT”,result=“success”,type=“channel”,} 126.0
spring_integration_send_seconds_sum{exception=“none”,name=“_OUTPUT”,result=“success”,type=“channel”,} 0.137322503
spring_integration_send_seconds_max gauge spring_integration_send_seconds_max{exception=“none”,name=“unknown”,result=“success”,type=“handler”,} 0.0
spring_integration_send_seconds_max{exception=“none”,name=“_INPUT”,result=“success”,type=“channel”,} 0.0
spring_integration_send_seconds_max{exception=“none”,name=“_OUTPUT”,result=“success”,type=“channel”,} 0.0
spring_integration_sources gauge spring_integration_sources 0.0
system_cpu_count gauge system_cpu_count 24.0
system_cpu_usage gauge system_cpu_usage 0.10151826607522811
system_load_average_1m gauge system_load_average_1m 3.9
tomcat_global_error_total counter tomcat_global_error_total{name=“http-nio-8080”,} 0.0
tomcat_global_received_bytes_total counter tomcat_global_received_bytes_total{name=“http-nio-8080”,} 0.0
tomcat_global_request_max_seconds gauge tomcat_global_request_max_seconds{name=“http-nio-8080”,} 0.482
tomcat_global_request_seconds summary tomcat_global_request_seconds_count{name=“http-nio-8080”,} 27.0
tomcat_global_request_seconds_sum{name=“http-nio-8080”,} 0.81
tomcat_global_sent_bytes_total counter tomcat_global_sent_bytes_total{name=“http-nio-8080”,} 281704.0
tomcat_sessions_active_current_sessions gauge tomcat_sessions_active_current_sessions 0.0
tomcat_sessions_active_max_sessions gauge tomcat_sessions_active_max_sessions 0.0
tomcat_sessions_alive_max_seconds gauge tomcat_sessions_alive_max_seconds 0.0
tomcat_sessions_created_sessions_total counter tomcat_sessions_created_sessions_total 0.0
tomcat_sessions_expired_sessions_total counter tomcat_sessions_expired_sessions_total 0.0
tomcat_sessions_rejected_sessions_total counter tomcat_sessions_rejected_sessions_total 0.0
tomcat_threads_busy_threads gauge tomcat_threads_busy_threads{name=“http-nio-8080”,} 1.0
tomcat_threads_config_max_threads gauge tomcat_threads_config_max_threads{name=“http-nio-8080”,} 2000.0
tomcat_threads_current_threads gauge tomcat_threads_current_threads{name=“http-nio-8080”,} 10.0

指标说明

http请求

  • 每秒http请求数 http_server_requests_seconds
  • http请求数峰值 http_server_requests_seconds_max

jvm

缓冲区

  • 计数缓冲 jvm_buffer_count_buffers
  • 缓冲内存使用大小 jvm_buffer_memory_used_bytes
  • 缓冲容量大小 jvm_buffer_total_capacity_bytes

类信息

  • 已加载类个数 jvm_classes_loaded_classes
  • 已卸载类总数 jvm_classes_unloaded_classes_total

gc信息

  • gc存活数据大小 jvm_gc_live_data_size_bytes
  • gc最大数据大小 jvm_gc_max_data_size_bytes
  • gc分配的内存大小 jvm_gc_memory_allocated_bytes_total
  • gc晋升到下一代的内存大小 jvm_gc_memory_promoted_bytes_total
  • gc等待的时间 jvm_gc_pause_seconds
  • gc等待的最大时间 jvm_gc_pause_seconds_max

内存信息

  • 已提交内存 jvm_memory_committed_bytes
  • 最大内存 jvm_memory_max_bytes
  • 已使用内存 jvm_memory_used_bytes

线程信息

  • 守护线程 jvm_threads_daemon_threads
  • 存活线程 jvm_threads_live_threads
  • 线程峰值 jvm_threads_peak_threads
  • 不同状态的线程 jvm_threads_states_threads

日志

  • 打印日志个数 logback_events_total

进程

  • cpu使用率 process_cpu_usage
  • 最大文件数 process_files_max_files
  • 打开文件数 process_files_open_files
  • 进程启动时刻 process_start_time_seconds
  • 进程运行时间 process_uptime_seconds

rabbitmq

  • 已发布消息数 rabbitmq_published_total
  • 已消费消息数 rabbitmq_consumed_total
  • 已拒绝消息数 rabbitmq_rejected_total
  • 已确认消息数 rabbitmq_acknowledged_total
  • 通道数 rabbitmq_channels
  • 连接数 rabbitmq_connections

integration

  • 通道数 spring_integration_channels
  • 处理器数 spring_integration_handlers
  • 发送消息数 spring_integration_send_seconds
  • 单位时间发送消息最大值 spring_integration_send_seconds_max

系统信息

  • cpu个数 system_cpu_count
  • cpu使用情况 system_cpu_usage
  • 系统平均负载 system_load_average_1m

tomcat信息

全局信息

  • 总体报错数 tomcat_global_error_total
  • 接收的字节总数 tomcat_global_received_bytes_total
  • 发出的字节总数 tomcat_global_sent_bytes_total
  • 每秒最大请求数 tomcat_global_request_max_seconds
  • 每秒请求数 tomcat_global_request_seconds

会话信息

  • 目前活跃会话数 tomcat_sessions_active_current_sessions
  • 活跃最大会话数 tomcat_sessions_active_max_sessions
  • 会话活跃的最长时间 tomcat_sessions_alive_max_seconds
  • 累计创建的会话数 tomcat_sessions_created_sessions_total
  • 累计失效的会话数 tomcat_sessions_expired_sessions_total
  • 累计拒绝的会话数 tomcat_sessions_rejected_sessions_total

线程信息

  • 繁忙的线程数 tomcat_threads_busy_threads
  • 配置的最大线程数 tomcat_threads_config_max_threads
  • 当前线程数 tomcat_threads_current_threads

总结

根据项目的依赖的不同,指标会增加或减少。仔细分析这些指标,还是挺有用处的。了解服务的运行状况有助于排查服务的问题,并做出合理的决策。

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/ssehs/article/details/123961221

智能推荐

【史上最易懂】马尔科夫链-蒙特卡洛方法:基于马尔科夫链的采样方法,从概率分布中随机抽取样本,从而得到分布的近似_马尔科夫链期望怎么求-程序员宅基地

文章浏览阅读1.3k次,点赞40次,收藏19次。虽然你不能直接计算每个房间的人数,但通过马尔科夫链的蒙特卡洛方法,你可以从任意状态(房间)开始采样,并最终收敛到目标分布(人数分布)。然后,根据一个规则(假设转移概率是基于房间的人数,人数较多的房间具有较高的转移概率),你随机选择一个相邻的房间作为下一个状态。比如在巨大城堡,里面有很多房间,找到每个房间里的人数分布情况(每个房间被访问的次数),但是你不能一次进入所有的房间并计数。但是,当你重复这个过程很多次时,你会发现你更有可能停留在人数更多的房间,而在人数较少的房间停留的次数较少。_马尔科夫链期望怎么求

linux以root登陆命令,su命令和sudo命令,以及限制root用户登录-程序员宅基地

文章浏览阅读3.9k次。一、su命令su命令用于切换当前用户身份到其他用户身份,变更时须输入所要变更的用户帐号与密码。命令su的格式为:su [-] username1、后面可以跟 ‘-‘ 也可以不跟,普通用户su不加username时就是切换到root用户,当然root用户同样可以su到普通用户。 ‘-‘ 这个字符的作用是,加上后会初始化当前用户的各种环境变量。下面看下加‘-’和不加‘-’的区别:root用户切换到普通..._限制su root登陆

精通VC与Matlab联合编程(六)_精通vc和matlab联合编程 六-程序员宅基地

文章浏览阅读1.2k次。精通VC与Matlab联合编程(六)作者:邓科下载源代码浅析VC与MATLAB联合编程浅析VC与MATLAB联合编程浅析VC与MATLAB联合编程浅析VC与MATLAB联合编程浅析VC与MATLAB联合编程  Matlab C/C++函数库是Matlab扩展功能重要的组成部分,包含了大量的用C/C++语言重新编写的Matlab函数,主要包括初等数学函数、线形代数函数、矩阵操作函数、数值计算函数_精通vc和matlab联合编程 六

Asp.Net MVC2中扩展ModelMetadata的DescriptionAttribute。-程序员宅基地

文章浏览阅读128次。在MVC2中默认并没有实现DescriptionAttribute(虽然可以找到这个属性,通过阅读MVC源码,发现并没有实现方法),这很不方便,特别是我们使用EditorForModel的时候,我们需要对字段进行简要的介绍,下面来扩展这个属性。新建类 DescriptionMetadataProvider然后重写DataAnnotationsModelMetadataPro..._asp.net mvc 模型description

领域模型架构 eShopOnWeb项目分析 上-程序员宅基地

文章浏览阅读1.3k次。一.概述  本篇继续探讨web应用架构,讲基于DDD风格下最初的领域模型架构,不同于DDD风格下CQRS架构,二者架构主要区别是领域层的变化。 架构的演变是从领域模型到C..._eshoponweb

Springboot中使用kafka_springboot kafka-程序员宅基地

文章浏览阅读2.6w次,点赞23次,收藏85次。首先说明,本人之前没用过zookeeper、kafka等,尚硅谷十几个小时的教程实在没有耐心看,现在我也不知道分区、副本之类的概念。用kafka只是听说他比RabbitMQ快,我也是昨天晚上刚使用,下文中若有讲错的地方或者我的理解与它的本质有偏差的地方请包涵。此文背景的环境是windows,linux流程也差不多。 官网下载kafka,选择Binary downloads Apache Kafka 解压在D盘下或者什么地方,注意不要放在桌面等绝对路径太长的地方 打开conf_springboot kafka

随便推点

VS2008+水晶报表 发布后可能无法打印的解决办法_水晶报表 不能打印-程序员宅基地

文章浏览阅读1k次。编好水晶报表代码,用的是ActiveX模式,在本机运行,第一次运行提示安装ActiveX控件,安装后,一切正常,能正常打印,但发布到网站那边运行,可能是一闪而过,连提示安装ActiveX控件也没有,甚至相关的功能图标都不能正常显示,再点"打印图标"也是没反应解决方法是: 1.先下载"PrintControl.cab" http://support.businessobjects.c_水晶报表 不能打印

一. UC/OS-Ⅱ简介_ucos-程序员宅基地

文章浏览阅读1.3k次。绝大部分UC/OS-II的源码是用移植性很强的ANSI C写的。也就是说某产品可以只使用很少几个UC/OS-II调用,而另一个产品则使用了几乎所有UC/OS-II的功能,这样可以减少产品中的UC/OS-II所需的存储器空间(RAM和ROM)。UC/OS-II是为嵌入式应用而设计的,这就意味着,只要用户有固化手段(C编译、连接、下载和固化), UC/OS-II可以嵌入到用户的产品中成为产品的一部分。1998年uC/OS-II,目前的版本uC/OS -II V2.61,2.72。1.UC/OS-Ⅱ简介。_ucos

python自动化运维要学什么,python自动化运维项目_运维学python该学些什么-程序员宅基地

文章浏览阅读614次,点赞22次,收藏11次。大家好,本文将围绕python自动化运维需要掌握的技能展开说明,python自动化运维从入门到精通是一个很多人都想弄明白的事情,想搞清楚python自动化运维快速入门 pdf需要先了解以下几个事情。这篇文章主要介绍了一个有趣的事情,具有一定借鉴价值,需要的朋友可以参考下。希望大家阅读完这篇文章后大有收获,下面让小编带着大家一起了解一下。_运维学python该学些什么

解决IISASP调用XmlHTTP出现msxml3.dll (0x80070005) 拒绝访问的错误-程序员宅基地

文章浏览阅读524次。2019独角兽企业重金招聘Python工程师标准>>> ..._hotfix for msxml 4.0 service pack 2 - kb832414

python和易语言的脚本哪门更实用?_易语言还是python适合辅助-程序员宅基地

文章浏览阅读546次。python和易语言的脚本哪门更实用?_易语言还是python适合辅助

redis watch使用场景_详解redis中的锁以及使用场景-程序员宅基地

文章浏览阅读134次。详解redis中的锁以及使用场景,指令,事务,分布式,命令,时间详解redis中的锁以及使用场景易采站长站,站长之家为您整理了详解redis中的锁以及使用场景的相关内容。分布式锁什么是分布式锁?分布式锁是控制分布式系统之间同步访问共享资源的一种方式。为什么要使用分布式锁?​ 为了保证共享资源的数据一致性。什么场景下使用分布式锁?​ 数据重要且要保证一致性如何实现分布式锁?主要介绍使用redis来实..._redis setnx watch

推荐文章

热门文章

相关标签