Reverse DNS Disabled
-
- Posts: 12
- Joined: Mon Oct 21, 2019 1:28 pm
Reverse DNS Disabled
Hello,
Whenever exporting the list of unique Host to CSV, the column for host name all say <Reverse DNS disabled>.I cant seem to enable this feature and DNS is properly configured
Any help would be greatly appreciated !
Whenever exporting the list of unique Host to CSV, the column for host name all say <Reverse DNS disabled>.I cant seem to enable this feature and DNS is properly configured
Any help would be greatly appreciated !
Re: Reverse DNS Disabled
If you go to Admin > Global Settings, can you switch it to yes, then save, then switch it to no, then save or are you saying that's not working?
What OS/version are you using?
Please PM me a copy of your profile, you can download it from Admin > System Status by clicking the Download System Profile button.
What OS/version are you using?
Please PM me a copy of your profile, you can download it from Admin > System Status by clicking the Download System Profile button.
-
- Posts: 12
- Joined: Mon Oct 21, 2019 1:28 pm
Re: Reverse DNS Disabled
If I change it to yes or no under "Disable Reverse DNS", the exported CSV still says "Reverse DNS Disabled "
Were currently running 2.1.6 and profile has been sent over
Thank you
Were currently running 2.1.6 and profile has been sent over
Thank you
Re: Reverse DNS Disabled
If you grab one of the IP addresses and then run this command from the CLI, what does it output:
Code: Select all
nslookup X.X.X.X
-
- Posts: 12
- Joined: Mon Oct 21, 2019 1:28 pm
Re: Reverse DNS Disabled
So when I first tried it, I had to install bind-utils to have nslookup
Now when I do nslookup X.X.X.X, It responds with the correct hostname. However, the exported CSV of unique host still says <Reverse DNS disabled>
Ive even tried switching it to yes, then switching it back to no under global config.
Now when I do nslookup X.X.X.X, It responds with the correct hostname. However, the exported CSV of unique host still says <Reverse DNS disabled>
Ive even tried switching it to yes, then switching it back to no under global config.
Re: Reverse DNS Disabled
I'm able to reproduce this now, it's a bug.
First, make sure Disable Reverse DNS is set back to yes.
Then edit this file:
Change this code (around line 82):
To this:
Does that resolve it for you?
First, make sure Disable Reverse DNS is set back to yes.
Then edit this file:
Code: Select all
/var/www/html/nagioslogserver/application/controllers/cli/CLI_Reporting.php
Code: Select all
foreach ($sending as $host => $logs) {
$ret .= $host . ',' . dns_reverse_lookup($host, true) . ',' . 1 . ",," . $logs . "\n";
}
foreach ($not_sending as $host => $time) {
$ret .= $host . ',' . dns_reverse_lookup($host, true) . ',' . 0 . ',' . $time . ",\n";
}
Code: Select all
foreach ($sending as $host => $logs) {
$ret .= $host . ',' . dns_reverse_lookup($host) . ',' . 1 . ",," . $logs . "\n";
}
foreach ($not_sending as $host => $time) {
$ret .= $host . ',' . dns_reverse_lookup($host) . ',' . 0 . ',' . $time . ",\n";
}
-
- Posts: 12
- Joined: Mon Oct 21, 2019 1:28 pm
Re: Reverse DNS Disabled
Unfortunately, that did not work for me. When I made the following changes, the CSV no longer has any value in the Hostname field.
Code: Select all
foreach ($sending as $host => $logs) {
$ret .= $host . ',' . dns_reverse_lookup($host) . ',' . 1 . ",," . $logs . "\n";
}
foreach ($not_sending as $host => $time) {
$ret .= $host . ',' . dns_reverse_lookup($host) . ',' . 0 . ',' . $time . ",\n";
}
Re: Reverse DNS Disabled
It would be blank for ones that it's unable to get the DNS entries for. It's not showing for any of them?
If you grab the IP address from one of the hosts not listing anything in the CSV and run this command it returns everything properly?
If you grab the IP address from one of the hosts not listing anything in the CSV and run this command it returns everything properly?
nslookup X.X.X.X
Re: Reverse DNS Disabled
Looks like a bug but probably different than the one we previously thought. I was able to reproduce it and it seems like once the option to disable DNS is enabled it properly disable it. You can disable it by running this from the command line:
Code: Select all
curl -XDELETE http://localhost:9200/nagioslogserver/cf_option/disable_reverse_dns
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 12
- Joined: Mon Oct 21, 2019 1:28 pm
Re: Reverse DNS Disabled
Enabling the Disable DNS followed by the delete command seemed to have worked.
Thank you !
Code: Select all
curl -XDELETE http://localhost:9200/nagioslogserver/cf_option/disable_reverse_dns