Skip to content

An easy way to make SNMP queries, analyse data, and export tables

License

Notifications You must be signed in to change notification settings

DrMint/SNMP-Analyser-Exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SNMP-Export-Analyse

An easy way to make SNMP queries, analyse data, and export tables

This project uses Quick SNMP (quicksnmp) by alessandromaggio

The following example connects to a SNMP Manager, selects a specific table OID and export column 1, 2, and 3 in a CSV file.

import myLib

# Let's enter all this necessary credentials
myOidTable = myLib.OidTable()
myOidTable.oid =            "1.3.6.1.4.1.XXXXX.X.X.X.X"
myOidTable.snmp.ip =        "192.168.XX.XXX"
myOidTable.snmp.community = "COMMUNITY_NAME"

# Finds the number of rows in this table
myOidTable.numRow = myOidTable.getNumRow()

# oidColumn are the column where the information is located
# Usage: oidColumn(Displayed name, column in the oidTable)
myOidTable.addColumn(myLib.OidColumn(displayedName = "IP", oidColumn = 1))
myOidTable.addColumn(myLib.OidColumn(displayedName = "TTL", oidColumn = 2))
myOidTable.addColumn(myLib.OidColumn(displayedName = "Name", oidColumn = 3))

# We can directly export the file like this
myOidTable.exportTableToCSV("ip.csv")

About

An easy way to make SNMP queries, analyse data, and export tables

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages