Giter VIP home page Giter VIP logo

vnstat-docker's People

Contributors

ethack avatar lvillis avatar onedr0p avatar vergoh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

vnstat-docker's Issues

Add /metrics endpoint for Prometheus

Sorry if this is not the correct place to post.
And thanks for this great tool.
I wonder if it would be possible to have the http-server serve a /metrics-endpoint.
This way metrics could be scraped by prometheus.

Set time zone through environment variable

Currently, timezone and localtime files must be mounted to set the correct time zone.

Adding the tzdata package to the Alpine Linux base image will let the time zone be set through the env var TZ.

How to keep the cumulative data usage of a container across restarts

I have many docker containers and they have their respective bridge network. These appear as "br-xxxxxxx" in ifconfig o/p.
The network ID get changed when a container is restarted. (i.e. "br-xxxxxxx" becomes "br-yyyyyyy").
Even if I set the same alias to "br-yyyyyyy" the usage associated with the "br-xxxxxxx" is no longer available in vnStat.

Any workaround to keep track of the usage of a container across restarts??

Thank you...

Container has wrong time zone

Using the :latest tag on Debian 10:

[goose@Vergil: /docker/config/vnstatdb ] $ docker inspect -f '{{ json .Mounts }}' vnstat | jq
[
  {
    "Type": "bind",
    "Source": "/etc/localtime",
    "Destination": "/etc/localtime",
    "Mode": "ro",
    "RW": false,
    "Propagation": "rprivate"
  },
  {
    "Type": "bind",
    "Source": "/docker/config/vnstatdb",
    "Destination": "/var/lib/vnstat",
    "Mode": "rw",
    "RW": true,
    "Propagation": "rslave"
  },
  {
    "Type": "bind",
    "Source": "/etc/timezone",
    "Destination": "/etc/timezone",
    "Mode": "ro",
    "RW": false,
    "Propagation": "rprivate"
  }
]
[goose@Vergil: /docker/config/vnstatdb ] $ docker exec -it vnstat cat /etc/timezone /etc/localtime
America/New_York
TZif2▒▒▒▒p▒▒▒`▒▒p▒▒▒`▒e▒p▒▒▒▒j▒p▒5▒`▒S▒▒▒`▒3▒▒▒▒▒▒▒އ▒▒p▒i▒▒R▒K௳4▒~-౜Qp▒gJ`▒|3p▒G,`▒\p▒'`▒;▒p▒▒`▒p▒▒▒`▒▒▒ƴ`▒▒▒▒▒▒Ĺ𿏲▒▒▒▒▒▒o▒▒�}@p▒▒9`ˈ▒p▒#▒p▒`▒▒▒u▒▒▒@▒▒▒U▒▒▒ ▒▒▒5▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒p▒▒e▒▒މpݩ▒`޾kp߉d`▒▒Mp▒iF`▒~/p▒I(`▒^p▒W.▒▒G-▒▒7▒▒'▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ֶ▒▒Ƶ▒▒▒`▒▒p▒`▒p▒▒`▒o▒p▒_y`▒Oxp▒?[`▒/Zp▒(w▒▒<pY▒▒▒X▒▒▒;▒▒▒:▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒w▒▒p▒``▒pP▒`@▒p0▒`▒p    ▒`      ▒▒▒
▒▒`
   ▒▒p
▒gp▒▒▒▒▒▒▒f▒▒e▒yH▒iG▒Y*▒I)▒9
                            ▒)
                              ▒")▒▒
                                   `▒
p▒`▒▒p▒▒`▒▒p▒▒` v▒!▒▒`"U▒▒#j▒▒$5▒▒%J▒▒&▒▒'*s▒'▒▒p)
xpeG/`e▒Zpg'`g▒<pi▒`i▒pj▒▒`k▒:▒l▒▒▒mv▒n▒▒▒oU▒▒p▒▒▒q5▒▒ro▒▒s▒▒tOy▒t▒▒pv8▒`v▒▒pxx`x▒▒py▒Z`z▒▒p{▒<`|~gp}▒`~^Ip▒`▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
                                                                                                                            ▒▒▒▒LMTEDTESTEWTEPTTZif2▒▒▒▒▒^▒▒▒▒▒▒▒p▒▒▒▒▒▒▒`▒▒▒▒▒▒p▒▒▒▒▒▒▒`▒▒▒▒▒e▒p▒▒▒▒▒▒▒▒▒▒▒▒▒j▒p▒▒▒▒▒5▒`▒▒▒▒▒S▒▒▒▒▒▒▒▒`▒▒▒▒▒3▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒އ▒▒▒▒▒▒▒p▒▒▒▒▒▒▒i▒▒▒▒▒▒▒R▒▒▒▒▒▒▒K▒▒▒▒▒▒▒4▒▒▒▒▒▒~-▒▒▒▒▒▒▒Qp▒▒▒▒▒gJ`▒▒▒▒▒|3p▒▒▒▒▒G,`▒▒▒▒▒\p▒▒▒▒▒'`▒▒▒▒▒;▒p▒▒▒▒▒▒`▒▒▒▒▒p▒▒▒▒▒▒▒`▒▒▒▒▒▒▒▒▒▒▒▒ƴ`▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒Ĺ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒o▒▒▒▒▒▒�}▒▒▒▒▒▒Ov▒▒▒▒▒▒d_▒▒▒▒▒▒/X▒▒▒▒▒▒M|p▒▒▒▒▒:▒▒▒▒▒▒-^p▒@p▒▒▒▒▒▒9`▒▒▒▒ˈ▒p▒▒▒▒▒#▒p▒▒▒▒▒`▒▒▒▒▒▒▒u▒▒▒▒▒▒▒@▒▒▒▒▒▒▒U▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒5▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒p▒▒▒▒▒▒e▒▒▒▒▒▒މp▒▒▒▒ݩ▒`▒▒▒▒޾kp▒▒▒▒߉d`▒▒▒▒▒▒Mp▒▒▒▒▒iF`▒▒▒▒▒~/p▒▒▒▒▒I(`▒▒▒▒▒^p▒▒▒▒▒W.▒▒▒▒▒▒G-▒▒▒▒▒▒7▒▒▒▒▒▒'▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ֶ▒▒▒▒▒▒Ƶ▒▒▒▒▒▒▒`▒▒▒▒▒▒p▒▒▒▒▒`▒▒▒▒▒p▒▒▒▒▒▒`▒▒▒▒▒o▒p▒▒▒▒▒_y`▒▒▒▒▒Oxp▒▒▒▒▒?[`▒▒▒▒▒/Zp▒▒▒▒▒(w▒▒▒▒▒▒<p▒▒▒▒Y▒▒▒▒▒▒▒X▒▒▒▒▒▒▒;▒▒▒▒▒▒▒:▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒w▒▒p▒``▒pP▒`@▒p0▒`▒p      ▒`      ▒▒▒
▒▒`
   ▒▒p
▒gp▒▒▒▒▒▒▒f▒▒e▒yH▒iG▒Y*▒I)▒9
                            ▒)
                              ▒")▒▒
                                   `▒
p▒`▒▒p▒▒`▒▒p▒▒` v▒!▒▒`"U▒▒#j▒▒$5▒▒%J▒▒&▒▒'*s▒'▒▒p)
xpeG/`e▒Zpg'`g▒<pi▒`i▒pj▒▒`k▒:▒l▒▒▒mv▒n▒▒▒oU▒▒p▒▒▒q5▒▒ro▒▒s▒▒tOy▒t▒▒pv8▒`v▒▒pxx`x▒▒py▒Z`z▒▒p{▒<`|~gp}▒`~^Ip▒`▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
                                                                                                                            ▒▒▒▒LMTEDTESTEWTEPT
