add tcp connections stat plugin.
This commit is contained in:
committed by
Cameron Sparr
parent
1d1180ec0c
commit
dc38e448bd
@@ -32,6 +32,7 @@ type PS interface {
|
||||
VMStat() (*mem.VirtualMemoryStat, error)
|
||||
SwapStat() (*mem.SwapMemoryStat, error)
|
||||
DockerStat() ([]*DockerContainerStat, error)
|
||||
NetConnections() ([]net.NetConnectionStat, error)
|
||||
}
|
||||
|
||||
func add(acc plugins.Accumulator,
|
||||
@@ -90,6 +91,10 @@ func (s *systemPS) NetIO() ([]net.NetIOCountersStat, error) {
|
||||
return net.NetIOCounters(true)
|
||||
}
|
||||
|
||||
func (s *systemPS) NetConnections() ([]net.NetConnectionStat, error) {
|
||||
return net.NetConnections("all")
|
||||
}
|
||||
|
||||
func (s *systemPS) DiskIO() (map[string]disk.DiskIOCountersStat, error) {
|
||||
m, err := disk.DiskIOCounters()
|
||||
if err == common.NotImplementedError {
|
||||
|
||||
Reference in New Issue
Block a user