Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Oct 2020 14:14:10 +0100
From:      Paul Thornton <paul@prt.org>
To:        freebsd-net@freebsd.org
Subject:   Getting netgraph stats
Message-ID:  <3b933e75-1ef2-cb80-dc9e-2426cddc4e21@prt.org>

next in thread | raw e-mail | index | archive | help
I am having a problem monitoring network stats on jails on a host.

Scenario:
One host, FreeBSD 12.1, with a small number of vnet jails.

I'm using netgraph to bridge two or more VLANs from physical NICs into 
each jail - so each jail has at least 2 ngether interfaces which are the 
only NICs in the jail.

All of this works well.

And then I wanted to see what each of my ngethX interface statistics 
were doing - from my host.  snmpd only sees the physical NICs (of 
course, because the ngeth ones don't appear any more since the jails are 
started - they all moved to the jails).

As another approach, is there any way for me to get the network stats 
(in/out packets and in/out bytes) from my ngeth netgraph nodes directly?

Or have I missed some other way?  I really need to monitor the jails 
from the outside as I cannot guarantee I can reach snmpd running inside 
the jail (think of the jail as being a private environment where I 
cannot route my SNMP requests to).

Thanks

Paul.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3b933e75-1ef2-cb80-dc9e-2426cddc4e21>