@@ -1,6 +1,6 @@
{
"name": "cosmos-server",
- "version": "0.12.0-unstable5",
+ "version": "0.12.0-unstable6",
"description": "",
"main": "test-server.js",
"bugs": {
@@ -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")
@@ -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,