1 Star 0 Fork 1

Ross / SNMPTrapServer

forked from sunism / SNMPTrapServer 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

SNMPTrapServer

Description

用于接收snmp trap消息,并将消息发送到prometheus的pushgateway中和zabbix中,,然后通过prometheus或者zabbix报警

Software Architecture

主要使用了github.com/gosnmp/gosnmp来解析snmp报文

Installation

  1. 下载代码包
  2. go get
  3. go build -o snmptrap-server main.go

Instructions

  1. 收集到的snmp报文主要分三部分:
  • OID: 发送到trapserver的oid, ‘.1.3.1.’这种格式的数据
  • Value: 发送过来的值
  • Type: SNMP数据类型
  1. 接受到之后,组装了一个snmp_trap_pdu{host=“发送过来的主机IP” OID=“.x.x.x.x." value="xxxx" type="xxxxx" ts=“接收到消息的时间”} 如果snmp_trap_pdu接收到的值为1,表示有消息,值为0表示已经恢复

Contribution

  1. Fork the repository
  2. Create Feat_xxx branch
  3. Commit your code
  4. Create Pull Request

Gitee Feature

  1. You can use Readme_XXX.md to support different languages, such as Readme_en.md, Readme_zh.md
  2. Gitee blog blog.gitee.com
  3. Explore open source project https://gitee.com/explore
  4. The most valuable open source project GVP
  5. The manual of Gitee https://gitee.com/help
  6. The most popular members https://gitee.com/gitee-stars/
MIT License Copyright (c) 2022 sunism Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

用于接收snmp trap消息,并将消息发送到prometheus的pushgateway中 展开 收起
Go
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Go
1
https://gitee.com/byross/snmptrap-server.git
git@gitee.com:byross/snmptrap-server.git
byross
snmptrap-server
SNMPTrapServer
master

搜索帮助