DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #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
  #2   (View Single Post)  
Old 23rd September 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

According to reyk@, the security model is designed to prevent extensibilty, and if custom extensions are needed, you should use net/net-snmp.

Reference: http://www.undeadly.org/cgi?action=a...20071205120138
Reply With Quote
  #3   (View Single Post)  
Old 25th September 2017
ed.n1n2 ed.n1n2 is offline
Port Guard
 
Join Date: Mar 2015
Posts: 30
Default

Thanks... I guess

I'm somewhat surprised that the logic is to *prevent* extensibility. I'm not finding anything on how to write my own listener. I assume this means I need to uninstall/disable the current implementation, and then my own program becomes the SNMP server?

I can't be the only one with a need for custom OIDs. There isn't anybody else that has a custom OID on OpenBSD? I'm really surprised that I have to write this software to do something that a single line of code does in Linux.
Reply With Quote
  #4   (View Single Post)  
Old 25th September 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

This forum is a tiny subset of the BSD user community as a whole. If you want you could post to the OpenBSD misc@ mailing list, or you could send an Email to reyk@ directly.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom keyboard layout darktrym NetBSD Installation and Upgrading 1 3rd August 2017 11:39 PM
snmpd vs. net-snmp configuration issues MatthiasKoch OpenBSD General 3 28th April 2016 07:01 AM
Custom CD Timmy66 OpenBSD Installation and Upgrading 3 15th November 2014 06:55 AM
custom kernel problem pahel0 FreeBSD General 8 15th February 2010 11:13 PM
About Custom Kernels qmemo NetBSD General 2 28th September 2008 03:45 PM


All times are GMT. The time now is 05:34 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick