RE: Script Filter

From: Victor Kirhenshtein <victor_at_DOMAIN_REMOVED>
Date: Tue, 2 May 2006 15:35:33 +0300

Hello!

Don't forget that this is only a filter, not an instruction to actively
poll that subnet. Network discovery is based on polling nodes already
known to NetXMS server, so you have to have at least one node in
particular subnet to discover other nodes in that subnet.

For example, you have networks 10.0.0.0/24 (network A) and 10.1.0.0/24
(network B), with NetXMS server located in network A at address
10.0.0.10, and you have a router connecting these subnets. When you
start NetXMS autodiscovery for the first time, it will know only one
device - management server itself, so autodiscovery process will poll
management server to find other devices. As soon as router will be
found, discovery process will start to detect devices in network B
(using information from router). But, if you set a discovery filter to
discover only devices in network B, you will never find any device,
because NetXMS server itself not directly connected to network B, and it
don't know any device connected to network B, and will not discover them
because of discovery filter. To allow discovery of devices in network B,
you should either add your router (or any other device) connected to
network B manually, or modify your discovery filter so it will allow
discovery of your router(s) as well.

For your reference, below is a network discovery algorithm:

1 Loop through all known nodes
2 Get arp cache from node
3 Loop through IP addresses in received ARP cache
4 If address is known (i.e. we have a node with that address), go
to step 8
5 Gather information about new node
6 Pass new node through discovery filter, if not passed go to step
8
7 Add new node to database
8 End loop
9 End loop

Other possible discovery problems:

1. Your router(s) doesn't allow SNMP access from NetXMS server 2. SNMP
community string used by NetXMS server is incorrect 3. SNMP requests
filtered somewhere in the middle by the firewall 4. NetXMS agent is not
running on machine with NetXMS server (not a big problem, but it's
recommended to run agent on server's machine) 5. NetXMS agent on server
machine should accept connections both from loopback and real addresses.

Hope this helps!

Best regards,
Victor

-----Original Message-----
From: TIM MOORE [mailto:MOORET10_at_odjfs.state.oh.us]
Sent: Tuesday, 02 May, 2006 14:52
To: netxms-users_at_alk.lv; Victor Kirhenshtein
Subject: Re: [netxms-users] Script Filter

Victor,

I am trying what you outlined below for a filter. Here is what I
have:
(P.S. I called it Subnet)

sub main()
{
        return AddrInSubnet($1->ipAddr,"10.9.6.0","255.255.255.0");
}

I changed the following things in the Server Configuration and restarted
the process:

DiscoverFilter - Subnet (I also tried Filter::Subnet)
RunNetworkDiscovery - "1" (Changed from zero)

Still, it doesn't seem to poll that subnet and add any devices. What am
I missing?

--------------------------------------
Tim Moore
614.387.8197
Network Operations Center
ODJFS

>>> victor_at_opticom.lv 3/23/2006 9:01 AM >>>

Hello!

To discover devices only in range 10.64.0.0 - 10.128.0.0, you script
should looks like:

sub main()
{
        return AddrInRange($1->ipAddr, "10.64.0.0", "10.128.0.0");
}

To discover devices on subnet 10.4.0.0/16

sub main()
{
        return AddrInSubnet($1->ipAddr, "10.4.0.0", "255.255.0.0");
}

And, to discover devices belonging to either given range or given
subnet:

sub main()
{
        return AddrInRange($1->ipAddr, "10.64.0.0", "10.128.0.0") ||
AddrInSubnet($1->ipAddr, "10.4.0.0", "255.255.0.0"); }

Best regards,
Victor

> -----Original Message-----
> From: TIM MOORE [mailto:MOORET10_at_odjfs.state.oh.us]
> Sent: Thursday, March 23, 2006 2:48 PM
> To: NetXMS Users
> Subject: [netxms-users] Script Filter
>
>
>
> I was hoping that this new version would have an easier way to do the
> scripts for filtering. They appear the same to me. So I would like
> to ask how to write a script to only tell the server to discover
> devices on say...
>
> 10.4.0.0 /16
> or
> 10.90.60.0 / 24
>
> If I could just see how to do some like this, I could figure out the
> rest. Or is there an easy way to do a block?
>
> 10.64.0.0 - 10.128.0.0
>
> Thanks for any help.
>
>
> --------------------------------------
> Tim Moore
> 614.387.8197
> Network Operations Center
> ODJFS
>
> This e-mail message, including any attachments, is for the sole use of

> the intended recipient(s) and may contain private, confidential,
> and/or privileged information. Any unauthorized review, use,
> disclosure, or distribution is prohibited. If you are not the intended

> recipient, employee, or agent responsible for delivering this message,

> please contact the sender by reply e-mail and destroy all copies of
> the original e-mail message.
>
>

This e-mail message, including any attachments, is for the sole use of
the intended recipient(s) and may contain private, confidential, and/or
privileged information. Any unauthorized review, use, disclosure, or
distribution is prohibited. If you are not the intended recipient,
employee, or agent responsible for delivering this message, please
contact the sender by reply e-mail and destroy all copies of the
original e-mail message.
Received on Tue May 02 2006 - 15:35:33 EEST

This archive was generated by hypermail 2.2.0 : Tue May 02 2006 - 15:42:41 EEST