Basic Configurations for TrapHandling

2004-11-21 Thread Anil Kumar



Hi Friends !,

I am new to snmp so please guide 
me.

I have a Cisco/Bay router,. I just want the 
interface up/down or traffic beyond certail levelshould generate a trap on 
Linux machine and linux machine should fire a program/script according to that. 
A small script maybe send a email.

what are the config reqd on Cisco/Bay and what are 
the configs reqd on Linux.

Thanx  Regards
Anil

Linux iqs-anil 2.4.20-8 (RedHat 9)
net-snmp-5.0.6-17
net-snmp-utils-5.0.6-17
perl-5.8.0-88




Re: Basic Configurations for TrapHandling

2004-11-21 Thread Anil Kumar



I get this error when I do the testing. I probably 
need to define the entries. Can you plz'e send me a sample 
file.


Regards
Anil

[EMAIL PROTECTED] 
root]# snmptrapd -d -o -t/etc/snmp/snmptrapd.conf: line 22: Error: 
Blank line following The token./etc/snmp/snmptrapd.conf: line 32: Error: 
Blank line following .RS token./etc/snmp/snmptrapd.conf: line 36: Error: 
Blank line following .br token./etc/snmp/snmptrapd.conf: line 50: Error: 
Blank line following .br token./etc/snmp/snmptrapd.conf: line 54: Error: 
Blank line following .br token./etc/snmp/snmptrapd.conf: line 55: Error: 
Blank line following .RS token./etc/snmp/snmptrapd.conf: line 56: Error: 
Blank line following .P token./etc/snmp/snmptrapd.conf: line 58: Error: 
Blank line following .RE token./etc/snmp/snmptrapd.conf: line 59: Error: 
Blank line following .RE token./etc/snmp/snmptrapd.conf: line 72: Error: 
Blank line following snmpd.conf. token./etc/snmp/snmptrapd.conf: line 
73: Error: Blank line following .RE token./etc/snmp/snmptrapd.conf: line 78: 
Error: Blank line following .RE token./etc/snmp/snmptrapd.conf: line 86: 
Error: Blank line following combination). token.net-snmp: 13 error(s) in 
config file(s)/etc/snmp/snmptrapd.conf: line 1: Warning: Unknown token: 
.TH./etc/snmp/snmptrapd.conf: line 2: Warning: Unknown token: 
.UC./etc/snmp/snmptrapd.conf: line 3: Warning: Unknown token: 
.SH./etc/snmp/snmptrapd.conf: line 4: Warning: Unknown token: 
/usr/share/snmp/snmptrapd.conf./etc/snmp/snmptrapd.conf: line 5: 
Warning: Unknown token: .SH./etc/snmp/snmptrapd.conf: line 6: Warning: 
Unknown token: .B./etc/snmp/snmptrapd.conf: line 7: Warning: Unknown token: 
is./etc/snmp/snmptrapd.conf: line 8: Warning: Unknown token: 
receiving./etc/snmp/snmptrapd.conf: line 9: Warning: Unknown token: 
contain./etc/snmp/snmptrapd.conf: line 10: Warning: Unknown token: 
.B./etc/snmp/snmptrapd.conf: line 11: Warning: Unknown token: 
section./etc/snmp/snmptrapd.conf: line 12: Warning: Unknown token: 
receive,./etc/snmp/snmptrapd.conf: line 13: Warning: Unknown token: 
extensibility./etc/snmp/snmptrapd.conf: line 14: Warning: Unknown token: 
.SH./etc/snmp/snmptrapd.conf: line 15: Warning: Unknown token: 
First,./etc/snmp/snmptrapd.conf: line 16: Warning: Unknown token: 
.I./etc/snmp/snmptrapd.conf: line 17: Warning: Unknown token: 
manual./etc/snmp/snmptrapd.conf: line 18: Warning: Unknown token: 
describes./etc/snmp/snmptrapd.conf: line 19: Warning: Unknown token: 
are./etc/snmp/snmptrapd.conf: line 20: Warning: Unknown token: 
.SH./etc/snmp/snmptrapd.conf: line 21: Warning: Unknown token: 
.IP./etc/snmp/snmptrapd.conf: line 22: Error: Blank line following The 
token./etc/snmp/snmptrapd.conf: line 23: Warning: Unknown token: 
.I./etc/snmp/snmptrapd.conf: line 24: Warning: Unknown token: 
configuration./etc/snmp/snmptrapd.conf: line 25: Warning: Unknown token: 
external./etc/snmp/snmptrapd.conf: line 26: Warning: Unknown token: 
If./etc/snmp/snmptrapd.conf: line 27: Warning: Unknown token: 
.I./etc/snmp/snmptrapd.conf: line 28: Warning: Unknown token: 
then./etc/snmp/snmptrapd.conf: line 29: Warning: Unknown token: 
default./etc/snmp/snmptrapd.conf: line 30: Warning: Unknown token: 
The./etc/snmp/snmptrapd.conf: line 31: Warning: Unknown token: 
following./etc/snmp/snmptrapd.conf: line 32: Error: Blank line following .RS 
token./etc/snmp/snmptrapd.conf: line 33: Warning: Unknown token: 
.IP./etc/snmp/snmptrapd.conf: line 34: Warning: Unknown token: 
The./etc/snmp/snmptrapd.conf: line 35: Warning: Unknown token: 
.IR./etc/snmp/snmptrapd.conf: line 36: Error: Blank line following .br 
token./etc/snmp/snmptrapd.conf: line 37: Warning: Unknown token: 
.IP./etc/snmp/snmptrapd.conf: line 38: Warning: Unknown token: 
The./etc/snmp/snmptrapd.conf: line 39: Warning: Unknown token: 
.IP./etc/snmp/snmptrapd.conf: line 40: Warning: Unknown token: 
A./etc/snmp/snmptrapd.conf: line 41: Warning: Unknown token: 
enclosed./etc/snmp/snmptrapd.conf: line 42: Warning: Unknown token: 
the./etc/snmp/snmptrapd.conf: line 43: Warning: Unknown token: 
should./etc/snmp/snmptrapd.conf: line 44: Warning: Unknown token: 
the./etc/snmp/snmptrapd.conf: line 45: Warning: Unknown token: 
possible./etc/snmp/snmptrapd.conf: line 46: Warning: Unknown token: 
contained./etc/snmp/snmptrapd.conf: line 47: Warning: Unknown token: 
be./etc/snmp/snmptrapd.conf: line 48: Warning: Unknown token: 
SNMPv1./etc/snmp/snmptrapd.conf: line 49: Warning: Unknown token: 
method./etc/snmp/snmptrapd.conf: line 50: Error: Blank line following .br 
token./etc/snmp/snmptrapd.conf: line 51: Warning: Unknown token: 
.IP./etc/snmp/snmptrapd.conf: line 52: Warning: Unknown token: 
A./etc/snmp/snmptrapd.conf: line 53: Warning: Unknown token: 
can./etc/snmp/snmptrapd.conf: line 54: Error: Blank line following .br 
token./etc/snmp/snmptrapd.conf: line 55: Error: Blank line following .RS 
token./etc/snmp/snmptrapd.conf: line 56: Error: Blank line following .P 
token./etc/snmp/snmptrapd.conf: line 57: Error: Bad 

