Giter Site home page Giter Site logo

monitor-1's Introduction

monitor

shell脚本监控平台 无需服务端,每台机器都要安装一下。可以自定义具体的监控项目

author: aming

version: 0.1

需求: 使用shell定制各种个性化告警工具,但需要统一化管理、规范化管理。

思路:指定一个脚本包,包含主程序、子程序、配置文件、邮件引擎、输出日志等。 主程序:作为整个脚本的入口,是整个系统的命脉。 配置文件:是一个控制中心,用它来开关各个子程序,指定各个相关联的日志文件。 子程序:这个才是真正的监控脚本,用来监控各个指标。 邮件引擎:是由一个php程序来实现,它可以定义发邮件的服务器、发邮件人以及收邮件人。 输出日志:整个监控系统要有日志输出。

要求:我们的机器角色多种多样,但是所有机器上都要部署同样的监控系统,也就说所有机器不管什么角色,整个程序框架都是一致的,不同的地方在于根据不同的角色,定制不同的配置文件。

程序架构:

                                        (主目录 mon)
             _________________________________|_____________________________________________________________
            |              |                       |                       |                             |
           bin          conf                   shares                     mail                         log
            |              |                       |                       |                             |
       [main.sh]    [ mon.conf]            [load.sh 502.sh]       [mail.php mail.sh]         [  mon.log  err.log ]

bin下是主程序 conf下是配置文件 shares下是各个监控脚本 mail下是邮件引擎 log下是日志。

使用:需要添加一条cron * * * * * cd /usr/local/sbin/mon/bin; bash main.sh

monitor-1's People

Contributors

aminglinux avatar

Watchers

James Cloos avatar  avatar

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.