Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 15th September 2011
badguy badguy is offline
Fdisk Soldier
Join Date: Jul 2009
Location: MD, USA
Posts: 59
Default SNMP config file test

So im trying to set up smnp on my openbsd box but i cant even get past the config file setup because i feel like i am not doing it right. here is what i have on my /etc/snmpd.conf

# $OpenBSD: snmpd.conf,v 1.2 2008/01/30 10:21:05 reyk Exp $


# Restrict daemon to listen on localhost only
listen on $listen_addr
rwcommunity public

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

# Adjust the local system information
system contact " Root (root@lab.com)"
system description " Realm "
system location " Lab "
system services 74

# Provide static user-defined SNMP OIDs
oid name testStringValue read-only string "Test"
oid name testIntValue read-write integer 1
root ~ # snmpd -n            
/etc/snmpd.conf:8: syntax error
I try starting snmpd and it starts but show this in the log. lsof also show open snmp stuff

tail /var/log/snmpd
Warning: no access control information configured.
  (Config search path: /etc/snmp:/usr/local/share/snmp:/usr/local/lib/snmp:/root/.snmp)
  It's unlikely this agent can serve any useful purpose in this state.
  Run "snmpconf -g basic_setup" to help you configure the snmpd.conf file for this agent.

I tried using the "snmpconf -g basic_setup"
and generated this randomly to test

# SECTION: Access Control Setup
#   This section defines who is allowed to talk to your running snmp agent.

# rwuser: a SNMPv3 read-write user
#   arguments:  user [noauth|auth|priv] [restriction_oid]

rwuser  slim  

# rouser: a SNMPv3 read-only user
#   arguments:  user [noauth|auth|priv] [restriction_oid]

rouser  slim1  

# rocommunity: a SNMPv1/SNMPv2c read-only access community name
#   arguments:  community [default|hostname|network/bits] [oid]

rocommunity  slim3  

# rwcommunity: a SNMPv1/SNMPv2c read-write access community name
#   arguments:  community [default|hostname|network/bits] [oid]

rwcommunity  slim2
and the test shows

root /etc/snmp # snmpd -nf /etc/snmp/snmpd.conf
/etc/snmp/snmpd.conf:16: syntax error
/etc/snmp/snmpd.conf:21: syntax error
/etc/snmp/snmpd.conf:26: syntax error
/etc/snmp/snmpd.conf:31: syntax error
I can start snmp and snmp logs show UDP connection. netstart shows port 161 open. So i am wondering if this config file test is just a waste of time.

Im wondering if there is any one very proficient with snmp that can confirm the correct way to set up the snmpd.conf and can also tell me how to verify that snmpd is correctly working. Thanks in adv

Last edited by badguy; 20th September 2011 at 04:47 AM.
Reply With Quote

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 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 12:21 PM.

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