# How to add interface to vnstat to database for monitoring

DevFeed: [How to add interface to vnstat to database for monitoring](<https://devfeed.tech/articles/how-to-add-interface-to-vnstat-to-database-for-monitoring-41939.md>)

Original publisher: [Read original article](<https://www.cyberciti.biz/faq/linux-unix-adding-network-interface-to-vnstat-to-database-for-monitoring/>)

Author: Vivek Gite

Published: 2024-05-26T05:56:00Z

Content type: tutorial

Language: en

Sources: [nixCraft](<https://devfeed.tech/sources/nixcraft-linux-tips-hacks-tutorials-and-ideas-in-blog-format-rss-feed.md>)

Topics: [Monitoring](<https://devfeed.tech/topics/monitoring.md>), [Network](<https://devfeed.tech/topics/network.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Unix](<https://devfeed.tech/topics/unix.md>), [systemd](<https://devfeed.tech/topics/systemd.md>), [SQLite](<https://devfeed.tech/topics/sqlite.md>), [Terminal](<https://devfeed.tech/topics/terminal.md>)

Tags: [commands](<https://devfeed.tech/tags/commands.md>), [easy](<https://devfeed.tech/tags/easy.md>), [freebsd](<https://devfeed.tech/tags/freebsd.md>), [installation](<https://devfeed.tech/tags/installation.md>), [json](<https://devfeed.tech/tags/json.md>), [linkedin](<https://devfeed.tech/tags/linkedin.md>), [linux](<https://devfeed.tech/tags/linux.md>), [monitoring](<https://devfeed.tech/tags/monitoring.md>), [network](<https://devfeed.tech/tags/network.md>), [network-interface](<https://devfeed.tech/tags/network-interface.md>), [reddit](<https://devfeed.tech/tags/reddit.md>), [sqlite](<https://devfeed.tech/tags/sqlite.md>), [ssh](<https://devfeed.tech/tags/ssh.md>), [systemd](<https://devfeed.tech/tags/systemd.md>), [twitter](<https://devfeed.tech/tags/twitter.md>), [unix](<https://devfeed.tech/tags/unix.md>), [whatsapp](<https://devfeed.tech/tags/whatsapp.md>), [xml](<https://devfeed.tech/tags/xml.md>)

## AI overview

A practical guide to adding a network interface such as wg0 to vnStat for traffic monitoring on Linux and Unix-like systems. It covers listing interfaces, registering the interface, restarting the vnStat service, viewing output, and locating stored data and configuration files.

## Source excerpt

vnStat is a network traffic monitor for Linux and Unix-like systems. It logs network traffic at different intervals and doesn't require root permissions to run. The implementation involves two commands: vnstat for querying traffic information and vnstatd for data retrieval and storage. Let's see how to add a network interface to vnstat after installation for monitoring purposes. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to add interface to vnstat to database for monitoring appeared first on nixCraft.