| 1234567891011121314151617181920212223 |
- package node
- import (
- "github.com/coroot/coroot-node-agent/utils"
- . "github.com/coroot/coroot-node-agent/utils/modelse"
- )
- func NewNodeInfo(name, kv, machineId string) (*NodeInfoT, error) {
- ip, err := utils.GetRealIp()
- if err != nil {
- return nil, err
- }
- n := &NodeInfoT{
- Hostname: name,
- HostIp: ip,
- KernelVersion: kv,
- SystemUUID: machineId,
- HostID: utils.GetIntHostID(),
- AccountID: utils.GetAccountID(),
- LicenseKey: "J45Engw88NeHUZ4Q7qNsK8L47FTH**QvgW113IEnsNaBNMR5zZ**oj/g!!!!",
- }
- return n, nil
- }
|