Display FQDNs on mouse over

This support forum board is for support questions relating to Nagios Network Analyzer, our network traffic and bandwidth analysis solution.
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Display FQDNs on mouse over

Post by snapon_admin »

We have NNA 2014R1.3 and are looking to utilize DNS look ups for data collected. Where would I go to configure this? Oddly enough, this is already working on some of our hosts, but not on others. I'd rather not attach screens as FQDNs and IPs are shown, but I can PM them to someone if needed.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Display FQDNs on mouse over

Post by lmiltchev »

I have filed an internal feature request already. This has been discussed before - see this post:

http://support.nagios.com/forum/viewtop ... 32&t=24979

You are welcome to also post a feature request on the public tracker here:

http://tracker.nagios.com/
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Display FQDNs on mouse over

Post by snapon_admin »

Oh, ok that's actually even better than what I was requesting. But my problem is actually with the summary page as well. We have a point to point connection between 2 sites, if we look at the summary screen for that connection it shows all the IPs under the top 5 lists. If I hover over the hosts in one location it resolves the FQDN for that host, if I hover over any hosts from the other location however, it does not. It only shows me the IP.

Some details:
The hosts are on different subnets.
One of the locations is in the same data center as our Nagios server. These hosts are the ones NOT displaying FQDNs. The hosts at the other location are working.
We have 4 DNS servers in each location, 2 on windows servers and 2 on unix servers.
I did not set up this VM, as I am not a VMWare admin, so I don't know what was done during setup. What I'm wondering is is there anywhere where I can tell the NNA server which DNS servers to use, and where would that be?
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Display FQDNs on mouse over

Post by lmiltchev »

We will have to do some more digging on that. The Nagios NA developer has left for today, but he should be in tomorrow and will follow up with you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Display FQDNs on mouse over

Post by snapon_admin »

No worries, thanks.
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: Display FQDNs on mouse over

Post by jomann »

The reason you are not seeing a hostname is because PHP may not be able to resolve it using reverse dns.
When you hover over any of the IP addresses it just runs the PHP function gethostbyaddr which from what I understand uses reverse dns lookups to find out the hostname.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Display FQDNs on mouse over

Post by lmiltchev »

snapon_admin, did jomann's response answer your question?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Display FQDNs on mouse over

Post by snapon_admin »

What is that function using as reference for the DNS servers? I believe the issue we're having is that some of our servers use different DNS servers than others. I believe that's why some work and others do not. So yeah, sort of. That answers the question of how it's looking up the hostnames, but we would like for this to work on all hosts.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Display FQDNs on mouse over

Post by lmiltchev »

I may be wrong, but I believe this is the function that you would like to see:

Code: Select all

/**
     * @brief Do a reverse lookup
     */
    function reverse_lookup($ip=NULL)
    {
        if($ip === NULL) {
            $json['error'] = 'No IP specified.';
        }
        else {
            $host = gethostbyaddr($ip);
            
            if(empty($host) === FALSE) {
                $json['hostname'] = $host;
            }
            else {
                $json['hostname'] = $ip;
            }
        }
        
        return $this->do_return($json);
    }
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: Display FQDNs on mouse over

Post by snapon_admin »

Right, that looks like the function, but what DNS servers is it checking for the query? We have multiple DNS servers and this function doesn't appear to be checking all of them since only some hostnames can be resolved.
Locked