Git Product home page Git Product logo

ytzabbixalert's Introduction

ZabbixAlert

zabbix自定义告警脚本,通过配置zabbix的Media、Action来实现调用自定义脚本,自定义脚本通过企业微信API来实现告警功能。

Zabbix配置事件文档,请移步 https://www.zabbix.com/documentation/5.0/zh/manual/config/notifications

企业微信开发文档,请移步 https://work.weixin.qq.com/api/doc/90000/90135/90664

zabbix版本5.0.3

go版本 1.14.5

结构介绍

logging包下主要为日志配置,包括日志署出位置、日志级别、日志文件相关操作

setting包下主要为读取告警所需配置文件(此文件demo在/dist/etc/ytalert.ini),包括企业微信密钥,部门代号等参数

model包下主要为枚举,定义并区分了不同组件MQ,Redis等

程序入口为ytzabbixalert.go

#编译打包
sh ./release.amd64.sh # x86
sh ./release.arm64.sh # arm

之后会在/release下得到对应的deb包

dpkg -i ytzabbixalert.deb # 安装

Q:为什么使用Go开发?

搜了下大多数都是python脚本(主要是不会python,只会go),虽然打包出来比较大。

ytzabbixalert's People

Contributors

eddieguocc avatar

Watchers

 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.