The following is a script I wrote that does an ovtopodump and parses the output into an /etc/hosts file. This should solve most NNM DNS problems. Run it as a cron job every night and it will populate your /etc/hosts with all the ip addresses and FQDNs in your topoliogy database. In this way the only time NNM will need to do a DNS lookup is when a new node is discovered. Make sure your /etc/nsswitch.conf file has "files" then "dns" for the hosts entry or it will not work. You also need to create a hosts.static file to put all entries you want that will not be in the topology database (for instance loghost). The best way to do this is simply copy your current /etc/hosts to /etc/hosts.static before running this script. This script will only work on Unix with Perl 5.0 or greater, but feel free to modify it. Don't forget to do a chmod 755 on the script and all created files and make sure the shebang line "#!/path/to/perl" is on LINE #1.
# This program generates an /etc/hosts file from
# an ovtopodump output. A /etc/hosts.static file must exist
# which contains entries we need that will not be obtained via
# the ovtopodump command, such as the loghost entry.
# Ensure that no changes are made to the /etc/hosts file directly,
# rather, add them to the /etc/hosts.static file.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.