How to configure snmpd.conf in Solaris 10

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
axvers
Posts: 65
Joined: Tue Jan 08, 2019 8:31 pm

How to configure snmpd.conf in Solaris 10

Post by axvers »

I'm new to solaris.

env: solaris 10/ i386


I want to monitoring a solaris server from another CentOS server through snmp.

- At the first I entered the solaris server, there is a snmpd running.

- I can find some monitoring items like CPU/Memory/SWAP through snmp from my monitoring server, however, there's no value on it. It shows something like 'CPU Status is UNKNOWN'.

It has no com2sec, group or view settings like CentOS does, so I have no idea how to set it up.

And here's my **original** default snmpd.conf before I change anything on solaris (in /etc/snmp/conf/):

Code: Select all

# Copyright 1988 - 07/17/00 Sun Microsystems, Inc. All Rights Reserved.
#ident  "@(#)snmpd.conf 2.24    00/07/17 SMI"

# See below for file format and supported keywords

sysdescr        Sun SNMP Agent,
syscontact      System administrator
sysLocation     System administrators office
#
system-group-read-community     public
#system-group-write-community    private
#
read-community  public
#write-community private
#
trap            localhost
trap-community  SNMP-trap
#
#kernel-file     /vmunix
#
#managers        lvs golden
managers        localhost

#############################

# File Format:

# Each entry consists of a keyword followed by a parameter string,
# terminated by a newline.  The keyword must begin in the first
# position.  The parameters are separated from the keyword (and from
# one another) by whitespace.  All text following (and including) a '#'
# character is ignored.  Case in keywords is ignored, but case in
# parameter strings is NOT ignored.

# Supported Keywords:

# sysdescr              String to use for sysDescr.
# syscontact            String to use for sysContact.
# syslocation           String to use for sysLocation.
#
# system-group-read-community   Community name needed for read access
#                                       to the system group.
# system-group-write-community  Community name needed for write access
#                                       to the system group.
# read-community        Community name needed for read access
#                               to the entire MIB.
# write-community       Community name needed for write access
#                               to the entire MIB (implies read access).
#
# trap                  Host names where traps should be sent.
#                               A maximum of 5 hosts may be listed.
# trap-community        Community name to be used in traps.
#
# kernel-file           Filename to use for kernel symbols.
#
# managers              Hosts that can send SNMP queries.
#                       Only five hosts may be listed on any one line.
#                       This keyword may be repeated for a total of 32 hosts.
#
# newdevice             Additional devices which are not built in snmpd
#                       format as below
#
# newdevice     type    speed   name
#
# where newdevice is keyword, type is an interger which has to match your
# schema file, speed is the new device's speed, and name is this new
# device's name

I tried adding some setting in the 'conf', e.g.

-

Code: Select all

master agentx
-

Code: Select all

view    AllView    included   .1
-

Code: Select all

managers        localhost 192.168.0.132
and restart service:

Code: Select all

