# Pmacct - "Unknown key: interface" , "no such column: vlan\_in"

**URL:** <https://community.ipfire.org/t/pmacct-unknown-key-interface-no-such-column-vlan-in/9947>\
**Category:** Monitoring\
**Created:** [25 June 2023 12:51 UTC](https://community.ipfire.org/t/pmacct-unknown-key-interface-no-such-column-vlan-in/9947 "2023-06-25T12:51:01Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![tphz](https://community.ipfire.org/user_avatar/community.ipfire.org/tphz/32/16551_2.png) [@tphz](https://community.ipfire.org/u/tphz)\
**Post date:** [25 June 2023 12:51 UTC](https://community.ipfire.org/t/pmacct-unknown-key-interface-no-such-column-vlan-in/9947/1 "2023-06-25T12:51:01Z")

</div>

I am trying to configure pmacct but after installation I get the following error.

```auto
WARN: [/etc/pmacct/pmacct.conf:9] Unknown key: interface. Ignored.

```

After reboot

![obraz](https://community.ipfire.org/uploads/default/original/2X/0/019fc4b978eb0008e63f64cb3b4b648b3de33e5b.png)

and after command `/etc/init.d/pmacct restart`

![obraz](https://community.ipfire.org/uploads/default/original/2X/7/7710cd820b85d69e94cfdc6a5b61250946f8b21e.png)

The contents of the pmacct.conf file.

```auto
!
! Pmacctd configuration file for IPFire environment
!

syslog: daemon
daemonize: true
debug: false
promisc: true
interface: green0

!
! "plugin1" plugin configuration
!
plugins: memory[plugin1]

plugin_buffer_size[plugin1]: 102400
plugin_pipe_size[plugin1]: 10240000

imt_mem_pools_number: 256
imt_path[plugin1]: /var/spool/pmacct/plugin1.pipe

aggregate[plugin1]: src_host, src_port, src_mac, dst_host, dst_port, dst_mac, proto
aggregate_filter[plugin1]: ip

```

IPFire 2.27 (x86\_64) - Core-Update 175

Best

---

<div class="post-metadata">

**Author:** ![cfusco](https://community.ipfire.org/user_avatar/community.ipfire.org/cfusco/32/9213_2.png) [@cfusco](https://community.ipfire.org/u/cfusco)\
**Post date:** [25 June 2023 14:10 UTC](https://community.ipfire.org/t/pmacct-unknown-key-interface-no-such-column-vlan-in/9947/2 "2023-06-25T14:10:01Z")

</div>

> [@tphz](#):
>
> ```auto
> interface: green0
> 
> ```

as far as I can see, this not a [key.](https://github.com/pmacct/pmacct/blob/master/CONFIG-KEYS)

---

<div class="post-metadata">

**Author:** ![bonnietwin](https://community.ipfire.org/user_avatar/community.ipfire.org/bonnietwin/32/12350_2.png) [@bonnietwin](https://community.ipfire.org/u/bonnietwin)\
**Post date:** [25 June 2023 14:11 UTC](https://community.ipfire.org/t/pmacct-unknown-key-interface-no-such-column-vlan-in/9947/3 "2023-06-25T14:11:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![cfusco](https://community.ipfire.org/user_avatar/community.ipfire.org/cfusco/32/9213_2.png) [@cfusco](https://community.ipfire.org/u/cfusco)\
**Post date:** [25 June 2023 14:16 UTC](https://community.ipfire.org/t/pmacct-unknown-key-interface-no-such-column-vlan-in/9947/4 "2023-06-25T14:16:51Z")

</div>

> [@bonnietwin](#):
>
> That would suggest that the error message has always been there but @jon would need to comment on that.

If that’s true, the [text in the wiki](https://wiki.ipfire.org/addons/pmacct#notes) needs to be changed.

---

<div class="post-metadata">

**Author:** ![bonnietwin](https://community.ipfire.org/user_avatar/community.ipfire.org/bonnietwin/32/12350_2.png) [@bonnietwin](https://community.ipfire.org/u/bonnietwin)\
**Post date:** [25 June 2023 14:31 UTC](https://community.ipfire.org/t/pmacct-unknown-key-interface-no-such-column-vlan-in/9947/5 "2023-06-25T14:31:05Z")

</div>

Also the default pmacct.conf file that is provided.

That is why it needs @jon input as he developed this originally and will know where the interface: command came from.

---

<div class="post-metadata">

**Author:** ![tphz](https://community.ipfire.org/user_avatar/community.ipfire.org/tphz/32/16551_2.png) [@tphz](https://community.ipfire.org/u/tphz)\
**Post date:** [25 June 2023 14:48 UTC](https://community.ipfire.org/t/pmacct-unknown-key-interface-no-such-column-vlan-in/9947/6 "2023-06-25T14:48:18Z")

</div>

Thank you very much for your quick responses.

Below is a tip I found while looking for a solution to the problem

> Hi [@zabudskyi](https://github.com/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](https://github.com/pmacct/pmacct/tree/1.7.0) . In short, change ‘pcap\_interface’ to ‘interface’. Paolo

> <https://github.com/pmacct/pmacct/issues/194#issuecomment-385371835>
>
> I'm in frustration. What can be wrong?
> \`cat /etc/pmacct/pmacctd.conf\`
> \`\`\`
> deb…ug: true
> daemonize: true
> logfile: /var/log/pmacctd.log
> pcap\_interface: em1
> plugins: sfprobe 
> sampling\_rate: 20
> sfprobe\_agentsubid: 1402
> sfprobe\_receiver: 127.0.0.1:6343
> \`\`\`
> \`pmacctd -f /etc/pmacct/pmacctd.conf \`
> \`\`\`
> WARN: \[/etc/pmacct/pmacctd.conf:4\] Unknown key: pcap\_interface. Ignored.
> WARN ( default/core ): debug is enabled; forking in background. Logging to standard error (stderr) will get lost.
> \`\`\`
> \`\`\`
> pmacctd -V
> Promiscuous Mode Accounting Daemon, pmacctd 1.7.0 (20170924-00+c1)
> 
> Arguments:
> '--prefix=/usr' '--sysconfdir=/etc' '--localstatedir=/var' '--enable-debug' '--enable-jansson' '--enable-l2' '--enable-ipv6' '--enable-64bit' '--enable-threads' '--enable-traffic-bins' '--enable-bgp-bins' '--enable-bmp-bins' '--enable-st-bins'
> 
> Libs:
> libpcap version 1.8.1
> jansson 2.9
> 
> System:
> Linux 4.2.0-42-generic #49~14.04.1-Ubuntu SMP Wed Jun 29 20:22:11 UTC 2016 x86\_64
> \`\`\`

It seems that since version 1.7.1 it appears `pcap_interface:` instead of `interface:`

* * *

`pmacctd-imt.conf.example v 1.7.0`

```auto
!
! 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`

```auto
!
! 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

```

---

<div class="post-metadata">

**Author:** ![cfusco](https://community.ipfire.org/user_avatar/community.ipfire.org/cfusco/32/9213_2.png) [@cfusco](https://community.ipfire.org/u/cfusco)\
**Post date:** [25 June 2023 14:48 UTC](https://community.ipfire.org/t/pmacct-unknown-key-interface-no-such-column-vlan-in/9947/7 "2023-06-25T14:48:47Z")

</div>

> [@bonnietwin](#):
>
> That is why it needs @jon input as he developed this originally and will know where the interface: command came from.

This is the [commit](https://github.com/pmacct/pmacct/commit/799aa4a7552b78162bbbb295b1c6fb9be374469c) that changed the key, this was done to support multiple interfaces.

---

<div class="post-metadata">

**Author:** ![cfusco](https://community.ipfire.org/user_avatar/community.ipfire.org/cfusco/32/9213_2.png) [@cfusco](https://community.ipfire.org/u/cfusco)\
**Post date:** [25 June 2023 14:56 UTC](https://community.ipfire.org/t/pmacct-unknown-key-interface-no-such-column-vlan-in/9947/8 "2023-06-25T14:56:21Z")

</div>

> [@tphz](#):
>
> pmacctd-imt.conf.example v 1.7.1

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.

@bonnietwin do you agree?

---

<div class="post-metadata">

**Author:** ![tphz](https://community.ipfire.org/user_avatar/community.ipfire.org/tphz/32/16551_2.png) [@tphz](https://community.ipfire.org/u/tphz)\
**Post date:** [25 June 2023 14:57 UTC](https://community.ipfire.org/t/pmacct-unknown-key-interface-no-such-column-vlan-in/9947/9 "2023-06-25T14:57:23Z")

</div>

After changing to `pcap_interface: green0`, the message does not appear.

![obraz](https://community.ipfire.org/uploads/default/original/2X/1/19e1584408a2a4f9dac2fe6b99be5bec3aac6459.png)

The rest in @Jon’s hands 😉  
and the other Developers.

Best Regards

---

<div class="post-metadata">

**Author:** ![tphz](https://community.ipfire.org/user_avatar/community.ipfire.org/tphz/32/16551_2.png) [@tphz](https://community.ipfire.org/u/tphz)\
**Post date:** [25 June 2023 15:27 UTC](https://community.ipfire.org/t/pmacct-unknown-key-interface-no-such-column-vlan-in/9947/10 "2023-06-25T15:27:01Z")

</div>

I reported the error, I hope correctly

[https://bugzilla.ipfire.org/show\_bug.cgi?id=13159](https://bugzilla.ipfire.org/show_bug.cgi?id=13159)

---

<div class="post-metadata">

**Author:** ![cfusco](https://community.ipfire.org/user_avatar/community.ipfire.org/cfusco/32/9213_2.png) [@cfusco](https://community.ipfire.org/u/cfusco)\
**Post date:** [25 June 2023 15:32 UTC](https://community.ipfire.org/t/pmacct-unknown-key-interface-no-such-column-vlan-in/9947/11 "2023-06-25T15:32:57Z")

</div>

@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`:

```bash
pcap_interfaces_map: /etc/pmacct/interfaces.map

```

Then, you need to provide the `interfaces.map` file:

```bash
ifname=green0 ifindex=100 direction=in
ifname=blue0 ifindex=101 direction=in

```

In this configuration:

- `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.

---

<div class="post-metadata">

**Author:** ![cfusco](https://community.ipfire.org/user_avatar/community.ipfire.org/cfusco/32/9213_2.png) [@cfusco](https://community.ipfire.org/u/cfusco)\
**Post date:** [25 June 2023 15:47 UTC](https://community.ipfire.org/t/pmacct-unknown-key-interface-no-such-column-vlan-in/9947/12 "2023-06-25T15:47:04Z")

</div>

@tphz I hope you do not mind that I wrote in your bug report a summary of the discussion. I think this is better for the developers.

---

<div class="post-metadata">

**Author:** ![bonnietwin](https://community.ipfire.org/user_avatar/community.ipfire.org/bonnietwin/32/12350_2.png) [@bonnietwin](https://community.ipfire.org/u/bonnietwin)\
**Post date:** [25 June 2023 16:58 UTC](https://community.ipfire.org/t/pmacct-unknown-key-interface-no-such-column-vlan-in/9947/13 "2023-06-25T16:58:24Z")

</div>

> [@cfusco](#):
>
> 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.
> 
> @bonnietwin do you agree?

Yes that looks the best way to go.

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.

---

<div class="post-metadata">

**Author:** ![jon](https://community.ipfire.org/user_avatar/community.ipfire.org/jon/32/15363_2.png) [@jon](https://community.ipfire.org/u/jon)\
**Post date:** [25 June 2023 17:41 UTC](https://community.ipfire.org/t/pmacct-unknown-key-interface-no-such-column-vlan-in/9947/14 "2023-06-25T17:41:30Z")

</div>

my errors are very different. I have no errors in the config file. But I do have lots of these errors:

```auto
Jun 13 22:45:01 ipfire pmacctd[4485]: INFO ( plugin3/sqlite3 ): ***Purging cache - START (PID: 4485)*** 
Jun 13 22:45:01 ipfire pmacctd[4485]: ERROR ( plugin3/sqlite3 ): no such column: vlan_in  
Jun 13 22:45:02 ipfire last message repeated 327 times
Jun 13 22:45:02 ipfire pmacctd[4485]: INFO ( plugin3/sqlite3 ): ***Purging cache - END (PID: 4485, QN: 0/328, ET: 1)*** 

```

And `vlan_in` is not a column I have or use.

Time to escalate to Erik @ummeegge !

* * *

**EDIT** :

```auto
[**root@ipfire** ~] # pmacct -V
pmacct IMT plugin client, pmacct 1.7.8-git (RELEASE)

```

* * *

**EDIT2** :

```auto
[root@ipfire ~] # cat /etc/pmacct/pmacct.conf
!
! Pmacctd configuration file for IPFire environment
!

!----------------------------------- global --------------------------------------------

syslog: daemon
daemonize: true
debug: false
promisc: true
interface: green0

imt_mem_pools_number: 256

!pcap_interfaces_map: /etc/pmacct/pcap_interfaces.map
!pcap_ifindex: map

plugins: memory[plugin1], sqlite3[plugin3]

```

---

<div class="post-metadata">

**Author:** ![bonnietwin](https://community.ipfire.org/user_avatar/community.ipfire.org/bonnietwin/32/12350_2.png) [@bonnietwin](https://community.ipfire.org/u/bonnietwin)\
**Post date:** [25 June 2023 17:52 UTC](https://community.ipfire.org/t/pmacct-unknown-key-interface-no-such-column-vlan-in/9947/15 "2023-06-25T17:52:07Z")

</div>

It looks like you have a newer version than is released at the moment.

What happens if you run /etc/init.d/pmacct restart

---

<div class="post-metadata">

**Author:** ![jon](https://community.ipfire.org/user_avatar/community.ipfire.org/jon/32/15363_2.png) [@jon](https://community.ipfire.org/u/jon)\
**Post date:** [25 June 2023 18:15 UTC](https://community.ipfire.org/t/pmacct-unknown-key-interface-no-such-column-vlan-in/9947/16 "2023-06-25T18:15:36Z")

</div>

> [@bonnietwin](#):
>
> newer version than is released

1.7.8 is the release that came with CU 175

[https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=094bbe083b20dfe8404ca3f27ae8f2b3d7821864](https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=094bbe083b20dfe8404ca3f27ae8f2b3d7821864)

log snippet:

```auto
Jun 13 22:29:08 ipfire pakfire: DOWNLOAD FINISHED: /ipfire/pakfire2//2.27-x86_64/paks/pcengines-apu-firmware-4.19.0.1-16.ipfire
Jun 13 22:29:08 ipfire pakfire: DOWNLOAD STARTED: paks/pmacct-1.7.8-5.ipfire
Jun 13 22:29:08 ipfire pakfire: DOWNLOAD INFO: Host: mirror.vtti.vt.edu (HTTPS) - File: /ipfire/pakfire2//2.27-x86_64/paks/pmacct-1.7.8-5.ipfire
Jun 13 22:29:08 ipfire pakfire: DOWNLOAD INFO: /ipfire/pakfire2//2.27-x86_64/paks/pmacct-1.7.8-5.ipfire has size of 532376 bytes
Jun 13 22:29:09 ipfire pakfire: DOWNLOAD INFO: HTTP-Status-Code: 200 - 200 OK
Jun 13 22:29:09 ipfire pakfire: DOWNLOAD INFO: File received. Start checking signature...
Jun 13 22:29:09 ipfire pakfire: DOWNLOAD INFO: Signature of pmacct-1.7.8-5.ipfire is fine.
Jun 13 22:29:09 ipfire pakfire: DOWNLOAD FINISHED: /ipfire/pakfire2//2.27-x86_64/paks/pmacct-1.7.8-5.ipfire
Jun 13 22:29:09 ipfire pakfire: DOWNLOAD STARTED: paks/python3-trio-0.22.0-3.ipfire

```

  

* * *

**EDIT** : Very odd!

With the reset I see:

```auto
[root@ipfire ~] # /etc/init.d/pmacct restart
Stopping the pmacctd daemon... Not running. [WARN]
Starting the pmacctd daemon...
WARN: [/etc/pmacct/pmacct.conf:11] Unknown key: interface. Ignored. [OK]
[root@ipfire ~]

```

  

and in the message log I see:

```auto
Jun 25 13:17:23 ipfire pmacctd[21939]: INFO ( default/core ): Start logging ... 
Jun 25 13:17:23 ipfire pmacctd[21940]: INFO ( default/core ): Promiscuous Mode Accounting Daemon, pmacctd 1.7.8-git (RELEASE) 
Jun 25 13:17:23 ipfire pmacctd[21940]: INFO ( default/core ): '--prefix=/usr' '--sysconfdir=/etc/pmacct' '--enable-sqlite3' '--enable-l2' '--enable-jansson' 'CFLAGS=-O2 -pipe -Wall -fexceptions -fPIC -m64 -mtune=generic -fcf-protection -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection' 'CXXFLAGS=-O2 -pipe -Wall -fexceptions -fPIC -m64 -mtune=generic -fcf-protection -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection' '--enable-traffic-bins' '--enable-bgp-bins' '--enable-bmp-bins' '--enable-st-bins' 
Jun 25 13:17:23 ipfire pmacctd[21940]: INFO ( default/core ): Reading configuration file '/etc/pmacct/pmacct.conf'. 
Jun 25 13:17:23 ipfire pmacctd[21940]: WARN ( default/core ): Selecting a suitable devices. 
Jun 25 13:17:23 ipfire kernel: device red0 entered promiscuous mode
Jun 25 13:17:23 ipfire pmacctd[21940]: INFO ( default/core ): [red0,0] link type is: 1 
Jun 25 13:17:23 ipfire pmacctd[21944]: OK ( plugin1/memory ): waiting for data on: '/var/spool/pmacct/plugin1.pipe' 
Jun 25 13:17:23 ipfire pmacctd[21945]: INFO ( plugin3/sqlite3 ): cache entries=32771 base cache memory=12713224 bytes 

```

---

<div class="post-metadata">

**Author:** ![bonnietwin](https://community.ipfire.org/user_avatar/community.ipfire.org/bonnietwin/32/12350_2.png) [@bonnietwin](https://community.ipfire.org/u/bonnietwin)\
**Post date:** [25 June 2023 18:31 UTC](https://community.ipfire.org/t/pmacct-unknown-key-interface-no-such-column-vlan-in/9947/17 "2023-06-25T18:31:55Z")

</div>

> [@jon](#):
>
> 1.7.8 is the release that came with CU 175

You are correct if course. It was the git bit that confused me.

Sorry for confusing things.

---

<div class="post-metadata">

**Author:** ![jon](https://community.ipfire.org/user_avatar/community.ipfire.org/jon/32/15363_2.png) [@jon](https://community.ipfire.org/u/jon)\
**Post date:** [25 June 2023 18:32 UTC](https://community.ipfire.org/t/pmacct-unknown-key-interface-no-such-column-vlan-in/9947/18 "2023-06-25T18:32:59Z")

</div>

> [@tphz](#):
>
> pcap\_interface: green0

This gets ride of the `WARN: [/etc/pmacct/pmacct.conf:11] Unknown key: interface. Ignored.` message for me!  
👍

Nicely done all!

---

<div class="post-metadata">

**Author:** ![bonnietwin](https://community.ipfire.org/user_avatar/community.ipfire.org/bonnietwin/32/12350_2.png) [@bonnietwin](https://community.ipfire.org/u/bonnietwin)\
**Post date:** [25 June 2023 18:34 UTC](https://community.ipfire.org/t/pmacct-unknown-key-interface-no-such-column-vlan-in/9947/19 "2023-06-25T18:34:17Z")

</div>

> [@jon](#):
>
> `Jun 25 13:17:23 ipfire kernel: device red0 entered promiscuous mode`

Is this saying that the default interface is actually taken to be red0 rather than green0?

---

<div class="post-metadata">

**Author:** ![jon](https://community.ipfire.org/user_avatar/community.ipfire.org/jon/32/15363_2.png) [@jon](https://community.ipfire.org/u/jon)\
**Post date:** [25 June 2023 18:35 UTC](https://community.ipfire.org/t/pmacct-unknown-key-interface-no-such-column-vlan-in/9947/20 "2023-06-25T18:35:22Z")

</div>

yes, it looks like what was mentioned above - it grabs the first available! Ugh!

> [@bonnietwin](#):
>
> The info for `pcap_interface: `says that if it is not defined then the default is take the interface supplied by the Operating System.

[Next page](https://community.ipfire.org/t/pmacct-unknown-key-interface-no-such-column-vlan-in/9947.md?page=2)
