Ip address is used instead of FQDN

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
saber
Posts: 41
Joined: Wed Sep 14, 2016 4:32 pm

Ip address is used instead of FQDN

Post by saber »

Hi,

Since we upgraded to 2.1.0 , there is a widget called "Total Disk Usage" on homepage. However, it's called using the server ip address instead of FQDN. Thus, Chrome reports an SSL mismatch.. and we get a white blank box instead of the "Total Disk Usage".

Thanks.
Saber
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Ip address is used instead of FQDN

Post by cdienger »

Please provide a bit more information so we can better understand the issue. We may need to make changes on our end going forward and need to understand exactly what you're running into.

Is this only happening on Chrome? Are you running into https://support.google.com/chrome/a/ans ... 1219?hl=en ? What is set for the certificate's common name and subjectAlternativeName ?

That said, you can configure it to use the hostname instead by editing line 105 of /var/www/html/nagioslogserver/application/views/home.php from:

Code: Select all

address = nodes[i]['address'];
to:

Code: Select all

address = nodes[i]['hostname'];
A similar change needs to be made to line 51 of /var/www/html/nagioslogserver/application/views/admin/ncpa.php so that it looks like:

Code: Select all

<option value="<?php echo $node['hostname']; ?>">
and also line 29 of /var/www/html/nagioslogserver/application/views/admin/system_status.php:

Code: Select all

<option value="<?php echo $node['hostname']; ?>">
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
saber
Posts: 41
Joined: Wed Sep 14, 2016 4:32 pm

Re: Ip address is used instead of FQDN

Post by saber »

Before 2.1.0 , there were no "Total Disk Usage" widget.

Now, this specific javascript file is being loaded directly from the ip address instead of the domain. Exemple, visit "XXX.domain.com" , then check source code and you will see a javascript file trying to load from the server ip address instead of "XXX.domain.com" and thus the SSL error. Our cert is valid for the domain only which is absolutely normal and never had any issue before 2.1.0.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Ip address is used instead of FQDN

Post by cdienger »

Thanks for the extra info. Has changing the home.php allowed it to load? Additionally, check that there is a "run_index_usage" job under Admin > System > Command Subsystem. Use the "Reset All Jobs" button to create it if isn't listed.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
saber
Posts: 41
Joined: Wed Sep 14, 2016 4:32 pm

Re: Ip address is used instead of FQDN

Post by saber »

Hi,

Editing "/var/www/html/nagioslogserver/application/views/home.php" did the trick, thanks.

Please include the fix in the new versions.

Thanks,
Saber
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Ip address is used instead of FQDN

Post by mbellerue »

We will get the fix in. Thank you for helping us track it down. Closing thread.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked