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

    RRD stops collecting after my WAN IP changes

    Scheduled Pinned Locked Moved General pfSense Questions
    8 Posts 4 Posters 2.0k 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.
    • L Offline
      loupalladino
      last edited by

      Hi Everyone
      About two weeks ago, I upgraded from an RC of 2.1 to the full 2.1 release.  Since then, each time my ISP assigns me a new DHCP address, my RRD Graphs stop collecting data.  The timestamps on the files coincide directly with the IP change.  If I hit "Reset RRD Data", it will fix the problem until the next IP change.

      Thoughts?

      1 Reply Last reply Reply Quote 0
      • C Offline
        csharp2a
        last edited by

        I have the same issue however. Both my LAN and WAN traffic graphs are blank.

        1 Reply Last reply Reply Quote 0
        • C Offline
          csharp2a
          last edited by

          Got it working.  Reset the rrd data and restart the rrd graphing backend.  All found in the rrd settings tab.

          Craig

          1 Reply Last reply Reply Quote 0
          • L Offline
            loupalladino
            last edited by

            Let me know if it breaks again when your IP changes.

            1 Reply Last reply Reply Quote 0
            • N Offline
              NOYB
              last edited by

              I've seen similar problem when IP changes.

              https://forum.pfsense.org/index.php/topic,70749.msg386317.html#msg386317

              1 Reply Last reply Reply Quote 0
              • L Offline
                loupalladino
                last edited by

                I noticed that these two processes [re?]appear after I hit the reset button for RRD graphs:

                root  41842  0.2  0.1  3644  1476  ??  SN    6:24PM  0:00.03 /bin/sh /var/db/rrd/updaterrd.sh
                root  54720  0.2  0.1  1512  776  ??  SN    6:24PM  0:00.00 sleep 60

                I'm guessing that is the script that dies for whatever reason after the IP change and gets "kicked" again after the reset.

                I'll keep poking.

                1 Reply Last reply Reply Quote 0
                • B Offline
                  bryan.paradis
                  last edited by

                  @loupalladino:

                  I noticed that these two processes [re?]appear after I hit the reset button for RRD graphs:

                  root  41842  0.2  0.1  3644  1476  ??  SN    6:24PM  0:00.03 /bin/sh /var/db/rrd/updaterrd.sh
                  root  54720  0.2  0.1  1512  776  ??  SN    6:24PM  0:00.00 sleep 60

                  I'm guessing that is the script that dies for whatever reason after the IP change and gets "kicked" again after the reset.

                  I'll keep poking.

                  
                  if ($_POST['ResetRRD']) {
                  	mwexec('/bin/rm /var/db/rrd/*');
                  	enable_rrd_graphing();
                  	setup_gateways_monitor();
                  	$savemsg = "RRD data has been cleared. New RRD files have been generated.";
                  

                  Something in there is causing it to start working again. The script is always running.

                  /*
                   * We need to force sync VPNs on such even when the IP is the same for dynamic interfaces.
                   * Even with the same IP the VPN software is unhappy with the IP disappearing, and we
                   * could be failing back in which case we need to switch IPs back anyhow.
                   */
                  if (!is_ipaddr($oldip) || $curwanip != $oldip || !is_ipaddrv4($config['interfaces'][$interface]['ipaddr'])) {
                  	/* reconfigure static routes (kernel may have deleted them) */
                  	system_routing_configure($interface);
                  
                  	/* reconfigure our gateway monitor */
                  	setup_gateways_monitor();
                  
                  	file_put_contents("{$g['vardb_path']}/{$interface}_cacheip", $curwanip);
                  
                  	/* perform RFC 2136 DNS update */
                  	services_dnsupdate_process($interface);
                  
                  	/* signal dyndns update */
                  	services_dyndns_configure($interface);
                  
                  	/* reconfigure IPsec tunnels */
                  	vpn_ipsec_force_reload($interface);
                  
                  	/* start OpenVPN server & clients */
                  	if (substr($interface_real, 0, 4) != "ovpn")
                  		openvpn_resync_all($interface);
                  
                  	/* reload graphing functions */
                  	enable_rrd_graphing();
                  
                  	/* reload igmpproxy */
                  	services_igmpproxy_configure();
                  
                  	/* restart snmp */
                  	services_snmpd_configure();
                  
                  

                  Looks like if the new ip isn't = to the old ip it is supposed to run enable_rrd_graphing() so it should be fixing it? Ipv6 or ipv4 ip?

                  Anything in your logs about rrd having problems. What does your log say when your IP changes.

                  1 Reply Last reply Reply Quote 0
                  • L Offline
                    loupalladino
                    last edited by

                    Logs give no indication that anything is wrong with rrd:

                    Jan 25 22:31:58 pfsense ppp: [wan] IFACE: Up event
                    Jan 25 22:31:58 pfsense ppp: [wan] IFACE: Rename interface ng0 to pppoe1
                    Jan 25 22:31:58 pfsense check_reload_status: rc.newwanip starting pppoe1
                    Jan 25 22:32:02 pfsense php: rc.newwanip: rc.newwanip: Informational is starting pppoe1.
                    Jan 25 22:32:02 pfsense php: rc.newwanip: rc.newwanip: on (IP address: x.x.x.x) (interface: wan) (real interface: pppoe1).
                    Jan 25 22:32:02 pfsense php: rc.newwanip: ROUTING: setting default route to x.x.x.x
                    Jan 25 22:32:07 pfsense php: rc.newwanip: Resyncing OpenVPN instances for interface WAN.
                    Jan 25 22:32:07 pfsense php: rc.newwanip: Creating rrd update script
                    Jan 25 22:32:09 pfsense php: rc.newwanip: pfSense package system has detected an ip change x.x.x.x ->  x.x.x.x … Restarting packages.
                    Jan 25 22:32:09 pfsense check_reload_status: Starting packages
                    Jan 25 22:32:09 pfsense check_reload_status: Reloading filter
                    Jan 25 22:32:13 pfsense php: rc.start_packages: Restarting/Starting all packages.
                    Jan 25 22:32:18 pfsense check_reload_status: Syncing firewall
                    Jan 25 22:32:26 pfsense php: rc.start_packages: The command '/usr/local/etc/rc.d/squid.sh stop' returned exit code '1', the output was ''
                    Jan 25 22:32:28 pfsense php: rc.start_packages: You should specify an interface for bandwidthd to listen on. Exiting.
                    Jan 25 22:32:29 pfsense squid[81143]: Squid Parent: child process 81672 started
                    Jan 25 22:32:29 pfsense php: rc.start_packages: The command '/usr/local/etc/rc.d/bandwidthd.sh stop' returned exit code '1', the output was 'No matching processes were found'
                    Jan 25 22:32:29 pfsense php: rc.start_packages: The command '/usr/local/etc/rc.d/bandwidthd.sh stop' returned exit code '1', the output was 'No matching processes were found'
                    Jan 25 22:32:33 pfsense bandwidthd: Opening xl0
                    Jan 25 22:32:33 pfsense bandwidthd: Packet Encoding: Ethernet

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.