[release] v0.12.0-unstable6
This commit is contained in:
parent
33590ce369
commit
5e26d6ad90
|
@ -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")
|
||||
|
|
|
@ -54,6 +54,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,
|
||||
Period: time.Second * 30,
|
||||
|
|
Loading…
Reference in a new issue