EST5EDT,M3.2.0,M11.1.0
[goose@Vergil: /docker/config/vnstatdb ] $ docker exec -it vnstat date
Mon Feb  7 01:27:29 UTC 2022
[goose@Vergil: /docker/config/vnstatdb ] $

Not sure where my issue is, any ideas?

Feature Request - Add Container Name & Sort Alphabetically

Appreciate you work on this project. Wondering if it is possible to add the container name in front of the interface name and then sort them alphabetically. I have multiple servers each with 50+ containers. Saves the step of looking up the container interface name to find it in the UI.

Ignore interfaces matching pattern

Hi!

I see it's possible to ignore interfaces based on name with

docker exec vnstat vnstat -i br-20f8582bfc70 --remove --force

It would be cool if we could ignore based on a pattern.

docker exec vnstat vnstat -i veth* --remove --force

My usecase is that I'm using this on a system with podman and would like to ignore interfaces matching veth* (ignoring all container created interfaces) as these names are not static and are dynamically created.

How to access vnstat.conf

Thanks for the work on this repo.
How can I access the vnstat.conf file normally stored under /etc/vnstat.conf?
Thanks in advance.

Consider splitting vnstat and lighthttp in different containers

I'm running a traefik reverse proxy for all my webservices. All my applications are properly dockered and do not have access to the hosts network stack (including traefik). Now obviously vnstat needs to to run on the host network to collect it's data, but the lighthttp doesn't. This makes it impossible for traefik to properly route incoming requests to lighthttp, since it can't access services bound to 127.0.0.1 on the host network. I could of course listen to multiple IP addresses but I don't have any that is only reachable by traefik, so I would have to bind lighthttp to a public interface or deploy firewall rules.

Since vnstati doesn't appear to need access to the vnstatd process, I would suggest moving lighthttp into it's own container and have them share the same volume. It would also allow to only run vnstatd or vnstati and not have to have have the database on the same host.

Access interface specific pages directly with URL path

I have multiple servers. When I want to concentrate all the network cards that need attention in a domain name, the current directory structure makes me wonder how to use Nginx for reverse proxy. There may be a way to do a reverse proxy, but that should be more troublesome.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.