Skip to content

Commit

Permalink
hostobject CPU cores
Browse files Browse the repository at this point in the history
  • Loading branch information
宋龙奇 authored and 谭彪 committed Sep 19, 2024
1 parent cadffe5 commit 048b9e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/plugins/inputs/hostobject/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"fmt"
"net"
"net/http"
"runtime"
"strconv"
"strings"
"time"
Expand Down Expand Up @@ -183,7 +184,7 @@ func (ipt *Input) collect() error {
Add("logging_level", message.Host.loggingLevel, false, true).
AddTag("name", message.Host.HostMeta.HostName).
AddTag("os", message.Host.HostMeta.OS).
Add("num_cpu", len(message.Host.CPU), false, false).
Add("num_cpu", runtime.NumCPU(), false, false).
AddTag("unicast_ip", message.Config.IP).
Add("disk_total", message.Host.getDiskTotal(), false, true).
AddTag("arch", message.Host.HostMeta.Arch)
Expand Down

0 comments on commit 048b9e1

Please sign in to comment.