View Single Post
  #1   (View Single Post)  
Old 23rd September 2017
ed.n1n2 ed.n1n2 is offline
Port Guard
 
Join Date: Mar 2015
Posts: 30
Default Custom OID in snmpd.conf

Hi,

I can create a custom OID in Linux very easily:

Code:
extend my.custom.oid /etc/snmp/scripts/custom.oid.sh 301
This does not work in OpenBSD 6.1, and rcctl start snmpd fails. The syntax seems to be wildly different. This does work:

Code:
read-only community public
system location lab
system name devmachine1
system contact me@example.com
system services 74
Yes, I have read the manual, but there are no examples or descriptions of what I'm trying to do at all.

Code:
oid 1.3.6.1.4.1.30155.42.1 name myName read-only string "humppa"
oid 1.3.6.1.4.1.30155.42.2 name myStatus read-only integer 1
Those work just fine as they are and I can modify the OID, names, etc. What they don't do is provide what pass, exec, and extend allows.

I've tried for hours with other example code, but none of it is example code that will work with OpenBSD's implementation.

How can I extend SNMP to run a custom program and return back the output?
Reply With Quote