NetXMS Support Forum

English Support => General Support => Topic started by: hkusulja on April 21, 2014, 11:31:18 AM

Title: Monitor nodes with dynamic IP (dyndns) ?
Post by: hkusulja on April 21, 2014, 11:31:18 AM
Hi,
I have few cases, where I do not have public static IP, only dynamic IP and I use dyndns.org to resolve to current correct IP address.
I use latest (1.2.13) server and console version.

I have added my node by using hostname, and my agent works, however after 24 hours / change of IP, it seems that netxms wrote previous IP to DB and now it uses only this / old IP. (Even on General communication, primary hostname is displayed correctly). Of course I do have low DNS A record TTL and other services works fine, so it's only netxms server problem. On node - object details , primary host name is fine, but primary IP address is an old one.

I found it in Unsorted Features List - http://wiki.netxms.org/wiki/Unsorted_Features_List
QuoteNetXMS can use DNS name as primary communication address. In that case, change in IP address will be reported via special event. Useful for monitoring machines with dynamic IP.

But I am not sure, how to achieve that netxms server does DNS resolution of node each time when pooling ?

edit:
when I manually Pull Configuration from node, it gets rediscovered and primary ip address changes, and then it works (although expected interface status are reset since they changed from unknown ethehrnet to correct list, is this expected behavior ? :/)
Title: Re: Monitor nodes with dynamic IP (dyndns) ?
Post by: d-ray on April 24, 2014, 08:58:49 PM
Hi,

Nice to read your post....

I have just the same issue.

https://www.netxms.org/forum/general-support/when-proxy-node-goes-offline-gt-not-resored-untill-manualy-poll-configuration/msg13639/#msg13639
(When the host was offline he will get a new IP. And after a manual poll it is back OK)

So it looks the same as your  issue.
But with nodes in a zone it will not be fixed with manual configuration poll.

In my setup I have 10 nodes configured as proxy (with dyndns). There are 10 zones configured and each zone is sending the data to a proxy.

When the IP is changing from a client node in the zone by dhcp. The primary Ip address stays on the old IP. Also manual configuration poll doesn't solve the issue. The only way to fix it is to manual change the Primary Host name in the new IP. Then netxms will update the primary IP address.
For me is DNS working perfect on the local lan.

For me it looks there is a bug in the resolving from the primary host name to the primary ip address.
Title: Re: Monitor nodes with dynamic IP (dyndns) ?
Post by: hkusulja on May 02, 2014, 12:58:48 PM
I also agree it is a small bug, and I hope that NetXMS team will add id to Issues list: https://www.radensolutions.com/chiliproject/projects/netxms/issues

NetXMS team , anyone ?
I still not understand how to enable DNS resolution every time on pooling ...
Title: Re: Monitor nodes with dynamic IP (dyndns) ?
Post by: Victor Kirhenshtein on May 05, 2014, 04:06:15 PM
Currently NetXMS do name resolve only on configuration poll. Looks like we have to move it to status poll.

Best regards,
Victor
Title: Re: Monitor nodes with dynamic IP (dyndns) ?
Post by: andrey--k on May 05, 2014, 04:18:13 PM
I think move name resolve to status poll can cause large load on traffic if many nodes exists...
Isn't it?
Title: Re: Monitor nodes with dynamic IP (dyndns) ?
Post by: hkusulja on May 05, 2014, 04:20:58 PM
Quote from: andrey--k on May 05, 2014, 04:18:13 PM
I think move name resolve to status poll can cause large load on traffic if many nodes exists...
Isn't it?
I understand, but then it should be an option / flag on each node.
"Do the resolution every time on pool" true / false

So I understand that I should write manually scheduled script to do DNS lookup and update SQL database of NetXMS ?
Or Victor can plan this in near NetXMS release version :)
Title: Re: Monitor nodes with dynamic IP (dyndns) ?
Post by: Victor Kirhenshtein on May 05, 2014, 04:34:28 PM
Yes, main reason for moving name resolution to configuration poll was concern that there will be too much DNS requests. I'll see how I could make this configurable.

Best regards,
Victor
Title: Re: Monitor nodes with dynamic IP (dyndns) ?
Post by: hkusulja on May 05, 2014, 04:47:35 PM
Quote from: Victor Kirhenshtein on May 05, 2014, 04:34:28 PM
Yes, main reason for moving name resolution to configuration poll was concern that there will be too much DNS requests. I'll see how I could make this configurable.

Best regards,
Victor
Great you are my saviour !
I have created feature request here: https://www.radensolutions.com/chiliproject/issues/566
Title: Re: Monitor nodes with dynamic IP (dyndns) ?
Post by: d-ray on May 20, 2014, 02:59:16 AM
I have seen that the request is moved to version 1.3  :o
Is there no work around ?

I did some tests with removing the Primary_ip and/or primary_name in the nodes table.
But when I do a configuration poll manualy. The old IP is back in the database.
So where did he gets that old data. When I do a ping on the proxy node to the client he answers with the right new IP.

Isn't it possible to do a DNS resolve only when there is no answer from the node.
So when the node is offline. he try first a dns resolve to be sure that the IP wasn't changed. So you will not have a lot of DNS requests.

Regrads.
Denis

Title: Re: Monitor nodes with dynamic IP (dyndns) ?
Post by: Victor Kirhenshtein on May 20, 2014, 10:37:39 AM
Hi!

Changing database while server is running will not help, because most configuration information is cached and server do not expect outside modifications in DB. You can use nxshell scripts to change node parameters as needed. Also, if you are building server from sources, you'll be able to apply patch when we solve #566.

Best regards,
Victor