NetXMS Support Forum

English Support => General Support => Topic started by: Marcin on September 29, 2014, 03:01:52 PM

Title: SNMP source port
Post by: Marcin on September 29, 2014, 03:01:52 PM
Hello,

We have three Weblogic domains configured on one system. In each domain there is AdminServer. When we shutdown one or all domains it's not clear which domain was stopped. In SNMP trap log all events looks exactly the same. In case stopping all domains:

23.09.2014 18:34:22   153.9.1.58   scrd   .1.3.6.1.4.1.140.625.0.70   .1.3.6.1.4.1.140.625.100.5 == 'Tue Sep 23 18:34:22 CEST 2014'; .1.3.6.1.4.1.140.625.100.10 == 'AdminServer'
23.09.2014 18:34:22   153.9.1.58   scrd   .1.3.6.1.4.1.140.625.0.70   .1.3.6.1.4.1.140.625.100.5 == 'Tue Sep 23 18:34:22 CEST 2014'; .1.3.6.1.4.1.140.625.100.10 == 'AdminServer'
23.09.2014 18:34:22   153.9.1.58   scrd   .1.3.6.1.4.1.140.625.0.70   .1.3.6.1.4.1.140.625.100.5 == 'Tue Sep 23 18:34:22 CEST 2014'; .1.3.6.1.4.1.140.625.100.10 == 'AdminServer'

Each Weblogic domain is configured separately and it's using it's own port to send SNMP events.
Is it possible to create an Event Processing Policy and use SNMP source port attribute to distinguish environments?

Best regards,
Marcin
Title: Re: SNMP source port
Post by: Victor Kirhenshtein on October 03, 2014, 07:38:42 PM
Hi,

I've added additional named parameter "sourcePort" to all events generated from SNMP traps. You can access it via %<sourcePort> macro or using GetEventParameter($event, "sourcePort") call in scripts.

Best regards,
Victor
Title: Re: SNMP source port
Post by: Marcin on October 08, 2014, 11:30:57 AM
Hi Victor,

I created following filtering script:
sub main()
{
  s = GetEventParameter($event, "sourcePort");
  if (s == NULL)
  {
  return false; // Don't match rule
  }
  return true; // Match rule
}
but it always return true -> source port is NULL.

I tried to create an event using a macro with message:
"Test event, port: %<sourcePort>"
but it does not return any port for the SNMP trap in the Event Log.

I did something wrong?

Best regards,
Marcin
Title: Re: SNMP source port
Post by: Victor Kirhenshtein on October 09, 2014, 11:38:13 AM
You have to wait for 1.2.17 release :) Alternatively, you can download current development snapshot and test it.

Best regards,
Victor
Title: Re: SNMP source port
Post by: Marcin on October 09, 2014, 02:17:27 PM
OK. Thank you for the information.
I misunderstood your previous post. I will wait for 1.2.17 then.