change collector readme, fix url path (#98)
* change collector readme, fix url path * add error return * fix word mistake * optimization code
This commit is contained in:
parent
e32b8e44d1
commit
8790094b15
|
@ -9,7 +9,7 @@ linux 服务器基础资源采集agent
|
|||
#### 上报数据
|
||||
|
||||
```
|
||||
POST /api/push
|
||||
POST /api/collector/push
|
||||
|
||||
request body:
|
||||
// endpoint 可以填ip或者hostname, 如果ip是在运维平台是唯一表示, 那就填ip, hostname类同
|
||||
|
@ -38,7 +38,7 @@ response body:
|
|||
#### 获取已生效的采集策略
|
||||
|
||||
```
|
||||
GET /api/stra
|
||||
GET /api/collector/stra
|
||||
|
||||
response body:
|
||||
{
|
||||
|
|
|
@ -93,6 +93,9 @@ func UnTarGz(srcFilePath string, destDirPath string) error {
|
|||
|
||||
// Gzip reader
|
||||
gr, err := gzip.NewReader(fr)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Tar reader
|
||||
tr := tar.NewReader(gr)
|
||||
|
|
|
@ -156,6 +156,5 @@ func function(pc uintptr) []byte {
|
|||
}
|
||||
|
||||
func timeFormat(t time.Time) string {
|
||||
var timeString = t.Format("2006/01/02 - 15:04:05")
|
||||
return timeString
|
||||
return t.Format("2006/01/02 - 15:04:05")
|
||||
}
|
||||
|
|
|
@ -168,7 +168,7 @@ func (cp *ConnPools) UpdatePools(addrs []string) []string {
|
|||
return newAddrs
|
||||
}
|
||||
|
||||
// RpcCient implements the io.Closer interface
|
||||
// RpcClient implements the io.Closer interface
|
||||
type RpcClient struct {
|
||||
cli *rpc.Client
|
||||
name string
|
||||
|
|
Loading…
Reference in New Issue