the map is blank. Error still.

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: the map is blank. Error still.

Post 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)
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
United-Networking
Posts: 12
Joined: Tue Jan 26, 2016 8:20 am

Re: the map is blank. Error still.

Post 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.
--
Regards,
-- Support Guy, United Networking
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: the map is blank. Error still.

Post by scottwilkerson »

Actually, digging into this, it may be the same issue here
https://github.com/NagiosEnterprises/na ... /issues/80
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
United-Networking
Posts: 12
Joined: Tue Jan 26, 2016 8:20 am

Re: the map is blank. Error still.

Post 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.
--
Regards,
-- Support Guy, United Networking
User avatar
Nagios Support
Posts: 36
Joined: Thu Sep 04, 2014 12:16 pm

Re: the map is blank. Error still.

Post 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!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
jfrickson

Re: the map is blank. Error still.

Post 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(&current_authdata);
Right after that line, add one that says

Code: Select all

setlocale(LC_NUMERIC, "C");
and see if that makes a difference.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: the map is blank. Error still.

Post 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?
Former Nagios employee
United-Networking
Posts: 12
Joined: Tue Jan 26, 2016 8:20 am

Re: the map is blank. Error still.

Post 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.
--
Regards,
-- Support Guy, United Networking
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: the map is blank. Error still.

Post 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:
firebugjson.png
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.
Former Nagios employee
United-Networking
Posts: 12
Joined: Tue Jan 26, 2016 8:20 am

Re: the map is blank. Error still.

Post 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.
--
Regards,
-- Support Guy, United Networking
Locked