Git Product home page Git Product logo

host_report's Introduction

每日报表生成邮件发送

需要部署到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

正常情况 image

如果超过阈值则会标红 image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.