Author Topic: Monitor nodes with dynamic IP (dyndns) ?  (Read 6384 times)

hkusulja

  • Newbie
  • *
  • Posts: 44
    • View Profile
Monitor nodes with dynamic IP (dyndns) ?
« 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
Quote
NetXMS 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 ? :/)
« Last Edit: April 21, 2014, 12:43:42 pm by hkusulja »

d-ray

  • Newbie
  • *
  • Posts: 46
    • View Profile
Re: Monitor nodes with dynamic IP (dyndns) ?
« Reply #1 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.

hkusulja

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Monitor nodes with dynamic IP (dyndns) ?
« Reply #2 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 ...
« Last Edit: May 05, 2014, 12:01:02 pm by hkusulja »

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 7036
    • View Profile
Re: Monitor nodes with dynamic IP (dyndns) ?
« Reply #3 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

andrey--k

  • Full Member
  • ***
  • Posts: 216
    • View Profile
Re: Monitor nodes with dynamic IP (dyndns) ?
« Reply #4 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?

hkusulja

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Monitor nodes with dynamic IP (dyndns) ?
« Reply #5 on: May 05, 2014, 04:20:58 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 :)

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 7036
    • View Profile
Re: Monitor nodes with dynamic IP (dyndns) ?
« Reply #6 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

hkusulja

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Monitor nodes with dynamic IP (dyndns) ?
« Reply #7 on: May 05, 2014, 04:47:35 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
« Last Edit: May 09, 2014, 03:19:24 pm by hkusulja »

d-ray

  • Newbie
  • *
  • Posts: 46
    • View Profile
Re: Monitor nodes with dynamic IP (dyndns) ?
« Reply #8 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


Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 7036
    • View Profile
Re: Monitor nodes with dynamic IP (dyndns) ?
« Reply #9 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