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 27th April 2016
MatthiasKoch MatthiasKoch is offline
Real Name: Matthias Koch
Port Guard
 
Join Date: Mar 2016
Location: Germany
Posts: 37
Default snmpd vs. net-snmp configuration issues

5.8 GENERIC.MP#1236 amd64

Dear all,

So far I have been using net-snmp provided with various linux machines (Debian. CentOS) which did what I expected. It is the snmpd in OpenBSD I am battling with.

The syntax of the snmpd.conf appears to be vastly different from what I've known so far. Specifically, I came across this when I tried to set it up to watch processes. In CentOS I basically insert a line like

"proc name_of_process_I_want_to_watch"

which on snmpwalk returns something like

.iso.org.dod.internet.private.enterprises.ucdavis. prTable.prEntry.prNames.1 = STRING: name_of_process_I_want_to_watch
.iso.org.dod.internet.private.enterprises.ucdavis. prTable.prEntry.prCount.1 = INTEGER: count_of_above_processes
.iso.org.dod.internet.private.enterprises.ucdavis. prTable.prEntry.prErrorFlag.1 = INTEGER: noError(0)


and that's it. The snmpd in OpenBSD is throwing a syntax error and quits.

Most likely I am missing something very obvious here. Would love to get some help with my glasses, though

TIA
Matthias
Reply With Quote
  #2   (View Single Post)  
Old 27th April 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

I don't use either snmp implementation, and cannot answer questions. But I can tell you that net-snmp is available as a third party package. For OpenBSD 5.9, this is version 5.7.3.
Reply With Quote
  #3   (View Single Post)  
Old 27th April 2016
Oko's Avatar
Oko Oko is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 1,102
Default

Quote:
Originally Posted by MatthiasKoch View Post
5.8 GENERIC.MP#1236 amd64

Dear all,

So far I have been using net-snmp provided with various linux machines (Debian. CentOS) which did what I expected. It is the snmpd in OpenBSD I am battling with.
net-snmp is Linux centric and full of bugs.

https://marc.info/?l=openbsd-misc&m=143881142330506&w=2

OpenBSD snmpd is written ground up by Reyk Floeter and it is well integrated with OpenBSD indigenous sensoring framework (IPMI driver is disabled on OpenBSD beacuse of security issues) as well as PF. PF related MIBs are maintained by Joel Knight

https://www.packetmischief.ca/

There is no reason for using net-snmp on OpenBSD other than running something like LIbreNMS server (which I do in production)

http://www.librenms.org/


Speaking of which FreeBSD has its own bsnmpd daemon which has nothing in common with OpenBSD work. It is semi-finished just like their own sensoring framework and FreeBSD syslog. OpenBSD syslog is fully rewritten ground up, complete, and future featured (TCP, TLS etc).




Quote:
Originally Posted by MatthiasKoch View Post
The syntax of the snmpd.conf appears to be vastly different from what I've known so far. Specifically, I came across this when I tried to set it up to watch processes. In CentOS I basically insert a line like

"proc name_of_process_I_want_to_watch"

which on snmpwalk returns something like

.iso.org.dod.internet.private.enterprises.ucdavis. prTable.prEntry.prNames.1 = STRING: name_of_process_I_want_to_watch
.iso.org.dod.internet.private.enterprises.ucdavis. prTable.prEntry.prCount.1 = INTEGER: count_of_above_processes
.iso.org.dod.internet.private.enterprises.ucdavis. prTable.prEntry.prErrorFlag.1 = INTEGER: noError(0)


and that's it. The snmpd in OpenBSD is throwing a syntax error and quits.

Most likely I am missing something very obvious here. Would love to get some help with my glasses, though

TIA
Matthias
You are expected to read the man pages for snmpd.conf. This is a fully working example taken from OpenBSD 5.8 production server which is monitored by LibreNMS

Code:
# more /etc/snmpd.conf
# $OpenBSD: snmpd.conf,v 1.1 2014/07/11 21:20:10 deraadt Exp $

listen_addr="192.168.6.251"
listen on $listen_addr

# Specify a number of trap receivers
#trap receiver nms.localdomain.local

# Adjust the local system information
system contact "Charlie Root (sysinfo@autonlab.org)"
# system description "Powered by OpenBSD"
system location "Rack A1-2B, Wean Hall 3611 [40.4424925,-79.9425528]"
system services 74

# Provide static user-defined SNMP OIDs
oid 1.3.6.1.4.1.30155.42.3.1 name testStringValue read-only string "Test"
oid 1.3.6.1.4.1.30155.42.3.4 name testIntValue read-write integer 1

# Enable SNMPv3 USM with authentication, encryption and two defined users
#seclevel enc
#user "user1" authkey "password123" enc aes enckey "321drowssap"
#user "user2" authkey "password456" enckey "654drowssap"

This is how the same file looks on RedHat 7.2 machine

Code:
com2sec readonly  default        public
group MyROGroup v1         readonly
group MyROGroup v2c        readonly
group MyROGroup usm        readonly
view all    included  .1                               80
access MyROGroup ""      any       noauth    exact  all    none   none
syslocation Rack A1-2C, Wean Hall 3611 [40.4424925,-79.9425528]
syscontact sysinfo@autonlab.org
# sysname RedHat 7.2
extend .1.3.6.1.4.1.2021.7890.1 distro /usr/bin/distro
It is very unlikely that you will get any help here with snmpwalk and OpenBSD specific MIBs. I would post a question on misc@openbsd and pray that one of network engineers get interest in your question.
Reply With Quote
  #4   (View Single Post)  
Old 28th April 2016
MatthiasKoch MatthiasKoch is offline
Real Name: Matthias Koch
Port Guard
 
Join Date: Mar 2016
Location: Germany
Posts: 37
Default

Quote:
Originally Posted by jggimi View Post
But I can tell you that net-snmp is available as a third party package.
Thanks jggimi, I realize that but for various considerations I'd rather go with the OpenBSD implementations. I mistrust things that "simply work" Plus, of course I want to learn more about OpenBSD specifically.
Reply With Quote
Reply

Tags
snmpd, snmpd.conf

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
SNMP config file test badguy OpenBSD Packages and Ports 14 23rd September 2011 06:41 PM
SNMP issue wirasto OpenBSD General 0 27th April 2011 03:31 AM
Enable SNMP? dzudja100 FreeBSD Ports and Packages 1 20th May 2010 05:52 PM
problems with installing net-snmp dejabu18 FreeBSD Ports and Packages 9 17th May 2008 07:17 PM


All times are GMT. The time now is 10:31 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