Camille
Camille

Reputation: 193

MIB for PySNMP Agent

I am trying to implement SNMP Monitoring through the use of PySNMP library.

Will I be able to query the already existing NET-SNMP MIB on a device? Or do I have to create the MIB on the Agent side with PySNMP?

Upvotes: 2

Views: 538

Answers (1)

Ilya Etingof
Ilya Etingof

Reputation: 5555

To monitor a host via SNMP you need SNMP Agent running locally on that host talking to host's subsystems (OS, applications) collecting various metrics. Then SNMP Agent could communicate those metrics to SNMP Manager thus performing monitoring. Here you could find some general notes on SNMP design.

There are many approaches to making SNMP Agent gathering system information from a host it is running on. You could do that from a single callback function invoked by SNMP Agent (no MIB is involved) or you could embed your system probes right into pysnmp MIB module (scattering probes over managed objects defined in MIB), so that the probes could be run once Manager hits that part of MIB via a query to SNMP Agent managing that MIB. There is pysmi tool that can compile text MIB into pysnmp/Python module.

Here is a page with example pysnmp Agent scripts that should run out-of-the-box.

Upvotes: 1

Related Questions