Re: Sending traps from an agentX subagent, and snmpd robustness

2004-11-21 Thread Russell Bell

I asked last week how best to send traps from an agentX subagent,
where the trap originates in a separate thread from the main SNMP
thread.  With Rob Storey's help I've arrived at the the following
solution, which works fine so far.

In summary, the main thread creates a pipe, and the main loop uses
select() to wait until either the pipe or the net-snmp fd's are
readable.  The other threads write trap information to the pipe;
when it's readable, the main thread reads the trap data from the
pipe and calls send_v2_trap().

I couldn't use agent_check_and_process() to wait for events because
it ignores fd's registered with register_readfd().  Only receive()
in snmpd.c uses external_readfd[].  So I wrote a stripped-down clone
of agent_check_and_process.  In pseudo-code:

- snmp_select_info()
- add pipe fd to fdset
- select()
- snmp_timeout() or snmp_read()
- run_alarms(), netsnmp_chek_outstanding_agent_requests()
- read pipe if it's readable  send traps

A separate question.  The main agent (snmpd) listens on TCP
AgentXSocket localhost:705.  If I do telnet localhost 705 and
hit return, snmpd starts hard-looping and doesn't answer any more
requests.  Of course the telnet protocol will look like rubbish to
an agentX protocol endpoint, but it shouldn't self-destruct.
Has anyone else observed this.  Netsnmp 5.1.2 on Solaris 8.

