Page 1 of 2

How to remove SNMP trap destination IP via command line

Posted: Thu Feb 27, 2014 6:28 am
by babygen
Hi,

How to remove SNMP trap destination IP via command line? I can only see SNMP Send trap document done via GUI. What config file can I edit?

Thanks,
BabyGen

Re: How to remove SNMP trap destination IP via command line

Posted: Thu Feb 27, 2014 11:45 am
by sreinhardt
Could you please explain in more detail what you are looking to do?

Re: How to remove SNMP trap destination IP via command line

Posted: Thu Feb 27, 2014 11:47 pm
by babygen
Hi,

Currently, I have a problem with the GUI. I lost all the data in GUI but since the config is still there, my monitoring is still working and sending alerts to snmp trap destination NM1 and NM2 (Nagios -> NM1 and NM2 IPs).

I need to remove IP address of NM2 where Nagios is sending the traps so only NM1 will be active. I cannot do it via GUI (SNMP Trap Sender) since nothing is there. Is it possible to remove snmp trap destination NM2 in the config file? What config file is the snmp trap destination IPs saved? I tried to look at nagios.cfg file, I don't see the NM IP there.

Thanks so much for your help! I hope there is another way of removing the IP not going thru the GUI.

Regards,
BabyGen

Re: How to remove SNMP trap destination IP via command line

Posted: Fri Feb 28, 2014 11:57 am
by sreinhardt
I will have to check with our devs to see where nsti would have this configured. I should also ask, what version of nsti are you using?

Re: How to remove SNMP trap destination IP via command line

Posted: Tue Mar 04, 2014 9:32 pm
by babygen
Hi,

I am not sure of the version and if it's installed. Version of Nagios is quite old Nagios XI 2009R1.3E and I am using Centos 6.2. What command can I use to find nsti?

Thank you.

Regards,
BabyGen

Re: How to remove SNMP trap destination IP via command line

Posted: Wed Mar 05, 2014 11:22 am
by sreinhardt
It should say on the nsti interface, otherwise if you can tell me where it is installed, I likely could tell you which version you are on from that too.

Re: How to remove SNMP trap destination IP via command line

Posted: Wed Mar 05, 2014 11:10 pm
by babygen
Hi,

Looks like it's not there. I checked I don't have /etc/init.d/nsti and http://<server ip>/nsti gives Not found error. Is it possible it's not installed?

Thanks you.

Regards,
BabyGen

Re: How to remove SNMP trap destination IP via command line

Posted: Thu Mar 06, 2014 11:06 am
by sreinhardt
Well, you posted in nsti, so are you really just using snmptt and nagios xi/nagios core? If so I can just move this to the relevant forum, but that is why I asked what nsti version you were on. As for removing the destination IP in this case, it would probably be easiest to remove this via the snmptt.conf file and modify the exec line to not forward that data to your nagios system.(presuming that is what you want)

Re: How to remove SNMP trap destination IP via command line

Posted: Fri Mar 07, 2014 4:21 am
by babygen
Sorry about the confusion on nsti. I am just using snmptt and nagios core.

I still want the alerts to be sent to Nagios.

Server sends alerts to Nagios and Nagios forwards to NM1 and NM2. From Nagios, I wanted to remove IP of NM2 where Nagios forwards the alerts.
Server -> Nagios -> NM1 and NM2

I do not see NM1 and NM2 IP address in snmptt.conf file.

Thanks.

Re: How to remove SNMP trap destination IP via command line

Posted: Fri Mar 07, 2014 11:54 am
by sreinhardt
It sounds like you need to actaully modify the notification command to omit the ip\hostname or a portion of the message being sent. The reason I say this opposed to modifying it within snmptt is that doing it in snmptt would likely make nagios not understand what host and service it is intended for. Could you give an example of the notification from nagios and what you would actually like to see? Also if you could include the notification command that nagios uses to send to nm1\2 it would be helpful.