LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices

Reply
 
Search this Thread
Old 09-15-2009, 09:44 AM   #1
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Rep: Reputation: 32
Setting up snmp on SXCE build 116


Hi,

I'm trying to get net-snmp to work on my SPARC platform and somethings wrong with my config file meaning that Cacti comes up with snmp error while doing an snmpwalk in order to graph various parts of the system.

Have looked here for how to enable and configure:

http://all-unix.blogspot.com/2007/10...-net-snmp.html

This is default file:

Code:
#
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#  Copyright (c) 2003 Sun Microsystems, Inc. All rights reserved.
# *
# * U.S. Government Rights - Commercial software. Government users are subject
# * to the Sun Microsystems, Inc. standard license agreement and applicable
# * provisions of the FAR and its supplements.
#
# Use is subject to license terms.
#
# This distribution may include materials developed by third parties. Sun,
# Sun Microsystems, the Sun logo and Solaris are trademarks or registered
#  trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
#
#
###########################################################################
#
# snmpd.conf
#
#   - created by the snmpconf configuration program
#
###########################################################################
###########################################################################
# SECTION: Admins who want to disable the snmpd daemon from
# starting at boot time.
# Change DISABLE=NO to DISABLE=YES
# DO NOT DELETE
# DO NOT UNCOMMENT
#DISABLE=NO
#
# end ADMIN
###########################################################################
#
# SECTION: Access Control Setup
#
#   This section defines who is allowed to talk to your running
#   snmp agent.

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

rocommunity  public  

##########################################################################
# SEA subagents dynamically register with the master agent via port 161,
# supplying a read-write community string on the request (e.g. 'private'
# for DMI).  If the community strings used are not defined in the
# snmpd.conf file, the registration request will not be forwarded to
# the SEA master agent.
#
# rwcommunity: a SNMPv1/SNMPv2c read-write access community name
#   arguments:  community [default|hostname|network/bits] [oid]
#
# The following entry provides minimum access for successful
# SEA subagent registration.
#
rwcommunity  private localhost .1.3.6.1.4.1.42.2.15

#rwcommunity private


###########################################################################
# SECTION: System Information Setup
#
#   This section defines some of the information reported in
#   the "system" mib group in the mibII tree.

# syslocation: The [typically physical] location of the system.
#   Note that setting this value here means that when trying to
#   perform an snmp SET operation to the sysLocation.0 variable will make
#   the agent return the "notWritable" error code.  IE, including
#   this token in the snmpd.conf file will disable write access to
#   the variable.
#   arguments:  location_string

syslocation  "System administrators office"

# syscontact: The contact information for the administrator
#   Note that setting this value here means that when trying to
#   perform an snmp SET operation to the sysContact.0 variable will make
#   the agent return the "notWritable" error code.  IE, including
#   this token in the snmpd.conf file will disable write access to
#   the variable.
#   arguments:  contact_string

syscontact  "System administrator"
sysservices 72

#
# dlmods for the seaProxy
#

dlmod seaProxy /usr/lib/sparcv9/libseaProxy.so
dlmod seaExtensions /usr/lib/sparcv9/libseaExtensions.so
For my Linux based snmpd.conf files I usually only needed to adapt these lines:

Code:
#       sec.name  source          community
com2sec local     localhost       public
com2sec localnet  {my subnet}     public
#com2sec readwrite default         private

#             	sec.model  sec.name
group MyROSystem v1        local
group MyROSystem v2c       local
group MyROSystem usm       local
group MyROGroup v1         localnet
group MyROGroup v2c        localnet
group MyROGroup usm        localnet
group MyRWGroup v1         local
group MyRWGroup v2c        local
group MyRWGroup usm        local

#                context sec.model sec.level match  read   write  notif
access MyROSystem ""     any       noauth    exact  system none   none
access MyROGroup ""      any       noauth    exact  all    none   none
access MyRWGroup ""      any       noauth    exact  all    all    none
I put my linux based snmpd.conf into the server restarted snmp and I still got the same error....

Can anyone help me??

Also just in addition what is the command used for viewing what svc services are active??

I caught this the other day but forgot to bookmark it....

svcadm or svc... something else I can't remember.. would be of great use!!

Many thanks!
 
Old 09-15-2009, 10:23 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,482

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
The command to view active services is
Code:
svcs
To view all services:
Code:
svcs -a
 
Old 09-15-2009, 10:54 AM   #3
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Original Poster
Rep: Reputation: 32
Thanks jlliagre,

so here we go:

Code:
-bash-3.2# svcs -a | grep snmp
disabled       16:27:24 svc:/network/device-discovery/printers:snmp
offline        Sep_14   svc:/application/management/snmpdx:default
Code:
-bash-3.2# netstat -aP udp | grep snmp
      *.snmpd                             Idle
So net-snmp is listening!

Why then do I get given an SNMP error from Cacti web UI then??

With whichever config file??

I just did a little experiment:

Code:
snmpwalk -c public -v 1 127.0.0.1
also used NIC IP but in each case it timed out...

How do I enter these settings like posted above:

Code:
#       sec.name  source          community
com2sec local     localhost       public
com2sec localnet  {my subnet}     public
#com2sec readwrite default         private

#             	sec.model  sec.name
group MyROSystem v1        local
group MyROSystem v2c       local
group MyROSystem usm       local
group MyROGroup v1         localnet
group MyROGroup v2c        localnet
group MyROGroup usm        localnet
group MyRWGroup v1         local
group MyRWGroup v2c        local
group MyRWGroup usm        local
??

The syntax seems to be totally different in Solaris then Linux!

[edit]
actually I think I need to add my local subnet in somewhere to the file.... but can't figure out where.

Last edited by kayasaman; 09-15-2009 at 10:55 AM.
 
Old 09-15-2009, 04:17 PM   #4
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Original Poster
Rep: Reputation: 32
Ok so here's what I finally managed to do:

more Google searching yielded this result -

http://www.sysadminwiki.net/wiki/ind..._in_Solaris_10.

From there the modification I did was this:

Code:
agentaddress ipofinterface
includeAllDisks
Then basically add all my old config on top of the new one:

Code:
cat snmpd.conf.bak >> snmpd.conf
Finally restart the service with:

Code:
svcadm restart sma
Not sure if it is stable as still comes out with a few errors on occasion but then this could also be down to my limited memory of 1GB....

Anyway for the most part it seems to kinda work, although not as graceful as Linux but still!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SXCE b114: cannot boot into failsafe mode crisostomo_enrico Solaris / OpenSolaris 0 05-24-2009 12:38 PM
zfs receive core dumps on SXCE build 110 crisostomo_enrico Solaris / OpenSolaris 0 03-30-2009 02:25 PM
A Windows 2003 domU on xVM on SXCE build 103 seems to leak memory somewhere crisostomo_enrico Solaris / OpenSolaris 0 12-23-2008 10:10 AM
Net-SNMP Fails to Build (RH ES 4.0) jhmathis Linux - Enterprise 1 10-26-2007 04:00 AM
snmp (ucd-snmp, net-snmp) markus1982 Linux - Software 1 11-21-2002 10:45 AM


All times are GMT -5. The time now is 03:16 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration