Re: Sending SNMP traps to custom ports from Linux

2011-10-10 Thread Vivek Nagaraj
Ok. Check this out! I am connecting the snmp trap sender server directly to my machine which has a trap receiver server and assigning the IP addresses manually to each of them. Only one of the trap receiver software (named webnms) is showing the received trap (at custom ports) but none other afte

Re: Sending SNMP traps to custom ports from Linux

2011-10-10 Thread Dave Shield
On 6 October 2011 17:57, Vivek Nagaraj wrote: > I am receiving SNMP traps on custom ports from RHEL 4.6 x86. Tried > installing trap receiver in one of the client servers in the same > subnet as that of the RHEL server. Outside the subnet, I couldn't see > traps on my machine though. Not clear why

Re: Sending SNMP traps to custom ports from Linux

2011-10-06 Thread Vivek Nagaraj
This might seem a lot strange or rather a shock for you guys out there! I am receiving SNMP traps on custom ports from RHEL 4.6 x86. Tried installing trap receiver in one of the client servers in the same subnet as that of the RHEL server. Outside the subnet, I couldn't see traps on my machine tho

Re: Sending SNMP traps to custom ports from Linux

2011-10-04 Thread Magnus Fromreide
On Tue, 2011-10-04 at 12:45 +0530, Vivek Nagaraj wrote: > I shall provide you some of my findings now. Please correct me if I am wrong. > > 1) I 'DID' receive the trap message on my trap receiver (another > server in the network) on port no 162 if mentioned hostname:portno What command, exactly,

Re: Sending SNMP traps to custom ports from Linux

2011-10-04 Thread Vivek Nagaraj
I shall provide you some of my findings now. Please correct me if I am wrong. 1) I 'DID' receive the trap message on my trap receiver (another server in the network) on port no 162 if mentioned hostname:portno 2) I 'DID NOT' receive the trap message on my trap receiver (another server in the netw

Re: Sending SNMP traps to custom ports from Linux

2011-10-04 Thread Magnus Fromreide
On Tue, 2011-10-04 at 12:03 +0530, Vivek Nagaraj wrote: > I have added my agent address to the snmpd.conf file. Or else I would > have not received the trap at port no 162. Read my lips. snmptrap *DOES NOT OPEN* snmpd.conf! You can write anything you like in that file and it won't affect the opera

Re: Sending SNMP traps to custom ports from Linux

2011-10-03 Thread Vivek Nagaraj
I have added my agent address to the snmpd.conf file. Or else I would have not received the trap at port no 162. snmptrap -v 1 -m ALL -c public \ 135.36.115.62:5000 .1.3.6.1.6.3169.254.1.1 127.128.129.130 6 1 20071105 >> Yes. The agent is 135.36.115.62. I still didn't receive traps at port no 500.

Re: Sending SNMP traps to custom ports from Linux

2011-10-03 Thread Magnus Fromreide
On Tue, 2011-10-04 at 11:21 +0530, Vivek Nagaraj wrote: > I just tried it on RHEL 4.6 x86. Here is the more detailed OS info: > Linux dhcp-135-24-228-150 2.6.9-67.EL #1 Wed Nov 7 13:41:13 EST 2007 > i686 i686 i386 GNU/Linux > Red Hat Enterprise Linux AS release 4 (Nahant Update 6) > NET-SNMP versio

Re: Sending SNMP traps to custom ports from Linux

2011-10-03 Thread Vivek Nagaraj
I just tried it on RHEL 4.6 x86. Here is the more detailed OS info: Linux dhcp-135-24-228-150 2.6.9-67.EL #1 Wed Nov 7 13:41:13 EST 2007 i686 i686 i386 GNU/Linux Red Hat Enterprise Linux AS release 4 (Nahant Update 6) NET-SNMP version: 5.1.2 When I executed this command on RHEL 4.6 x86 snmptrap -v

Re: Sending SNMP traps to custom ports from Linux

2011-10-03 Thread Niels Baggesen
On Tue, Oct 04, 2011 at 08:19:57AM +0530, Vivek Nagaraj wrote: > So, you mean to say any net-SNMP version above and including net-SNMP > 5.4 supports mentioning ports along with host name? No, Magnus is telling you about the defTarget directive. I just told you that using portnumber with hostname

Re: Sending SNMP traps to custom ports from Linux

2011-10-03 Thread Vivek Nagaraj
The RHEL 4.6 32-bit I am using has net-SNMP version 5.1.2. So, I hope this would not support ports mentioned with the snmptrap command. Please correct me if I am wrong. The RHEL 6.1 has version 5.5 installed. So, you mean to say any net-SNMP version above and including net-SNMP 5.4 supports menti

Re: Sending SNMP traps to custom ports from Linux

2011-10-03 Thread Magnus Fromreide
On Mon, 2011-10-03 at 19:50 +0530, Vivek Nagaraj wrote: > Ok. I am sorry. Not working in the sense, if I provide custom ports > other than 162, I am not receiving any traps at those custom ports. > > I am not seeing any error message after the execution of the command > mentioned by you. > > My s

Re: Sending SNMP traps to custom ports from Linux

2011-10-03 Thread Magnus Fromreide
On Mon, 2011-10-03 at 08:44 +0530, Vivek Nagaraj wrote: > Response to your previous mail: > > 1) Could not find 'snmp.conf' As Niels said, you have to make it yourself. > > 2) And options you have mentioned to be used with 'snmptrap' command > is not working --defTarget="udp:169.254.1.1:30617"

