Thanks to visit codestin.com
Credit goes to github.com

Skip to content

alkk/netxms-import-traps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

NetXMS template generator from traps defined in MIB file

Quick and dirty script which loads traps from MIB file and generate template for NetXMS. Custom event is created for each trap.

Requirements

pysmi, all referenced MIB files (e.g. SNMPv2-SMI, SNMPv2-TC)

Usage

In the example bellow I assume that you have MIB file myproduct.mib in current directory and all related MIBs in the /usr/share/snmp/mibs.

# create new virtual environment
vf new -p python3.11 netxms-import-traps

# parse mib file myproduct.mib and save to intermediate JSON file ("PRODUCT.json", as defined in the MIB file, "… DEFINITIONS ::= BEGIN" line)
mibdump.py --mib-borrower= --mib-searcher= --mib-source='file:///usr/share/snmp/mibs' --mib-source='.' --generate-mib-texts  --destination-format json myproduct

# generate template from JSON file
./generate_template.py PRODUCT.json

# output is in PRODUCT.xml

About

Quick and dirty way to import SNMP traps from MIB file into the NetXMS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages