Fwd: Re: snmpd.conf

[email protected]
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>



Hi Dave,
 
 Sorry about that.
 this message is also copied to net-snmp mailing list and hope it works.
 
 Here attached my snmpd.conf for your to review and let me know the problems.
 At the same time, I will be greatly appreciate it if you can let me know how to
 install and configure snmp agent in other computers.

last time I sent my snmpd.conf by attachment but failed. this time I just copy
it below and hope it will work.

 Thank you again for your great help,
 JUn

-----------------------
my snmpd.conf
###########################################################################
#
# snmpd.conf
#
#   - created by the snmpconf configuration program
#
###########################################################################
# 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 Right here, right now.
syslocation  Toronto

# 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 Me <[email protected]>
syscontact  [email protected]



###########################################################################
# 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  root auth 
rwuser  jun auth 
rwuser  nagios auth 

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

rouser  root auth 
rouser  jun auth 
rouser  "nagios auth" auth 
rouser  nagios auth 

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

rocommunity  LifeCapt  

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

rwcommunity  LifeCapt  



###########################################################################
# SECTION: Trap Destinations
#
#   Here we define who the agent will send traps to.

# trapsink: A SNMPv1 trap receiver
#   arguments: host [community] [portnum]

trapsink  localhost  
trapsink  nagios  

# trap2sink: A SNMPv2c trap receiver
#   arguments: host [community] [portnum]

trap2sink  localhost  
trap2sink  nagios  

# informsink: A SNMPv2c inform (acknowledged trap) receiver
#   arguments: host [community] [portnum]

informsink  localhost LifeCapt 
informsink  nagios  

# trapcommunity: Default trap sink community to use
#   arguments: community-string

trapcommunity  LifeCapt

# authtrapenable: Should we send traps when authentication failures occur
#   arguments: 1 | 2   (1 = yes, 2 = no)

authtrapenable  1



###########################################################################
# SECTION: Monitor Various Aspects of the Running Host
#
#   The following check up on various aspects of a host.

# proc: Check for processes that should be running.
#     proc NAME [MAX=0] [MIN=0]
#   
#     NAME:  the name of the process to check for.  It must match
#            exactly (ie, http will not find httpd processes).
#     MAX:   the maximum number allowed to be running.  Defaults to 0.
#     MIN:   the minimum number to be running.  Defaults to 0.
#   
#   The results are reported in the prTable section of the UCD-SNMP-MIB tree
#   Special Case:  When the min and max numbers are both 0, it assumes
#   you want a max of infinity and a min of 1.

proc mountd
proc ntalkd 4
proc sendmail 10 1
proc  init 0 0
proc  events/0  
proc  aio/0  
proc  portmap  
proc  syslogd  
proc  startkde  
proc  httpd2  
proc  nagios  
proc  ps  

# disk: Check for disk space usage of a partition.
#   The agent can check the amount of available disk space, and make
#   sure it is above a set limit.  
#   
#    disk PATH [MIN=100000]
#   
#    PATH:  mount path to the disk in question.
#    MIN:   Disks with space below this value will have the Mib's errorFlag set.
#           Can be a raw byte value or a percentage followed by the %
#           symbol.  Default value = 100000.
#   
#   The results are reported in the dskTable section of the UCD-SNMP-MIB tree

disk / 10000
disk  / 100000000

# load: Check for unreasonable load average values.
#   Watch the load average levels on the machine.
#   
#    load [1MAX=12.0] [5MAX=12.0] [15MAX=12.0]
#   
#    1MAX:   If the 1 minute load average is above this limit at query
#            time, the errorFlag will be set.
#    5MAX:   Similar, but for 5 min average.
#    15MAX:  Similar, but for 15 min average.
#   
#   The results are reported in the laTable section of the UCD-SNMP-MIB tree

load 12 14 14
load  11 11 11

# file: Check on the size of a file.
#   Display a files size statistics.
#   If it grows to be too large, report an error about it.
#   
#    file /path/to/file [maxsize_in_bytes]
#   
#      if maxsize is not specified, assume only size reporting is needed.
#   
#   The results are reported in the fileTable section of the UCD-SNMP-MIB tree

file  /home 900000000



###########################################################################
# SECTION: Extending the Agent
#
#   You can extend the snmp agent to have it return information
#   that you yourself define.

# exec: run a simple command using exec()
#   arguments:  [oid] name /path/to/executable arguments

exec echotest /bin/echo hello world






#
# Unknown directives read in from other files by snmpconf
#
com2sec local     localhost       COMMUNITY
com2sec mynetwork NETWORK/24      COMMUNITY
group MyRWGroup	v1         local
group MyRWGroup	v2c        local
group MyRWGroup	usm        local
group MyROGroup v1         mynetwork
group MyROGroup v2c        mynetwork
group MyROGroup usm        mynetwork
view all    included  .1                               80
access MyROGroup ""      any       noauth    exact  all    none   none
access MyRWGroup ""      any       noauth    exact  all    all    none


> >     [ First - *please* don't mail me privately, without copying
>      any responses to the mailing list.  I don't have the time
>      or inclination to offer private, unpaid, SNMP consultancy.
>      Keep discussions to the list, where others can both learn
>      and offer advice.  Thanks.   ]
> 
> On Fri, 2005-10-14 at 10:20 -0400, [email protected] wrote:
> > Thank you very much for your great help, Dave,
> > 
> > I need your help now too.
> > 
> > Here is my situations.
> > 
> > When I ifconfig I got two devises eth0 and lo, eth0 gave me local network
> IP
> > that is something like 192.168.0.xxx, and lo gave me 127.0.0.1.
> > 
> > When I run snmpconf perl script, it automatically configure my agent to
> > localhost that is 127.0.0.1. So, it works if I type something like snmpwalk
> ...
> > localhost ...
> 
> But what did snmpconf put in your snmpd.conf file?
> It's no use just saying "it automatically configured my agent".
> We need to know *exactly* what entries it generated.
> 
> Trying to debug your system by guessing what you might have
> set up, just isn't sensible.
> 
> 
> > I don't know if any way I can configure my agent that makes snmpwalk ...
> > 192.168.0.xxx ... works too.
> > 
> > May I just simply add 192.168.0.xxx into somewhere to make snmpconf access
> it?
> > 
> > By the way, any computer i want to monitor, I have to install apache, snmp
> > manager and agent like I did in my own computer, is that right?
> 
> No.
> You need the agent - nothing else.
> You'll need the management software on the system that you'll be
> monitoring things *from* - not the systems you need to monitor.
> I don't know where apache comes into it - that's not relevant
> to network management at all.
> 
> 
> 
> > One more question, If I configure snmp agent in other computer using
> localhost,
> > may I monitor it by something like snmpwalk ...it's network IP ... in my
> > computer? Put it in another way, when I type snmpwalk ... test.net-snmp.org
> ...
> > which just configure its agent with localhost(127.0.0.1)?
> 
> It's impossible to answer that, until you stop using vague phrases like
> "configuring the agent using localhost".  We need to know *EXACTLY* what
> the config settings are.
> 
> 
> Dave
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Net-snmp-users mailing list
> [email protected]
> Please see the following page to unsubscribe or change other options:
> https://lists.sourceforge.net/lists/listinfo/net-snmp-users
> 






-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
----- End forwarded message -----






-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.