Skip to content

Commit f2a58f6

Browse files
author
chaoli
committed
Merge branch 'master' of https://github.com/chaolihf/OneAgent
2 parents 9ee62d6 + 90e8f0a commit f2a58f6

File tree

2 files changed

+2
-580
lines changed

2 files changed

+2
-580
lines changed

OneAgent.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"os/exec"
99
"strings"
1010

11-
"com.chinatelecom.oneops.exporter/OneAgent/exporter"
1211
node_exporter_main "github.com/chaolihf/node_exporter"
1312

1413
//包引用是包含模块名/路径名/包名
@@ -28,7 +27,6 @@ type oneAgentCollector struct {
2827
}
2928

3029
var logger *zap.Logger
31-
var loggerDatas *exporter.LoggerData
3230
var (
3331
showVersion = flag.Bool("version", false, "Print version information.")
3432
listenAddress = flag.String("web.listen-address", ":19172", "The address to listen on for HTTP requests.")
@@ -78,10 +76,10 @@ func limitResource() {
7876

7977
func main() {
8078
logger.Info("host collector\n")
81-
node_exporter_main.Main()
79+
node_exporter_main.Main(logger)
8280
flag.Parse()
8381
if !strings.Contains(*listenAddress, ":9172") {
84-
node_exporter_main.Main()
82+
node_exporter_main.Main(logger)
8583
}
8684
if *showVersion {
8785
fmt.Println("version V1.6.1")

0 commit comments

Comments
 (0)