https://github.com/s57445560/host_report
主机巡检报表发送,salt来统计后定时发送邮件。
https://github.com/s57445560/host_report
email salt
Last synced: 3 months ago
JSON representation
主机巡检报表发送,salt来统计后定时发送邮件。
- Host: GitHub
- URL: https://github.com/s57445560/host_report
- Owner: s57445560
- Created: 2018-01-16T07:20:54.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-23T02:13:17.000Z (about 7 years ago)
- Last Synced: 2025-01-15T19:55:22.815Z (9 months ago)
- Topics: email, salt
- Language: HTML
- Homepage:
- Size: 255 KB
- Stars: 95
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 每日报表生成邮件发送
需要部署到salt服务器上,如果路径不同需要修改 run.sh内的路径
安装salt,sar命令,python的依赖包
安装sar
yum install sysstat -y拷贝脚本到salt目录
mkdir -p /srv/salt/scripts/
cp /root/put/host_Report/check.sh /srv/salt/scripts/设置crontab (添加)
cronta -e
40 23 * * * /bin/bash /root/put/host_Report/run.sh >> /tmp/salt_ip.log 2>&1阀值设置,在check.sh脚本内 修改以下变量即可,根据自己需求
iowait=1
cpuirq=5
load=5
memfree=20
membuffer=0
memcache=0
IOtps=0
IOrtps=0
IOwtps=0
IObread=0
IObwrtn=0
PPS=0
bandwidth=0正常情况
如果超过阈值则会标红
