Giter VIP home page Giter VIP logo

monitor's Introduction

监控:

根据自己的需求可以添加不同的监控项,现在只监控了本机到其他服务的状态。服务分为server和agent;agent需要一个守护进程,  

这里使用的是forever,安装请看https://www.npmjs.com/package/forever
也可以用supervisor,看你们了; 报警使用的是微信,可以观摩一下我自己写的微信接口https://github.com/007root/weixin_api

部署:

agent nc配置:

$ cat conf.py
# 本机去需要去访问的IP和端口
SER_DICT = {
    "ser-01":{
        "host": "192.168.1.2", 
        "port": 22,
        "timeout": 3    # 超时时间默认1s
    },
    "ser-02":{
        "host": "192.168.1.3",
        "port": 9090
    }
}

agent 启动

forever start -c python monitor_agent.py

server 配置:

$ cat config.py
agent_ip = {
    "group-01": "http://192.168.4.65:8888",
}

server 目前使用的crontab 定期去调用 monitor_server.py

monitor's People

Contributors

007root 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.