MCPcopy Index your code
hub / github.com/cloudradar-monitoring/cagent

github.com/cloudradar-monitoring/cagent @1.9.43

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.9.43 ↗ · + Follow
776 symbols 2,083 edges 150 files 144 documented · 19% updated 3y ago1.9.43 · 2021-06-01★ 382 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

How to build from sources

go get -d -u github.com/cloudradar-monitoring/cagent
go build -o cagent -ldflags="-X github.com/cloudradar-monitoring/cagent.Version=$(git --git-dir=$GOPATH/src/github.com/cloudradar-monitoring/cagent/.git describe --always --long --dirty --tag)" github.com/cloudradar-monitoring/cagent/cmd/cagent

How to run

-r for one run only mode

./cagent -r -o result.out

Configuration

Check the example config

Default locations: * Mac OS: ~/.cagent/cagent.conf * Windows: ./cagent.conf * UNIX: /etc/cagent/cagent.conf

Logs location

  • Mac OS: ~/.cagent/cagent.log
  • Windows: ./cagent.log
  • UNIX: /var/log/cagent/cagent.log

Build binaries and deb/rpm packages

– Install goreleaser

make goreleaser-snapshot

Build MSI package

Should be done on Windows machine - Download go-msi and put it in the C:\Program Files\go-msi - Open command prompt(cmd.exe or powershell) - Go to cagent directory cd path_to_directory - Run make goreleaser-snapshot to build binaries - Run build-win.bat

Versioning model

Cagent uses <major>.<minor>.<buildnumber> version pattern for compatibility with a maximum number of package managers.

Starting from version 1.4.0 packages with even <minor> number are considered stable.

S.M.A.R.T monitoring documentation

S.M.A.R.T how to

Extension points exported contracts — how you extend this code

Invoker (Interface)
Invoker executes command in context and gathers stdout/stderr output into slice [1 implementers]
pkg/common/common.go
Module (Interface)
(no doc) [3 implementers]
pkg/monitoring/module.go
PerformanceQuery (Interface)
PerformanceQuery provides wrappers around Windows performance counters API for easy usage in GO [1 implementers]
perfcounters/performance_query.go
Option (FuncType)
Option callback for connection option
pkg/smart/options.go
Cleaner (Interface)
(no doc) [1 implementers]
handler.go
Provider (Interface)
(no doc) [1 implementers]
pkg/monitoring/vmstat/types/types.go

Core symbols most depended-on inside this repo

Error
called by 121
perfcounters/performance_query.go
Error
called by 90
types.go
Run
called by 32
pkg/monitoring/module.go
Add
called by 24
cpu.go
String
called by 23
cmd/csender/main.go
Name
called by 22
pkg/monitoring/vmstat/types/types.go
Add
called by 20
pkg/common/errors.go
String
called by 18
pkg/winapi/types.go

Shape

Function 363
Method 245
Struct 135
TypeAlias 25
Interface 7
FuncType 1

Languages

Go100%

Modules by API surface

perfcounters/performance_query.go31 symbols
config.go27 symbols
cmd/cagent/main.go26 symbols
pkg/winapi/types.go25 symbols
cpu.go18 symbols
pkg/jobmon/spool.go17 symbols
pkg/hwinfo/hwinfo_other.go17 symbols
pkg/common/common.go17 symbols
perfcounters/pdh.go17 symbols
pkg/monitoring/services/services_nonwindows.go16 symbols
pkg/monitoring/top/top.go15 symbols
cmd/cagent/winui.go14 symbols

For agents

$ claude mcp add cagent \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page