svcadm restart svc:/application/management/sma:default
(I've tried

Code: Select all

svcadm restart svc:/application/management/net-snmp:default
, but 'doesn't match any instances')

It still says "blabla is UNKNOWN"

Please advise!

Thanks!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: How to configure snmpd.conf in Solaris 10

Post by ssax »

What is the output of this command:

Code: Select all

svcs
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: How to configure snmpd.conf in Solaris 10

Post by tgriep »

One more thing to look into. On Solaris 10, the snmp daemon maybe the Solaris supplied daemon or if you upgraded the system to use the NET-SNMP daemon.
Both of them use different config files so verify which version of the daemon is running.

If it is the Net-SNMP version, the below example may work for you.

Code: Select all

com2sec notConfigUser  default       public

group   notConfigGroup v2c           notConfigUser

view    systemview    included   .1.3.6.1.2.1.1
view    systemview      included  .1.3.6.1.2.1.25

view    systemview          included        interfaces.ifTable.ifEntry.ifAdminStatus
view    systemview          included        .1 80

access  notConfigGroup ""      any       noauth    exact  systemview none none

syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root <root@localhost> (configure /etc/snmp/snmp.local.conf)

rocommunity public
Be sure to check out our Knowledgebase for helpful articles and solutions!
axvers
Posts: 65
Joined: Tue Jan 08, 2019 8:31 pm

Re: How to configure snmpd.conf in Solaris 10

Post by axvers »

It seems no net-snmp here.

Code: Select all

# svcs |grep snmp
online         Oct_08   svc:/application/management/snmpdx:default
If no net-snmp how to configure like net-snmp version?

Or, it needs to be net-snmp version to get monitored, if so, how should I install net-snmp?

------
ssax wrote:What is the output of this command:

Code: Select all

svcs
A lot of services.

Code: Select all

# svcs
STATE          STIME    FMRI
legacy_run     Oct_08   lrc:/etc/rcS_d/S50sk98sol
legacy_run     Oct_08   lrc:/etc/rc2_d/S05vmware-tools
legacy_run     Oct_08   lrc:/etc/rc2_d/S10lu
legacy_run     Oct_08   lrc:/etc/rc2_d/S20SymmetricPos
legacy_run     Oct_08   lrc:/etc/rc2_d/S20SymmetricServer
legacy_run     Oct_08   lrc:/etc/rc2_d/S20sysetup
legacy_run     Oct_08   lrc:/etc/rc2_d/S40llc2
legacy_run     Oct_08   lrc:/etc/rc2_d/S42ncakmod
legacy_run     Oct_08   lrc:/etc/rc2_d/S47pppd
legacy_run     Oct_08   lrc:/etc/rc2_d/S70nddconfig
legacy_run     Oct_08   lrc:/etc/rc2_d/S70uucp
legacy_run     Oct_08   lrc:/etc/rc2_d/S72autoinstall
legacy_run     Oct_08   lrc:/etc/rc2_d/S73cachefs_daemon
legacy_run     Oct_08   lrc:/etc/rc2_d/S81dodatadm_udaplt
legacy_run     Oct_08   lrc:/etc/rc2_d/S89PRESERVE
legacy_run     Oct_08   lrc:/etc/rc2_d/S94ncalogd
legacy_run     Oct_08   lrc:/etc/rc2_d/S98deallocate
legacy_run     Oct_08   lrc:/etc/rc2_d/S98oracle
legacy_run     Oct_08   lrc:/etc/rc2_d/S99fax
legacy_run     Oct_08   lrc:/etc/rc2_d/S99javapos_ap
legacy_run     Oct_08   lrc:/etc/rc3_d/S16boot_server
legacy_run     Oct_08   lrc:/etc/rc3_d/S20SymmetricPos
legacy_run     Oct_08   lrc:/etc/rc3_d/S20SymmetricServer
legacy_run     Oct_08   lrc:/etc/rc3_d/S50apache
legacy_run     Oct_08   lrc:/etc/rc3_d/S80mipagent
online         Oct_08   svc:/system/svc/restarter:default
online         Oct_08   svc:/network/tnctl:default
online         Oct_08   svc:/network/pfil:default
online         Oct_08   svc:/network/loopback:default
online         Oct_08   svc:/system/installupdates:default
online         Oct_08   svc:/system/filesystem/root:default
online         Oct_08   svc:/milestone/name-services:default
online         Oct_08   svc:/system/scheduler:default
online         Oct_08   svc:/system/boot-archive:default
online         Oct_08   svc:/network/physical:default
online         Oct_08   svc:/system/identity:node
online         Oct_08   svc:/system/filesystem/usr:default
online         Oct_08   svc:/system/keymap:default
online         Oct_08   svc:/system/device/local:default
online         Oct_08   svc:/platform/i86pc/eeprom:default
online         Oct_08   svc:/system/filesystem/minimal:default
online         Oct_08   svc:/system/identity:domain
online         Oct_08   svc:/system/resource-mgmt:default
online         Oct_08   svc:/system/cryptosvc:default
online         Oct_08   svc:/system/rmtmpfiles:default
online         Oct_08   svc:/system/sysevent:default
online         Oct_08   svc:/system/power:default
online         Oct_08   svc:/system/device/fc-fabric:default
online         Oct_08   svc:/network/ipsec/ipsecalgs:default
online         Oct_08   svc:/system/picl:default
online         Oct_08   svc:/system/coreadm:default
online         Oct_08   svc:/milestone/devices:default
online         Oct_08   svc:/network/ipsec/policy:default
online         Oct_08   svc:/milestone/network:default
online         Oct_08   svc:/system/manifest-import:default
online         Oct_08   svc:/network/ilomconfig-interconnect:default
online         Oct_08   svc:/system/patchchk:default
online         Oct_08   svc:/network/initial:default
online         Oct_08   svc:/milestone/single-user:default
online         Oct_08   svc:/system/pkgserv:default
online         Oct_08   svc:/network/service:default
online         Oct_08   svc:/network/iscsi/initiator:default
online         Oct_08   svc:/application/print/ppd-cache-update:default
online         Oct_08   svc:/network/routing-setup:default
online         Oct_08   svc:/system/filesystem/local:default
online         Oct_08   svc:/network/shares/group:default
online         Oct_08   svc:/system/sysidtool:net
online         Oct_08   svc:/system/cron:default
online         Oct_08   svc:/system/boot-archive-update:default
online         Oct_08   svc:/network/rpc/bind:default
online         Oct_08   svc:/application/opengl/ogl-select:default
online         Oct_08   svc:/system/sysidtool:system
online         Oct_08   svc:/network/nfs/status:default
online         Oct_08   svc:/network/nfs/cbd:default
online         Oct_08   svc:/network/nfs/mapid:default
online         Oct_08   svc:/platform/i86pc/kdmconfig:default
online         Oct_08   svc:/milestone/sysconfig:default
online         Oct_08   svc:/network/nfs/nlockmgr:default
online         Oct_08   svc:/system/postrun:default
online         Oct_08   svc:/system/sac:default
online         Oct_08   svc:/network/inetd:default
online         Oct_08   svc:/system/utmp:default
online         Oct_08   svc:/application/management/wbem:default
online         Oct_08   svc:/network/samba:default
online         Oct_08   svc:/network/rpc/gss:default
online         Oct_08   svc:/application/font/stfsloader:default
online         Oct_08   svc:/network/rpc/cde-calendar-manager:default
online         Oct_08   svc:/network/rpc/smserver:default
online         Oct_08   svc:/network/security/ktkt_warn:default
online         Oct_08   svc:/network/finger:default
online         Oct_08   svc:/network/nfs/client:default
online         Oct_08   svc:/network/login:rlogin
online         Oct_08   svc:/network/talk:default
online         Oct_08   svc:/network/ftp:default
online         Oct_08   svc:/network/telnet:default
online         Oct_08   svc:/network/rpc-100235_1/rpc_ticotsord:default
online         Oct_08   svc:/system/filesystem/autofs:default
online         Oct_08   svc:/system/dumpadm:default
online         Oct_08   svc:/network/ssh:default
online         Oct_08   svc:/network/sendmail-client:default
online         Oct_08   svc:/network/smtp:sendmail
online         Oct_08   svc:/application/management/seaport:default
online         Oct_08   svc:/application/print/server:default
online         Oct_08   svc:/application/print/rfc1179:default
online         Oct_08   svc:/application/management/snmpdx:default
online         Oct_08   svc:/application/print/ipp-listener:default
online         Oct_08   svc:/application/management/dmi:default
online         Oct_08   svc:/application/font/fc-cache:default
online         Oct_08   svc:/system/fmd:default
online         Oct_08   svc:/system/webconsole:console
online         Oct_08   svc:/system/boot-config:default
online         Oct_08   svc:/application/stosreg:default
online         Oct_08   svc:/application/cde-printinfo:default
online         Oct_08   svc:/milestone/multi-user-server:default
online         Oct_08   svc:/system/zones:default
online         Nov_05   svc:/milestone/multi-user:default
online         Nov_05   svc:/system/auditd:default
online         Nov_06   svc:/system/syslog-ng:default
online         Nov_13   svc:/system/console-login:default
online         Nov_13   svc:/system/name-service-cache:default
online         Feb_27   svc:/application/management/sma:default
offline        Oct_08   svc:/application/management/ocm:default
maintenance    Nov_15   svc:/system/system-log:default
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: How to configure snmpd.conf in Solaris 10

Post by tgriep »

Your system is running the Sun release of SNMP so you should put back the snmpd.conf file back to the default settings.
I did some testing of some various plugins and they seemed to work for gathering the data like Swap, Memory.

The names returned from Solaris could be different from Net-SNMP (Most plugins default to Net-SNMP) that you would have to adjust the options to match what you can poll from the server.

Do you have a list of plugins that you tried and the command line options you used?
Be sure to check out our Knowledgebase for helpful articles and solutions!
axvers
Posts: 65
Joined: Tue Jan 08, 2019 8:31 pm

Re: How to configure snmpd.conf in Solaris 10

Post by axvers »

Sorry, I have no list for this....I didn't try any plugin except SNMP-Linux from default wizard Nagios provided.

I found there's snmpd running (got result by snmpwalk command) on solaris at the first, and I used the SNMP-Linux wizard to get info from them.

Then I found that Nagios XI shows CPU/Memory "UNKNOWN", but ping/swap are "OK".

Code: Select all

[nagios@monitoring ~]$ /usr/local/nagios/libexec/check_snmp_load_wizard.pl -H 192.168.1.1 -C public --v2c -w 80 -c 90 -f
Can't find CPU usage information : UNKNOWN

Code: Select all

[nagios@monitoring ~]$ /usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H 192.168.1.1 -C public --v2c -m 'Swap' -w 80 -c 90 -f 
Swap Space: 20%used(7453MB/37584MB) (<80%) : OK | 'Swap_Space'=7453MB;30067;33825;0;37584
All I have are some servers (Solaris as mentioned) and a monitoring server (running Nagios XI).

And I want some basic performance info (like CPU/Memory..etc) from these server can be found on Nagios XI.

How should I do to get these info in easiest way?

Or, could you provide some configuration example for SUN's snmpd.conf to make "UNKNOWN" to "OK"?
tgriep wrote:Your system is running the Sun release of SNMP so you should put back the snmpd.conf file back to the default settings.
I did some testing of some various plugins and they seemed to work for gathering the data like Swap, Memory.

The names returned from Solaris could be different from Net-SNMP (Most plugins default to Net-SNMP) that you would have to adjust the options to match what you can poll from the server.

Do you have a list of plugins that you tried and the command line options you used?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: How to configure snmpd.conf in Solaris 10

Post by tgriep »

The Linux SNMP wizard in XI is setup to work with the Net-SNMP version of the daemon and since your system is not running that, that would cause issues with the commands.

The load plugin has an option that you can add to the command to check a different OID on the Solaris server for load. Run this and see if it returns data.

Code: Select all

/usr/local/nagios/libexec/check_snmp_load_wizard.pl -H 192.168.1.1 -C public --v2c -w 80 -c 90 -f --type=netsc
You have a Swap example to that is good but here are a few more commands.
For memory, use this example.

Code: Select all

/usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H 192.168.1.1 -C public --v2c -m 'Real Memory' -w 80 -c 90 -f 
Drive space. All partitions

Code: Select all

/usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H 192.168.1.1 -C public --v2c -m '/' -w 80 -c 90 -f 
root only

Code: Select all

/usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H 192.168.1.1 -C public --v2c -m '/' -w 80 -c 90 -f -r
Specific partition

Code: Select all

/usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H 192.168.1.1 -C public --v2c -m '/export/home' -w 80 -c 90 -f 
Edit or create the new commands and that should fix the issue.
Be sure to check out our Knowledgebase for helpful articles and solutions!
axvers
Posts: 65
Joined: Tue Jan 08, 2019 8:31 pm

Re: How to configure snmpd.conf in Solaris 10

Post by axvers »

yes!

It works!

I would fix all configs.

Thanks a lot!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: How to configure snmpd.conf in Solaris 10

Post by tgriep »

Your Welcome, glad it worked. Let me know if you have any further questions or that I can lock the post as solved.
Be sure to check out our Knowledgebase for helpful articles and solutions!
axvers
Posts: 65
Joined: Tue Jan 08, 2019 8:31 pm

Re: How to configure snmpd.conf in Solaris 10

Post by axvers »

yes, please lock this.

Thank you!
Locked