Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MetricName ¶
MetricName is used to determine the metric name for a given module
func SystemProbeEnabledModules ¶
SystemProbeEnabledModules returns a list of all system-probe modules that are running
Types ¶
type ModuleMonitor ¶
type ModuleMonitor struct {
// contains filtered or unexported fields
}
ModuleMonitor is responsible for emitting heartbeat metrics for each system-probe module. It does so by hitting the stats endpoint from system-probe and emitting one metric per enabled module using Datadog Public API.
func NewModuleMonitor ¶
func NewModuleMonitor(opts Options) (*ModuleMonitor, error)
NewModuleMonitor returns a new ModuleMonitor
func (*ModuleMonitor) Every ¶
func (m *ModuleMonitor) Every(interval time.Duration, modules ...string)
Every can be used to automatically send heartbeats based on the given time interval.
func (*ModuleMonitor) Heartbeat ¶
func (m *ModuleMonitor) Heartbeat(modules ...string)
Heartbeat emits one heartbeat metric for each system-probe module that is enabled. The argument `modules` filters which heartbeats should be emitted. If no argument is given all enabled modules are reported.
type Options ¶
type Options struct { // KeysPerDomain (required) contains API key entries per Datadog domain KeysPerDomain map[string][]string // HostName (required) HostName string // SysprobeSocketPath (optional) sets the location of the Unix socket used // to reach system-probe SysprobeSocketPath string // StatsdClient (optional) points to a statsd client to be used as a // fallback mechanism StatsdClient statsd.ClientInterface // TagVersion (optional) contains the agent version to be sent along with the // heartbeat metric TagVersion string // TagRevision (optional) contains the agent revision to be sent along with the // heartbeat metric TagRevision string // MetricNameFn (optional) allows metric names to be specified MetricNameFn func(string) string }
Options encapsulates all configuration params used by ModuleMonitor