Google Map v1.5 Bug

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

Google Map v1.5 Bug

Post by TBT »

Using Google Map v1.5, Get Geocode For An Address returns error "Geocode was not successful for the following reason: REQUEST_DENIED".

Please advise.
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Google Map v1.5 Bug

Post by lmiltchev »

Are you seeing this error when entering any address or a specific one? Do you see this error in all browsers (IE, FF, Chrome, etc.)? Are you using a SSL or a proxy?

Do you see any errors in the apache error log?

Code: Select all

tail -100 /var/log/httpd/error_log
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Google Map v1.5 Bug

Post by lmiltchev »

One more thing - do you need to use an API key for commercial use? If you do, try adding the URL in the "/usr/local/nagiosxi/html/includes/components/googlemap/map.php", replacing the text in red:
<!--Replace below line with google's premier client ID script for appropriate commercial use-->
<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=true"></script>
<script type="text/javascript">
Let us know if this fixed your issue. Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

Re: Google Map v1.5 Bug

Post by TBT »

lmiltchev wrote:Are you seeing this error when entering any address or a specific one? Do you see this error in all browsers (IE, FF, Chrome, etc.)? Are you using a SSL or a proxy?

Do you see any errors in the apache error log?

Code: Select all

tail -100 /var/log/httpd/error_log
With further testing "Minneapolis, MN" or "Duluth, MN" work, but Canadian locations "Thunder Bay, ON" or "Toronto, ON" do not. Tested in current version of FF and Chrome. Using SSL.

Errors on page load/auto refresh:
[Thu Nov 10 14:01:31 2016] [error] [client 10.2.26.252] PHP Warning: Cannot modify header information - headers already sent by (output started at /usr/local/nagiosxi/html/includes/pageparts.inc.php:263) in /usr/local/nagiosxi/html/includes/utils.inc.php on line 158, referer: https://monitor-dev.domain.com/nagiosxi/
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
bheden
Product Development Manager
Posts: 179
Joined: Thu Feb 13, 2014 9:50 am
Location: Nagios Enterprises

Re: Google Map v1.5 Bug

Post by bheden »

Go here: https://developers.google.com/maps/docu ... et-api-key to obtain an API Key for your googlemaps component.

It should direct you to https://developers.google.com/maps/docu ... pi-key#key (If you're going to use the standard plan).

Then click 'GET A KEY'.

Follow the directions, and then change this line of map.php in the googlemap component directory:

Code: Select all

<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script>
With this:

Code: Select all

<script type="text/javascript" src="https://maps.google.com/maps/api/js?key=[YOURAPIKEY]"></script>
I suspect this will clear up the issues you're having.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Nagios Enterprises
Senior Developer
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

Re: Google Map v1.5 Bug

Post by TBT »

Thank you, this has corrected the issue.
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

Re: Google Map v1.5 Bug

Post by TBT »

The on load error still exists in the logs though.
[Thu Nov 10 14:56:54 2016] [error] [client 10.2.26.252] PHP Warning: Cannot modify header information - headers already sent by (output started at /usr/local/nagiosxi/html/includes/pageparts.inc.php:263) in /usr/local/nagiosxi/html/includes/utils.inc.php on line 105, referer: https://monitor-dev.domain.com/nagiosxi/
[Thu Nov 10 14:56:54 2016] [error] [client 10.2.26.252] PHP Warning: Cannot modify header information - headers already sent by (output started at /usr/local/nagiosxi/html/includes/pageparts.inc.php:263) in /usr/local/nagiosxi/html/includes/utils.inc.php on line 157, referer: https://monitor-dev.domain.com/nagiosxi/
[Thu Nov 10 14:56:54 2016] [error] [client 10.2.26.252] PHP Warning: Cannot modify header information - headers already sent by (output started at /usr/local/nagiosxi/html/includes/pageparts.inc.php:263) in /usr/local/nagiosxi/html/includes/utils.inc.php on line 158, referer: https://monitor-dev.domain.com/nagiosxi/
Last edited by TBT on Thu Nov 10, 2016 3:30 pm, edited 1 time in total.
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
bheden
Product Development Manager
Posts: 179
Joined: Thu Feb 13, 2014 9:50 am
Location: Nagios Enterprises

Re: Google Map v1.5 Bug

Post by bheden »

I'll look into this and get it fixed for the next version. Also, I'll make sure there is some easy to use mechanism for applying the API Key from google.

Thanks!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Nagios Enterprises
Senior Developer
Locked