MQaiser
MQaiser

Reputation: 131

Create custom OID in net-snmp agent

I'm very new to snmp development, so what I want to achieve is that, I want to create an SNMP agent with custom OID using C or C++ shell on a linux machine/server. I have a PEN but I have no idea where to setup a custom OID or an MIB for that matter. I'm currently following this guide but it doesn't seem to help:

http://net-snmp.sourceforge.net/tutorial/tutorial-5/toolkit/mib_module/index.html

What I have done so far:

  1. Install net-snmp.
  2. Setup users and made communication between SNMP manager and SNMP agent.
  3. Tried and still trying to find a solution.
  4. Tried to compile and run this script http://www.net-snmp.org/dev/agent/scalar_int_8c-example.html

Any help would be appreciated.

Upvotes: 1

Views: 8833

Answers (1)

MQaiser
MQaiser

Reputation: 131

Fixed by extending using shell script.

1 - Extend a shell script in etc/snmpd.conf using the following format: extend <OID> <name> path/to/script <arguments>

2 - Restart snmpd.

Reference: http://net-snmp.sourceforge.net/wiki/index.php/Tut:Extending_snmpd_using_shell_scripts

Upvotes: 1

Related Questions