I suspect we need some input from @jon but looking through the allowed config options for pmacct then interface:
has not been an allowed option since pmacct was intrioduced here (and probable before that).
The only option I could find in the CONFIG-KEYS file was pcap_interface:
That would suggest that the error message has always been there but @jon would need to comment on that.
The info for pcap_interface: says that if it is not defined then the default is take the interface supplied by the Operating System. Maybe IPFire automatically shows green0 as the first interface it supplies so the config file has worked in the past. Although that would mean that if someone put interface: blue0 then pmacct would likely still end up with green0.
Below is a tip I found while looking for a solution to the problem
Hi @zabudskyi , ‘pcap_interface’ is an alias to ‘interface’ and was introduced in 1.7.1 - but you are using 1.7.0. If you prefer to use online / browseable documentation then refer to the 1.7.0 branch: GitHub - pmacct/pmacct at 1.7.0 . In short, change ‘pcap_interface’ to ‘interface’. Paolo
It seems that since version 1.7.1 it appears pcap_interface: instead of interface:
pmacctd-imt.conf.example v 1.7.0
!
! pmacctd configuration example
!
! Did you know CONFIG-KEYS contains the detailed list of all configuration keys
! supported by 'nfacctd' and 'pmacctd' ?
!
! debug: true
interface: eth0
daemonize: true
plugins: memory
aggregate: src_host,dst_host
imt_buckets: 65537
imt_mem_pools_size: 65536
! imt_mem_pools_number: 0
pmacctd-imt.conf.example v 1.7.1
!
! pmacctd configuration example
!
! Did you know CONFIG-KEYS contains the detailed list of all configuration keys
! supported by 'nfacctd' and 'pmacctd' ?
!
! debug: true
pcap_interface: eth0
daemonize: true
plugins: memory
aggregate: src_host,dst_host
imt_buckets: 65537
imt_mem_pools_size: 65536
! imt_mem_pools_number: 0
You can find in message 7 the link to the commit that introduced the KEY change, from the log it seems clear that this was done to introduce multiple interfaces. To me it looks like the pmacct.conf file provided should be updated, therefore I think a bug report is the way to move forward.
@tphz, based on my reading of the documentation, you might find the following information useful. If you want to monitor two different interfaces, you can specify this in your pmacct.conf:
pcap_interfaces_map: /etc/pmacct/interfaces.map
Then, you need to provide the interfaces.map file:
ifname refers to the name of the network interface.
ifindex (optional) provides an alternative way to identify the interface using an index number.
direction defines the direction of the traffic to be monitored, where in corresponds to inbound and out to outbound traffic. If direction is not specified, pmacct captures both inbound and outbound traffic by default.
Obviously, in this case you do not define pcap_interface which is used when you monitor a single interface.
The change was made in 1.7.1 but the first version in IPFire was 1.7.6 so this has been incorrect since the start but as long as you want green0 it looks like it worked with the default interface value.