https://github.com/phylocko/snmpflapd
High performance daemon that receives SNMP Link UP/DOWN traps and stores them to MySQL
https://github.com/phylocko/snmpflapd
monitoring network server snmp
Last synced: 16 days ago
JSON representation
High performance daemon that receives SNMP Link UP/DOWN traps and stores them to MySQL
- Host: GitHub
- URL: https://github.com/phylocko/snmpflapd
- Owner: phylocko
- License: apache-2.0
- Created: 2020-03-13T14:02:52.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-07T10:23:37.000Z (almost 3 years ago)
- Last Synced: 2024-06-19T11:16:34.510Z (over 1 year ago)
- Topics: monitoring, network, server, snmp
- Language: Go
- Homepage: https://flapmyport.com
- Size: 49.8 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# What is this? #
This is a daemon that receives SNMP LinkUP/DOWN traps and strikes-back SNMP Get requests
to find out host names, ifNames and ifAliases, storing it into MySQL.
# Why you should use it? #
- **Performance**. It handles traps asynchronously and will never loose one!
- **Speed**. Host names, ifNames and ifAliases are cached to prevent unnecessary SNMP Get requests
- **FlapMyPort**. It does well with the FlapMyPort monitoring system
# What do you need to deploy it?
- A linux server with a MySQL database running
- Network devices supporting SNMPv2
- The devices should be reachable by SNMP protocol from the server
# Quick start in 3 steps #
## 1. Create a DB schema
```
mysql> create database snmpflapd;
# mysql snmpflapd < schema.sql
```
## 2. Create a config file
**settings.conf:**
```
listenAddress = "0.0.0.0"
listenPort = 162
dbHost = "localhost"
dbName = "snmpflapd"
dbUser = "root"
dbPassword = ""
community = "public"
logFilename = "/var/log/snmpflapd.log"
```
> settings.conf is optional. You may use environment variables instaed
> Available environment variables are
> LISTEN_ADDRESS, LISTEN_PORT, DBHOST, DBNAME, DBUSER, DBPASSWORD, COMMUNITY, LOGFILE
## 3. Run snmpflapd
```
> ./snmpflapd -f settings.conf
```
Check your log file for errors.
# How to build #
Use `build.sh` instead of `go build`!
If you wish to make a build for a Linux 64-bit machine:
```
GOOS=linux GOARCH=amd64 ./build.sh
```
---
*And may a stable network be with you!*