Re: Sending SNMP traps to custom ports from Linux

2011-10-03 Thread Niels Baggesen
On Mon, Oct 03, 2011 at 07:50:57PM +0530, Vivek Nagaraj wrote: > My server administrator says that the backward compatibility needs to > be maintained with older server OS too. I am kind of stuck. I tried > and tried and tried but could not receive traps at the ports other > than 162. With an up2d

Re: Sending SNMP traps to custom ports from Linux

2011-10-03 Thread Vivek Nagaraj
Ok. I am sorry. Not working in the sense, if I provide custom ports other than 162, I am not receiving any traps at those custom ports. I am not seeing any error message after the execution of the command mentioned by you. My server administrator says that the backward compatibility needs to be m

Re: Sending SNMP traps to custom ports from Linux

2011-10-03 Thread Niels Baggesen
On Mon, Oct 03, 2011 at 12:11:50PM +0530, Vivek Nagaraj wrote: > Is there any net-snmp issue (you are aware of) regarding this in older > net-snmp binaries placed in RHEL 4.7?! > > In simple words, its working fine in RHEL 6.1 but not in RHEL 4.7. Any idea > why? Define "not working"! Any error

Re: Sending SNMP traps to custom ports from Linux

2011-10-02 Thread Vivek Nagaraj
Thanks a lot Niels! snmptrap -v 1 -m ALL -c public 135.36.115.62:30617 .1.3.6.1.6.3 169.254.1.1 6 1 20071105 >> Worked like magic on custom ports on RHEL 6.1! Is there any net-snmp issue (you are aware of) regarding this in older net-snmp binaries placed in RHEL 4.7?! In simple words, its workin

Re: Sending SNMP traps to custom ports from Linux

2011-10-02 Thread Niels Baggesen
On Mon, Oct 03, 2011 at 08:44:50AM +0530, Vivek Nagaraj wrote: > Response to your previous mail: > > 1) Could not find 'snmp.conf' You have to create it yourself. > 2) And options you have mentioned to be used with 'snmptrap' command > is not working > [root@localhost snmp]# snmptrap -v 1 -m AL

Re: Sending SNMP traps to custom ports from Linux

