mirror of
https://github.com/fankes/komari-agent.git
synced 2025-12-13 13:11:14 +08:00
feat: #28 支持使用环境变量 / 配置文件来传入 agent 参数
This commit is contained in:
@@ -8,9 +8,12 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
pkg_flags "github.com/komari-monitor/komari-agent/cmd/flags"
|
||||
"github.com/shirou/gopsutil/v4/cpu"
|
||||
)
|
||||
|
||||
var flags = pkg_flags.GlobalConfig
|
||||
|
||||
type CpuInfo struct {
|
||||
CPUName string `json:"cpu_name"`
|
||||
CPUArchitecture string `json:"cpu_architecture"`
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/komari-monitor/komari-agent/cmd/flags"
|
||||
"github.com/shirou/gopsutil/v4/disk"
|
||||
)
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ import (
|
||||
"regexp"
|
||||
"time"
|
||||
|
||||
"github.com/komari-monitor/komari-agent/cmd/flags"
|
||||
"github.com/komari-monitor/komari-agent/dnsresolver"
|
||||
)
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package monitoring
|
||||
import (
|
||||
"runtime"
|
||||
|
||||
"github.com/komari-monitor/komari-agent/cmd/flags"
|
||||
"github.com/shirou/gopsutil/v4/mem"
|
||||
)
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/komari-monitor/komari-agent/cmd/flags"
|
||||
"github.com/komari-monitor/komari-agent/monitoring/netstatic"
|
||||
"github.com/komari-monitor/komari-agent/utils"
|
||||
"github.com/shirou/gopsutil/v4/net"
|
||||
|
||||
@@ -2,8 +2,6 @@ package monitoring
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/komari-monitor/komari-agent/cmd/flags"
|
||||
)
|
||||
|
||||
func TestConnectionsCount(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user