yangshuDBA

Results 3 comments of yangshuDBA

一个脚本的事 #!/bin/bash #author:yangshu #检查磁盘使用率 #检查Inode使用率 #检查内存使用率 #v1.0.7 增加CPU监控 #V1.0.8 增加告警阈值红色显示 #V1.0.9 修复告警多个指标判断逻辑 check_disk_usage() { local alert_percent=$1 local output=$(df -PTl | grep "/dev" | grep -Ev "tmpfs|sr0|cdrom|:" | sed 's/%//g' |...

都不看文档的啊,有主机变量啊 ![image](https://github.com/openspug/spug/assets/112070510/73995c8f-c63f-4beb-9a99-ee6383da889d)

可以使用mysql命令导出,调整下SQL就行。 --进入数据库 docker exec -it spug-db mysql -uroot -pspug.cc1 spug --设置字符集 set character_set_results=utf8; --查询组对应ID,取sort_id值 select * from host_groups; --根据组sort_id,查询组内主机 select * from hosts where id in (select host_id from host_groups_hosts...