2011-10-02 Thread Vivek Nagaraj
Response to your previous mail: 1) Could not find 'snmp.conf' 2) And options you have mentioned to be used with 'snmptrap' command is not working Please refer the attachments for more details. Thanks a lot for your time and response. [root@localhost snmp]# snmptrap -v 1 -m ALL -c public 135.36.

Re: Sending SNMP traps to custom ports from Linux

2011-10-02 Thread Vivek Nagaraj
When you starts talking about execl snmptrap I also have to say that I wouldn't have done it that way... I would probably either embed the library to send the traps directly or let the program act as an AgentX subagent and use that to make the agent send the traps to the places that are specified i

Re: Sending SNMP traps to custom ports from Linux

2011-10-02 Thread Magnus Fromreide
On Sun, 2011-10-02 at 10:37 +0530, Vivek Nagaraj wrote: > Ok. That sounds reasonable. Thanks a lot! Hope you can can answer my > following questions: > > 1) What is the difference between snmp.conf and snmpd.conf files in > '/etc/snmp/' directory? snmp.conf is used by all snmp*-programs snmpd.con

Re: Sending SNMP traps to custom ports from Linux

2011-10-01 Thread Vivek Nagaraj
Ok. That sounds reasonable. Thanks a lot! Hope you can can answer my following questions: 1) What is the difference between snmp.conf and snmpd.conf files in '/etc/snmp/' directory? 2) When I execl 'snmptrap' command from my program, which of the above two *.conf files are actually used? Thanks,

Re: Sending SNMP traps to custom ports from Linux

2011-10-01 Thread Magnus Fromreide
On Sat, 2011-10-01 at 19:44 +0530, Vivek Nagaraj wrote: > All I did was added this line in 'snmpd.conf': "defTarget snmptrap udp > :50162" and restarted the snmpd service using: 'service snmpd > restart'. > > I used to get the first trap at the UDP port 50162. And I used to > receive trap on my cl

Re: Sending SNMP traps to custom ports from Linux

2011-10-01 Thread Vivek Nagaraj
All I did was added this line in 'snmpd.conf': "defTarget snmptrap udp :50162" and restarted the snmpd service using: 'service snmpd restart'. I used to get the first trap at the UDP port 50162. And I used to receive trap on my client Windows machine where the trap receiver was running at the defa

Re: Sending SNMP traps to custom ports from Linux

2011-10-01 Thread Magnus Fromreide
On Wed, 2011-09-28 at 14:32 +0530, Vivek Nagaraj wrote: > Thanks a lot!!! That worked like a charm on the first go! But the > problem I faced was that the first time I got the trap at the right > port (not 162), but subsequent traps were still sent to the default > port i.e., 162. > > Can you plea

Re: Sending SNMP traps to custom ports from Linux

2011-09-28 Thread Vivek Nagaraj
Thanks a lot!!! That worked like a charm on the first go! But the problem I faced was that the first time I got the trap at the right port (not 162), but subsequent traps were still sent to the default port i.e., 162. Can you please help me on this??? Thanks a ton. --

Re: Sending SNMP traps to custom ports from Linux

2011-09-28 Thread Magnus Fromreide
On Wed, 2011-09-28 at 13:19 +0530, Vivek Nagaraj wrote: > Ok. That seems to be good one. > > But cant I just change the default port to some other other than 162 > in the net-snmp code and get it compiled? You do not need to recompile to change the default port. Put the following line in your sn

Re: Sending SNMP traps to custom ports from Linux

2011-09-28 Thread Vivek Nagaraj
Ok. That seems to be good one. But cant I just change the default port to some other other than 162 in the net-snmp code and get it compiled? -- All the data continuously generated in your IT infrastructure contains a def

Re: Sending SNMP traps to custom ports from Linux

2011-09-28 Thread Dave Shield
On 28 September 2011 07:56, Vivek Nagaraj wrote: > I am building an application which sends SNMP trap which executes > 'snmptrap' command. > Is there anyway that I can make it send to custom port other than > 162??? $ man snmpcmd AGENT SPECIFICATION format