Russell Bell
[EMAIL PROTECTED]



---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
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


SNMP and CIM

2004-11-21 Thread Kurapati M-G19456
Hi all, 

Any clues on where to get more data about CIM and SNMP interworking would be 
greatly helpful. I did some googling, I got CIM and LDAP interworking but not 
CIM and SNMP.  

Thanks
Mahesh


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
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


Re: Route Metrics

2004-11-21 Thread Murali Bestha
Hi,

Thanks for the info. 

On our systems, the net-snmp version is 5.0.1 which doesnot have the
ipCidrRouteNumber. Can I directly upgrade the snmp version to latest
one with the rmp available on the net-snmp.org?

Also, I have gone thorugh the  walking a column of the ipRouteTable.
The child for  (like ipRouteDest) and counting the number ipRouteTable
is ipRouteEntry which has many child nodes like ipRouteDest(1),
ipRouteIfIndex(2), ipRouteMetric1(3),  ipRouteMetric2(4), 
ipRouteMetric3(5),  ipRouteMetric4(6)  etc. snmpwalk through this
ipRouteEntry gives the following results.

RFC1213-MIB::ipRouteDest.0.0.0.0 = IpAddress: 0.0.0.0
RFC1213-MIB::ipRouteDest.127.0.0.0 = IpAddress: 127.0.0.0
RFC1213-MIB::ipRouteDest.172.17.12.0 = IpAddress: 172.17.12.0

Please let me know how to count the number of responses from this and
also what would that response stand for?

Thanks and Regards
Murali

On Thu, 18 Nov 2004 09:18:34 -0500, Users Robert Story
[EMAIL PROTECTED] wrote:
 KMG -Original Message-
 KMG Bestha Sent: Thursday, November 18, 2004 11:53 AM
 KMG I have a requirement to find out the routing data size/forwarding data
 KMG size by a router machine. The router could be a Linux Server or a HP-UX
 KMG machine. Can anybody please let me know what are the corresponding OIDs?
 
 On Thu, 18 Nov 2004 12:43:16 +0530 Kurapati wrote:
 KMG Refer to ipCidrRouteNumber in RFC2096, if I understand your question
 KMG correctly.
 
 Unfortunately, that object isn't implemented yes in net-snmp.
 
 The best bet that is currently going to work for HP-UX and Linux is going to 
 be
 walking a column of the ipRouteTable (like ipRouteDest) and counting the 
 number
 of responses. Warning: for machines with large route tables (several thousand
 routes), this will take a while, and the timeout may need to be set really 
 high
 (like 30 seconds or more, depending on the table size).
 
 The inetCidrRouteTable, new in 5.2 for Linux (any volunteers to port to HP-UX
 or other platforms?), is much faster, at the expense of being a bit of a 
 memory
 hog.
 
 --
 Robert Story; NET-SNMP Junkie
 Support: http://www.net-snmp.org/ irc://irc.freenode.net/#net-snmp
 Archive: http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users
 
 You are lost in a twisty maze of little standards, all different.



---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
___
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