• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Monitoring graph > NTP produces error

Scheduled Pinned Locked Moved 2.3.2 Development Snapshots
3 Posts 3 Posters 2.5k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    MikeV7896
    last edited by Jul 16, 2016, 5:06 PM

    When I go to the monitoring graphs, then select "NTP", when I update the graph I get this error:

    Error: SyntaxError: Unexpected token W in JSON at position 1

    Additionally, there's a crash report (I've submitted two over two days, IPs below)

    v4: 73.171.116.x
    v6 WAN: 2001:558:6036:61:x❌x:x

    I don't think it would come from the v6 LAN, but if you can't find from the v6 WAN, let me know and I'll provide the LAN address.

    I did not have this issue with 2.3.1, so not sure if something changed in the RRD data between versions, or if there's a new issue.

    The S in IOT stands for Security

    1 Reply Last reply Reply Quote 0
    • J
      JorgeOliveira
      last edited by Jul 16, 2016, 8:16 PM Jul 16, 2016, 7:59 PM

      Code needs protection around:

      			$obj[$ds_key_right_adjusted]['min'] = min($stats);
      			$obj[$ds_key_right_adjusted]['max'] = max($stats);
      			$obj[$ds_key_right_adjusted]['avg'] = array_sum($stats) / count($stats);
      			$obj[$ds_key_right_adjusted]['values'] = $data;
      			$obj[$ds_key_right_adjusted]['raw'] = $raw_data;
      

      and:

      			$obj[$ds_key_left_adjusted]['min'] = min($stats);
      			$obj[$ds_key_left_adjusted]['max'] = max($stats);
      			$obj[$ds_key_left_adjusted]['avg'] = array_sum($stats) / count($stats);
      			$obj[$ds_key_left_adjusted]['values'] = $data;
      			$obj[$ds_key_left_adjusted]['raw'] = $raw_data;
      

      in /usr/local/www/rrd_fetch_json.php

      A quick workaround would be:

      			if(count($stats)) {
      
      				// the block...
      
      			}
      

      Around blocks at lines 316-320 and 607-611.

      This causes graphs without stats to be blank but gets rid of the nasty crash. I am sure someone could come up with a better fix.

      My views have absolutely no warranty express or implied. Always do your own research.

      1 Reply Last reply Reply Quote 0
      • J
        jdillard
        last edited by Jul 19, 2016, 4:39 PM

        Thanks guys! This is fixed and will be in 2.3.2: https://github.com/pfsense/FreeBSD-ports/commit/4c3d8e6bdef27b5c601954b63f8a165247f77425

        1 Reply Last reply Reply Quote 0
        3 out of 3
        • First post
          3/3
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
          This community forum collects and processes your personal information.
          consent.not_received