Host name changes - not updating

Started by millerpaint, January 30, 2013, 10:53:41 PM

Previous topic - Next topic

millerpaint

Greetings,

We have changed about 30 host names of devices on our network, but when I do a manual re-poll of a device configuration, I get this result:

[30.01.2013 12:44:05] **** Poll request sent to server ****
[30.01.2013 12:44:05] Poll request accepted
[30.01.2013 12:44:05] Starting configuration poll for node _GS-NewZotac
[30.01.2013 12:44:05] Checking node's capabilities...
[30.01.2013 12:44:05]    Checking NetXMS agent...
[30.01.2013 12:44:05]    Checking SNMP...
[30.01.2013 12:44:05]    SNMP agent is active (version 2c)
[30.01.2013 12:44:05]    System description changed to Hardware: x86 Family 6 Model 28 Stepping 10 AT/AT COMPATIBLE - Software: Windows 2000 Version 5.1 (Build 2600 Multiprocessor Free)
[30.01.2013 12:44:05]    System name changed to MP-EPV-FARMINGT
[30.01.2013 12:44:13] Capability check finished
[30.01.2013 12:44:13] Checking interface configuration...
[30.01.2013 12:44:14] Interface configuration check finished
[30.01.2013 12:44:14] Checking node name
[30.01.2013 12:44:14] Node name is OK
[30.01.2013 12:44:14] Finished configuration poll for node _GS-NewZotac
[30.01.2013 12:44:14] Node configuration was changed after poll
[30.01.2013 12:44:14] **** Poll completed successfully ****

The new name of this Windows XP machine is "MP-EPV-FARMINGT" (there is no DNS entry for it).  NetXMS detects the name change as seen above, but in the console it remains as the old name (in this instance, "_GS-NewZotac".

When can I expect to see the host name get updated in the console view?  Or can I expect to see the new name?


Thanks for the help,

Kevin C.

Victor Kirhenshtein

Hi!

"system name" is just an attribute of the node, not the name of an object in NetXMS. If you want to keep node object's name consistent with "system name" property, you can implement simple configuration poll hook script, like this:


if (($node->snmpSysName != null) && ($node->snmpSysName != ""))
{
   RenameObject($node, $node->snmpSysName);
}


Put this script into script library under name Hook::ConfigurationPoll, and then nodes will be renamed when system name changes. Of course, you can add more complicated logic here.

Best regards,
Victor

P.S. More complicated hook script example: https://www.netxms.org/forum/general-support/how-use-configuration-poll-hook/msg8482/#msg8482

millerpaint

Excellent, thanks !  I will give this a try.


-Kevin C.