I've Searched this site and googled as much as i can but cannot seem to find a solution that works.

I have Nagios core running at home for a monitoring project. the status.dat is converted to a Json file on the web server using a plugin i installed.

the output from this plugin looks like this:

```
  {
  "programStatus": {
    "modified_host_attributes": "0",
    "modified_service_attributes": "0",
    "nagios_pid": "983",
    "daemon_mode": "1",
    "program_start": "1414556165",
    "last_log_rotation": "0",
    "enable_notifications": "1",
    "active_service_checks_enabled": "1",
    "passive_service_checks_enabled": "1",
    "active_host_checks_enabled": "1",
    "passive_host_checks_enabled": "1",
    "enable_event_handlers": "1",
    "obsess_over_services": "0",
    "obsess_over_hosts": "0",
    "check_service_freshness": "1",
    "check_host_freshness": "0",
    "enable_flap_detection": "1",
    "process_performance_data": "0",
    "global_host_event_handler": "",
    "global_service_event_handler": "",
    "next_comment_id": "1",
    "next_downtime_id": "1",
    "next_event_id": "77",
    "next_problem_id": "23",
    "next_notification_id": "304",
    "active_scheduled_host_check_stats": "1,5,5",
    "active_ondemand_host_check_stats": "0,0,0",
    "passive_host_check_stats": "0,0,0",
    "active_scheduled_service_check_stats": "3,11,11",
    "active_ondemand_service_check_stats": "0,0,0",
    "passive_service_check_stats": "0,0,0",
    "cached_host_check_stats": "0,0,0",
    "cached_service_check_stats": "0,0,0",
    "external_command_stats": "0,0,0",
    "parallel_host_check_stats": "1,5,5",
    "serial_host_check_stats": "0,0,0"
  },
  "hosts": {
   "localhost": {
      "host_name": "localhost",
      "modified_attributes": "0",
      "check_command": "check-host-alive",
      "check_period": "24x7",
      "notification_period": "workhours",
      "check_interval": "5.000000",
      "retry_interval": "1.000000",
      "event_handler": "",
      "has_been_checked": "1",
      "should_be_scheduled": "1",
      "check_execution_time": "4.007",
      "check_latency": "1.279",
      "check_type": "0",
      "current_state": "0",
      "last_hard_state": "0",
      "last_event_id": "0",
      "current_event_id": "0",
      "current_problem_id": "0",
      "last_problem_id": "0",
      "plugin_output": "PING OK - Packet loss = 0%, RTA = 0.08 ms",
      "long_plugin_output": "",
      "performance_data": "rta=0.076000ms;3000.000000;5000.000000;0.000000 pl=0%;80;100;0",
      "last_check": "1414556166",
      "next_check": "1414556470",
      "check_options": "0",
      "current_attempt": "1",
      "max_attempts": "10",
      "state_type": "1",
      "last_state_change": "1411951605",
      "last_hard_state_change": "1411951605",
      "last_time_up": "1414556170",
      "last_time_down": "0",
      "last_time_unreachable": "0",
      "last_notification": "0",
      "next_notification": "0",
      "no_more_notifications": "0",
      "current_notification_number": "0",
      "current_notification_id": "0",
      "notifications_enabled": "1",
      "problem_has_been_acknowledged": "0",
      "acknowledgement_type": "0",
      "active_checks_enabled": "1",
      "passive_checks_enabled": "1",
      "event_handler_enabled": "1",
      "flap_detection_enabled": "1",
      "process_performance_data": "1",
      "obsess": "1",
      "last_update": "1414556456",
      "is_flapping": "0",
      "percent_state_change": "0.00",
      "scheduled_downtime_depth": "0"
   },
   "test-vm": {
      "host_name": "test-vm",
      "modified_attributes": "0",
      "check_command": "check-host-alive",
      "check_period": "24x7",
      "notification_period": "workhours",
      "check_interval": "5.000000",
      "retry_interval": "1.000000",
      "event_handler": "",
      "has_been_checked": "1",
      "should_be_scheduled": "1",
      "check_execution_time": "3.001",
      "check_latency": "0.000",
      "check_type": "0",
      "current_state": "1",
      "last_hard_state": "1",
      "last_event_id": "70",
      "current_event_id": "72",
      "current_problem_id": "19",
      "last_problem_id": "10",
      "plugin_output": "CRITICAL - Host Unreachable (192.168.56.4)",
      "long_plugin_output": "",
      "performance_data": "",
      "last_check": "1414556437",
      "next_check": "1414556740",
      "check_options": "0",
      "current_attempt": "1",
      "max_attempts": "10",
      "state_type": "1",
      "last_state_change": "1413873683",
      "last_hard_state_change": "1413873683",
      "last_time_up": "1413873142",
      "last_time_down": "1414556440",
      "last_time_unreachable": "0",
      "last_notification": "1414556268",
      "next_notification": "1414563468",
      "no_more_notifications": "0",
      "current_notification_number": "2",
      "current_notification_id": "301",
      "notifications_enabled": "1",
      "problem_has_been_acknowledged": "0",
      "acknowledgement_type": "0",
      "active_checks_enabled": "1",
      "passive_checks_enabled": "1",
      "event_handler_enabled": "1",
      "flap_detection_enabled": "1",
      "process_performance_data": "1",
      "obsess": "1",
      "last_update": "1414556456",
      "is_flapping": "0",
      "percent_state_change": "0.00",
      "scheduled_downtime_depth": "0"
   },
   "winserver": {
      "host_name": "winserver",
      "modified_attributes": "0",
      "check_command": "check-host-alive",
      "check_period": "24x7",
      "notification_period": "24x7",
      "check_interval": "5.000000",
      "retry_interval": "1.000000",
      "event_handler": "",
      "has_been_checked": "1",
      "should_be_scheduled": "1",
      "check_execution_time": "4.004",
      "check_latency": "0.000",
      "check_type": "0",
      "current_state": "0",
      "last_hard_state": "0",
      "last_event_id": "75",
      "current_event_id": "76",
      "current_problem_id": "0",
      "last_problem_id": "20",
      "plugin_output": "PING OK - Packet loss = 0%, RTA = 0.44 ms",
      "long_plugin_output": "",
      "performance_data": "rta=0.438000ms;3000.000000;5000.000000;0.000000 pl=0%;80;100;0",
      "last_check": "1414556380",
      "next_check": "1414556684",
      "check_options": "0",
      "current_attempt": "1",
      "max_attempts": "10",
      "state_type": "1",
      "last_state_change": "1414556303",
      "last_hard_state_change": "1414556303",
      "last_time_up": "1414556384",
      "last_time_down": "1414556303",
      "last_time_unreachable": "0",
      "last_notification": "1414556303",
      "next_notification": "1414558103",
      "no_more_notifications": "0",
      "current_notification_number": "0",
      "current_notification_id": "302",
      "notifications_enabled": "1",
      "problem_has_been_acknowledged": "0",
      "acknowledgement_type": "0",
      "active_checks_enabled": "1",
      "passive_checks_enabled": "1",
      "event_handler_enabled": "1",
      "flap_detection_enabled": "1",
      "process_performance_data": "1",
      "obsess": "1",
      "last_update": "1414556456",
      "is_flapping": "0",
      "percent_state_change": "5.99",
      "scheduled_downtime_depth": "0"
   }
  },

```

and goes on forever with host infomation.

now ive managed to parse this using rainmeter web parser and a regex helper called rainregex quite easily.

what i would like to do is use this information on a web page.

i've tried doing jquery:

```
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"> </script>

<script>
$.getJSON("http://<serverIP>/nagios/statusJson.php", function( data){ 
 var items = [];
$.each( data, function( key, val ) {
items.push( "<li id='" + key + "'>" + val + "</li>" );
});

 $( "<ul/>", {
"class": "my-new-list",
html: items.join( "" )
}).appendTo( "body" );
});
</script>

        </script>

```

but i couldn't get it to pull the information from the php file.

im not sure what im doing wrong here.