Page 2 of 3
Re: the map is blank. Error still.
Posted: Mon Apr 11, 2016 4:20 pm
by scottwilkerson
Once thing out of curiosity, do you have icon_image's defined in the config for your hosts?
I ask because there was a bug that would error the map if there were missing image icons (i.e. they were defined but could not be loaded)
Re: the map is blank. Error still.
Posted: Tue Apr 12, 2016 2:34 am
by United-Networking
Hi,
checked just now to be sure: No.
Used to have two with service definitions, but that's only in backup now, thus unused.
Re: the map is blank. Error still.
Posted: Tue Apr 12, 2016 2:13 pm
by scottwilkerson
Actually, digging into this, it may be the same issue here
https://github.com/NagiosEnterprises/na ... /issues/80
Re: the map is blank. Error still.
Posted: Wed Apr 13, 2016 2:55 am
by United-Networking
Hi,
well, no; apparently in that case at least the nagios host is displayed, whereas with zurrachillo and us, the map displays completely void of any host.
Re: the map is blank. Error still.
Posted: Wed Apr 13, 2016 5:09 pm
by Nagios Support
We will have to do some more digging into this, and try to recreate the issue in-house. We will get back to you within the next 24 hours. Thank you!
Re: the map is blank. Error still.
Posted: Thu Apr 14, 2016 1:37 pm
by jfrickson
United-Networking wrote:Oh yeah, that probably hit pay dirt!
Got an error after "GET map-popup.html":
Code: Select all
Error: JSON.parse: expected double-quoted property name at line 33 column 29 of the JSON data
That line looks familiar. I think I saw that when I was digging into a problem that turned out to be locale related.
Go into
cgi/objectjson.c and
cgi/statusjson.c in function
main. On or near line 730 in
objectjson.c and line 965 in
statusjson.c, there should be a line that says
Code: Select all
get_authentication_information(¤t_authdata);
Right after that line, add one that says
and see if that makes a difference.
Re: the map is blank. Error still.
Posted: Thu Apr 14, 2016 1:40 pm
by tmcdonald
To add on, you will need to make these edits and then recompile Core - is this something you can handle or would you like assistance?
Re: the map is blank. Error still.
Posted: Fri Apr 15, 2016 4:30 am
by United-Networking
Hi,
since i'll have no acess to the nagios host until 5h from now:
I have found another PC where the map still works: Windows7 with Firefox39, german installation.
Also, i recently had changed the nagios hosts locale to en_US.UTF8 without any perceptible change in the map's behavior.
Therefore i doubt seriously that this extra locale setting in the source will solve it. Are you really sure that i should replace (that's what make install does, anyway) my mostly working setup for that?
I'm still strongly suspecting that javascript code (angular.min.js or map-directive.js from the error log) actually drawing the map, since in some client setups this exact same code still works, in others not; mostly differentiated by browser make and version.
Re: the map is blank. Error still.
Posted: Fri Apr 15, 2016 2:06 pm
by tmcdonald
Load up that page in Firefox (using one of the non-functioning browsers) and bring up Firebug/Developer Console (I am using Firebug in my example, adjust as needed for your tool of choice) and view the "Net" panel to get the request/response pairs that the page makes. Take a look at the "Response" tab for one of the requests to statusjson.cgi. Mine looked like this:
I'd like a copy of the JSON from your page, either in a PM or as an attachment. I suspect that there are single quotes where doubles are needed, and certain browsers/versions are less strict about this, which renders the map properly.
Re: the map is blank. Error still.
Posted: Mon Apr 18, 2016 7:13 am
by United-Networking
The first
results in
Code: Select all
{
"format_version": 0,
"result": {
"query_time": 1460981192000,
"cgi": "statusjson.cgi",
"user": "nagiosadmin",
"query": "programstatus",
"query_status": "released",
"program_start": 1460736310000,
"last_data_update": 1460981189000,
"type_code": 0,
"type_text": "Success",
"message": ""
},
"data": {
"programstatus": {
"version": "4.1.1",
"nagios_pid": 1254,
"daemon_mode": false,
"program_start": 1460736310000,
"last_log_rotation": 1460930399000,
"enable_notifications": true,
"execute_service_checks": true,
"accept_passive_service_checks": true,
"execute_host_checks": true,
"accept_passive_host_checks": true,
"enable_event_handlers": true,
"obsess_over_services": false,
"obsess_over_hosts": false,
"check_service_freshness": true,
"check_host_freshness": false,
"enable_flap_detection": true,
"process_performance_data": true
}
}
}
, the second
in
Code: Select all
{
"format_version": 0,
"result": {
"query_time": 1460981192000,
"cgi": "statusjson.cgi",
"user": "nagiosadmin",
"query": "programstatus",
"query_status": "released",
"program_start": 1460736310000,
"last_data_update": 1460981189000,
"type_code": 0,
"type_text": "Success",
"message": ""
},
"data": {
"programstatus": {
"version": "4.1.1",
"nagios_pid": 1254,
"daemon_mode": false,
"program_start": 1460736310000,
"last_log_rotation": 1460930399000,
"enable_notifications": true,
"execute_service_checks": true,
"accept_passive_service_checks": true,
"execute_host_checks": true,
"accept_passive_host_checks": true,
"enable_event_handlers": true,
"obsess_over_services": false,
"obsess_over_hosts": false,
"check_service_freshness": true,
"check_host_freshness": false,
"enable_flap_detection": true,
"process_performance_data": true
}
}
}
.
Actually, this looks quite identical to me.