首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏码匠的流水账

    springboot2增加diskspace指标

    * @author Andy Wilkinson * @since 1.2.0 */ @ConfigurationProperties(prefix = "management.health.diskspace (in bytes) */ public DiskSpaceHealthIndicator(File path, long threshold) { super("DiskSpace " ] } /actuator/metrics/diskspace.usage { "name": "diskspace.usage", "measurements": [ { "statistic ": "VALUE", "value": 96.99886102691765 } ], "availableTags": [] } 小结 springboot2默认把diskspace作为一个 这里通过自定义micrometer的metrics,新增diskspace相关指标,这样就可以统一通过metrcis进行监控报警。

    1.9K10发布于 2018-09-17
  • 来自专栏云深之无迹

    Python UNIX系统管理指南

    = "df" diskspace_arg = "-h" print ("Gathering diskspace information %s command:\n" % diskspace) subprocess.call ([diskspace, diskspace_arg]) #! ="df -h" printf "Gathering diskspace information with the $DISKSPACE command: \n\n" $DISKSPACE 你看以上的脚本的时候 ="df -h" printf "Gathering diskspace information with the $DISKSPACE command: \n\n" $DISKSPACE = "df" diskspace_arg = "-h" print ("Gathering diskspace information %s command:\n" % diskspace

    79910发布于 2020-08-12
  • 来自专栏python3

    Python 获取磁盘信息的脚本及常用文

    with %s command:\n" % uname subprocess.call([uname,uname_arg]) #command 2 def disk_func(): diskspace = "df" diskspace_arg="-h" print "Gathering diskspace information %s command:\n" % diskspace subprocess.call([diskspace,diskspace_arg]) def main(): uname_func() disk_func() main()

    1.2K10发布于 2020-01-03
  • 来自专栏xcywt

    《Linux命令行与shell脚本编程大全》第十八章 图形化桌面环境中的脚本编程

     11         echo -en "\t\t Enter option:"  12         read -n 1 option  13 }  14  15 function diskspace ;;  38 1)  39         diskspace ;;  40 2)  41         whoseon ;;  42 3)  43         memusage ;; /bin/bash   2 function diskspace   3 {   4         clear   5         df -k   6 }   7   8 function a menu   3 temp=$(mktemp -t test.XXXXXX)   4 temp2=$(mktemp -t test2.XXXXXX)   5   6 function diskspace a menu   3 temp=$(mktemp -t test.XXXXXX)   4 temp2=$(mktemp -t test2.XXXXXX)   5   6 function diskspace

    1.6K50发布于 2018-01-11
  • 来自专栏IT运维技术圈

    推荐一组shell脚本菜单的嵌套模版

    /usr/bin/env bash # using select in the menu function diskspace { clear df -k } function whoseon usage" "Exit program" do case $option in "Exit program") break ;; "Display disk space") diskspace Exit program\n\n" echo -en "\t\tEnter option:" read -n 1 option } function diskspace { clear using dialog to create a menu temp=`mktemp -t test.XXXXXX` temp2=`mktemp -t test2.XXXXXX` function diskspace -eq 1 ] then break fi selection=`cat $temp2` case $selection in 1) diskspace

    45010编辑于 2024-12-05
  • 来自专栏Pythonista

    牛掰的python与unix

    Gathering system information with %s command:\n" % uname subprocess.call([uname,uname_arg]) #command 2 diskspace = "df" diskspace_arg = "-h" print "Gathering diskspace information %s command:\n" %diskspace subprocess.call ([diskspace,diskspace_arg]) 输出结果: [root@py_unix home]# python osinfo.py Gathering system information Information Gathering Script #Command 1 UNAME="uname -a" printf "内核信息$UNAME \n\n" $UNAME #Command 2 DISKSPACE ="df -h" printf "内存信息$DISKSPACE \n\n" $DISKSPACE ############# 注意Bash的空格  subprocess模块   加载subprocess

    78320发布于 2018-08-31
  • 来自专栏Zabbix中国官方

    Zabbix利用HTTP代理监控API

    I'm good." } }, "diskSpace": { "status": "UP", "details": { "total" 监控磁盘剩余空间 创建监控项并修改以下配置: 名称:Spring boot Application: Disk free space 类型:相关项目 键值:spring.boot.actuator.health.diskspace.free actuator health 信息类型:数字(无正负) 单位:B 应用集:Spring boot Application 在进程标签页添加步骤: 名称:JSONPath 参数:$.components.diskSpace.details.free

    5K20编辑于 2021-12-20
  • 来自专栏全栈程序员必看

    python基础编程100例_菜鸟编程python100例

    Gathering system information with %s command: ” %uname subprocess.call([uname, uname_arg])#command 2 diskspace = “df”diskspace_arg= “-h” print “Gathing diskspace information %s command: ” %diskspace subprocess.call ([diskspace,diskspace_arg]) 版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。

    76630编辑于 2022-11-15
  • 来自专栏运维小路

    Hadoop HDFS-配额(Quotas)

    13MB,未计算副本)、路径(/test1) [root@node1 ~]# hdfs dfs -put apache-zookeeper-3.8.1-bin.tar.gz /test1 put: The DiskSpace quota of /test1 is exceeded: quota = 1048576 B = 1 MB but diskspace consumed = 402671535 B = 384.02

    56200编辑于 2025-07-24
  • 来自专栏A周立SpringCloud

    跟我学Spring Cloud(Finchley版)-13-通用方式使用Hystrix

    访问 http://localhost:8010/actuator/health ,可获得类似如下结果: { "status": "UP", "details": { "diskSpace 再次访问 http://localhost:8010/actuator/health ,可获得类似如下结果: { "status": "UP", "details": { "diskSpace

    75310发布于 2019-05-07
  • 来自专栏菲宇

    Shell脚本实现Linux系统和进程资源监控

    function GetDiskSpc { if [ $# -ne 1 ] then return 1 fi Folder="$1$" DiskSpace =`df -k |grep $Folder |awk '{print $5}' |awk -F% '{print $1}' echo $DiskSpace } 示例演示: 1)源程序(检测目录为 /boot) Folder="/boot" DiskSpace=`GetDiskSpc $Folder` echo "The system $Folder disk space is $DiskSpace%" if [ $DiskSpace -gt 90 ] then { echo "The usage of system disk($Folder)

    3.4K51发布于 2019-06-11
  • 来自专栏日常杂记

    租户分配hdfs空间问题

    org.apache.hadoop.hdfs.protocol.DSQuotaExceededException: org.apache.hadoop.hdfs.protocol.DSQuotaExceededException: The DiskSpace  quota of /group/d_sdo_data/user/liuxiaowen is exceeded: quota=3000 diskspace consumed=384.0m   后来发现原因

    1.5K40发布于 2020-12-28
  • 深入解析Spring Boot Actuator的健康检查机制与自定义实践

    组件级健康检查:GET /actuator/health/{component} 如/actuator/health/diskSpace,可以单独查看某个组件的健康状态,便于问题定位。 允许开发者定义不同的检查组合: management: endpoint: health: group: custom: include: diskSpace 确认配置的监控路径存在且可读 空间计算:通过File.getUsableSpace()获取可用字节数 阈值比较:将可用空间与配置阈值比对 其配置参数具有灵活的定制性: management.health.diskspace.enabled =true management.health.diskspace.path=/data # 监控路径(默认项目根目录) management.health.diskspace.threshold=10MB 磁盘空间检查器:DiskSpaceHealthIndicator通过FileStore.getUnallocatedSpace()检测剩余空间,阈值默认10MB(可通过management.health.diskspace.threshold

    1.5K10编辑于 2025-08-27
  • 来自专栏项目文章

    【2023年全新保姆级教程】解决Ubuntu文件系统磁盘空间不足low disk space on filesystem root

    Ubuntu20.04时提示的信息如下: Low Disk Space on “Filesystem root” The volume “Filesystem root” has only 542.5MB diskspace

    4.2K10编辑于 2024-06-07
  • 来自专栏IT笔记

    SpringBoot开发案例之Actuator健康监控

    "status": "UP", "jms": { "status": "UP", "provider": "ActiveMQ" }, "diskSpace

    63010发布于 2019-12-09
  • 来自专栏飞鸟的专栏

    Spring Cloud Gateway 的监控(一)

    例如:{ "status": "UP", "details": { "diskSpace": { "status": "UP", "details": { "

    3.6K30编辑于 2023-04-11
  • 来自专栏IT笔记

    SpringBoot开发案例之Actuator健康监控

    "status": "UP", "jms": { "status": "UP", "provider": "ActiveMQ" }, "diskSpace

    93620发布于 2018-10-18
  • 来自专栏用户1337634的专栏

    Spring Boot & Actuator

    ":{ "database":"MySQL", "hello":1 } }, "diskSpace

    88120发布于 2019-03-27
  • 来自专栏知了一笑

    SpringBoot3进阶用法

    shutdown: enabled: true 2、相关接口 2.1 Get类型接口:主机:端口/monitor/health,查看应用的健康信息,三个核心指标:status状态,diskSpace 磁盘空间,ping检查; { /* 状态值 */ "status": "UP", "components": { /* 磁盘空间 */ "diskSpace": { "status

    48230编辑于 2023-09-01
  • 来自专栏Spring相关

    Springboot之Actuator的使用解析

    默认情况下是最后100个HTTP请求) true loggers 提供显示和修改应用程序中loggers配置的功能 true 5.访问结果示例 /health { status: "UP", diskSpace

    1.2K30发布于 2018-09-10
领券