apm_host_info.go 551 B

1234567891011121314151617181920212223
  1. package node
  2. import (
  3. "github.com/coroot/coroot-node-agent/utils"
  4. . "github.com/coroot/coroot-node-agent/utils/modelse"
  5. )
  6. func NewNodeInfo(name, kv, machineId string) (*NodeInfoT, error) {
  7. ip, err := utils.GetRealIp()
  8. if err != nil {
  9. return nil, err
  10. }
  11. n := &NodeInfoT{
  12. Hostname: name,
  13. HostIp: ip,
  14. KernelVersion: kv,
  15. SystemUUID: machineId,
  16. HostID: utils.GetIntHostID(),
  17. AccountID: utils.GetAccountID(),
  18. LicenseKey: "J45Engw88NeHUZ4Q7qNsK8L47FTH**QvgW113IEnsNaBNMR5zZ**oj/g!!!!",
  19. }
  20. return n, nil
  21. }