Network graphs error

I hope this is the right category under which to post this.

I’ve (temporarily) changed my IPFire to using a USB mobile router (PPP QMI) to connect to the internet. I have no Network (external) graphs although the other graphs are OK.

The error being logged is
Error in RRD::graph for ppp0: opening '/var/log/rrd/collectd/localhost/interface /if_octets-ppp0.rrd': No such file or directory (netexternal.cgi, ppp0, day)

Looking at that directory:

# ls -lst /var/log/rrd/collectd/localhost/interface/
total 3040
304 -rw-r--r-- 1 root root 307712 May 26 14:20 if_octets-ifb0.rrd
304 -rw-r--r-- 1 root root 307712 May 26 14:20 if_octets-tun0.rrd
304 -rw-r--r-- 1 root root 307712 May 26 14:20 if_octets-eth1.rrd
304 -rw-r--r-- 1 root root 307712 May 26 14:20 if_octets-green0.rrd
304 -rw-r--r-- 1 root root 307712 May 26 14:20 if_octets-orange0.rrd
304 -rw-r--r-- 1 root root 307712 May 26 14:20 if_octets-red0.rrd
304 -rw-r--r-- 1 root root 307712 May 26 14:20 if_octets-ifb1.rrd
304 -rw-r--r-- 1 root root 307712 May 26 14:20 if_octets-imq0.rrd
304 -rw-r--r-- 1 root root 307712 May 20 19:31 if_octets-usb0.rrd
304 -rw-r--r-- 1 root root 307712 May 14 23:36 if_octets-dummy5.rrd

which means, I think, the data is being logged into if_octets-ifb0.rrd as this is the most recently updated file.

Is there something I should edit to fix this?

I made the switch from “normal” ethernet red to ppp using setup. Does this have a bug?

I would try this.

1 Like

Thanks @hvacguy I’ve just tried that … and no change. It’s still looking in the wrong place for the info (looking for /var/log/rrd/collectd/localhost/interface/if_octets-ppp0.rrd which doesn’t exist.

# ls -lhst /var/log/rrd/collectd/localhost/interface
total 2.4M
304K -rw-r--r-- 1 root root 301K May 27 07:32 if_octets-eth1.rrd
304K -rw-r--r-- 1 root root 301K May 27 07:32 if_octets-ifb1.rrd
304K -rw-r--r-- 1 root root 301K May 27 07:32 if_octets-imq0.rrd
304K -rw-r--r-- 1 root root 301K May 27 07:32 if_octets-orange0.rrd
304K -rw-r--r-- 1 root root 301K May 27 07:32 if_octets-red0.rrd
304K -rw-r--r-- 1 root root 301K May 27 07:32 if_octets-tun0.rrd
304K -rw-r--r-- 1 root root 301K May 27 07:31 if_octets-green0.rrd
304K -rw-r--r-- 1 root root 301K May 27 07:31 if_octets-ifb0.rrd

No ppp0 interface:

# ip -br -N a s
lo               UNKNOWN        127.0.0.1/8 
orange0          UP             192.168.Z.B/24 
eth1             DOWN           
red0             UNKNOWN        192.168.X.C/24 
green0           UP             192.168.Y.B/24 
ifb0             DOWN           
ifb1             DOWN           
imq0             UNKNOWN        
tun0             UNKNOWN        192.168.A.D peer 192.168.A.E/32 

settings:

# cat /var/ipfire/ethernet/settings
CONFIG_TYPE=2
RED_DEV=red0
RED_MACADDR=<<something>>
RED_DESCRIPTION='"usb: TP-Link M7350 4G Mi-Fi Router"'
RED_DRIVER=rndis_host
GREEN_DEV=green0
GREEN_MACADDR=<<something>>
GREEN_DESCRIPTION='"pci: Intel Corporation 82566DM-2 Gigabit Network Connection (rev 02)"'
GREEN_DRIVER=e1000e
<<IP address details>>
RED_DHCP_HOSTNAME=hastings
RED_DHCP_FORCE_MTU=1452
RED_ADDRESS=0.0.0.0
RED_NETMASK=0.0.0.0
RED_TYPE=PPPOE
RED_NETADDRESS=0.0.0.0
RED_BROADCAST=192.168.0.255
DEFAULT_GATEWAY=0.0.0.0
ORANGE_DEV=orange0
ORANGE_MACADDR=<<something>>
ORANGE_DESCRIPTION='"pci: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)"'
ORANGE_DRIVER=r8169
<<IP address details>>

OK. Having checked on the box, the network metrics are being collected into /var/log/rrd/collectd/localhost/interface/if_octets-red0.rrd - rrdtool info is showing values for the most recent lines…

The defect looks to be in /srv/web/ipfire/cgi-bin/netexternal.cgi in the lines

if ($netsettings{'RED_TYPE'} ne 'PPPOE'){
        if ($netsettings{'RED_DEV'} ne $netsettings{'GREEN_DEV'}){
                push (@graphs, ($netsettings{'RED_DEV'}));
        }
}else{
        push (@graphs, "ppp0");
}

should I just add a check for RED_DRIVER eq 'rndis_host' ? Or the existence of /sys/class/net/ppp0 ?

Any advice welcome.

OK. That didn’t work - resulted in a 500 error, presumably because the graphs aren’t being built … so the same check is being made in the software elsewhere.

Where are these graph databases / tables populated?

… or is the error that I have a red0 interface device instead of a ppp0 i/f device?