diff --git a/package.json b/package.json index 8ad6394..f24c23a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cosmos-server", - "version": "0.12.0-unstable5", + "version": "0.12.0-unstable6", "description": "", "main": "test-server.js", "bugs": { diff --git a/src/metrics/index.go b/src/metrics/index.go index 3f12cce..c1dee51 100644 --- a/src/metrics/index.go +++ b/src/metrics/index.go @@ -166,6 +166,8 @@ func Run() { utils.Error("Metrics - Cannot start monitoring the server if you don't mount /mnt/host to /. Check the documentation for more information.", nil) return } else { + utils.Log("Metrics - Monitoring the server at /mnt/host") + os.Setenv("HOST_PROC", "/mnt/host/proc") os.Setenv("HOST_SYS", "/mnt/host/sys") os.Setenv("HOST_ETC", "/mnt/host/etc") diff --git a/src/metrics/system.go b/src/metrics/system.go index d5d3592..aedcfc8 100644 --- a/src/metrics/system.go +++ b/src/metrics/system.go @@ -53,6 +53,11 @@ func GetSystemMetrics() { // Get Network Usage netIO, err := net.IOCounters(false) + + netIOTest, _ := net.IOCounters(true) + for _, v := range netIOTest { + utils.Debug("Metrics - Network", v.Name, v.BytesRecv, v.BytesSent, v.Errin, v.Errout, v.Dropin, v.Dropout) + } PushSetMetric("system.netRx", int(netIO[0].BytesRecv), DataDef{ Max: 0,