Giter Site home page Giter Site logo

agent's Introduction

ServerStatus Agent:

  • 获取服务状态信息的探针 golang版本包
  • 只支持linux,参考serverStatus项目python探针实现

数据格式

type Data struct {
	Name     string `json:"name"`
	Online4  bool   `json:"online4"`
	Online6  bool   `json:"online6"`
	IPStatus bool   `json:"ip_status"`

	CPU       float64 `json:"cpu"`
	Load1     float64 `json:"load_1"`
	Load5     float64 `json:"load_5"`
	Load15    float64 `json:"load_15"`
	Uptime    string  `json:"uptime"`
	MemUsed   int64   `json:"memory_used"`
	MemTotal  int64   `json:"memory_total"`
	SwapUsed  int64   `json:"swap_used"`
	SwapTotal int64   `json:"swap_total"`
	HddUsed   int     `json:"hdd_used"`
	HddTotal  int     `json:"hdd_total"`

	TimeCU     string  `json:"time_CU"`
	TimeCM     string  `json:"time_CM"`
	TimeCT     string  `json:"time_CT"`
	LostRateCU float64 `json:"cu_lostRate"`
	LostRateCM float64 `json:"cm_lostRate"`
	LostRateCT float64 `json:"ct_lostRate"`

	TCPCount     int `json:"tcp_count"`
	UDPCount     int `json:"udp_count"`
	ProcessCount int `json:"process_count"`
	ThreadCount  int `json:"thread_count"`

	NetworkRx  int64 `json:"network_rx"`
	NetworkTx  int64 `json:"network_tx"`
	NetworkIn  int64 `json:"network_in"`
	NetworkOut int64 `json:"network_out"`
}

  {
    "name":"",
    "online4":true,
    "online6":false,
    "ip_status":true,
    "cpu":0.015113350125944613,
    "load_1":0.09000000357627869,
    "load_5":0.1899999976158142,
    "load_15":0.18000000715255737,
    "uptime":"177961.79",
    "memory_used":2243552,
    "memory_total":17511292,
    "swap_used":0,
    "swap_total":5715964,
    "hdd_used":11213,
    "hdd_total":931653,
    "time_CU":"7.485662ms",
    "time_CM":"6.691432ms",
    "time_CT":"6.092826ms",
    "cu_lostRate":0,
    "cm_lostRate":0,
    "ct_lostRate":0,
    "tcp_count":138,
    "udp_count":1,
    "process_count":311,
    "thread_count":715,
    "network_rx":1980,
    "network_tx":2022,
    "network_in":1616900885,
    "network_out":560739931
  }

参考项目

agent's People

Watchers

lev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.