Documentation ¶
Overview ¶
Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0
Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0
Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0
Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0
Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0
Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0
Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0
Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0
Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0
Index ¶
- func FilterStorageSamples(samples sample.EventBatch) []*storage.Sample
- func NewProcessSample(pid int32) *types.ProcessSample
- type CPUMonitor
- type CPUSample
- type ContainerSampler
- type DiskMonitor
- type DiskSample
- type DockerSampler
- type HeartbeatSample
- type HeartbeatSampler
- type InternalProcess
- type InternalProcessInterrogator
- type LoadMonitor
- type LoadSample
- type MemoryMonitor
- type MemorySample
- type ProcessCacheEntry
- type ProcessDecorator
- type ProcessInterrogator
- type ProcessWrapper
- type SystemSample
- type SystemSampler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterStorageSamples ¶
func FilterStorageSamples(samples sample.EventBatch) []*storage.Sample
filterStorageSamples will be used to remove disk samples that should not be taken into account. e.g. duplicates.
func NewProcessSample ¶
func NewProcessSample(pid int32) *types.ProcessSample
Types ¶
type CPUMonitor ¶
type CPUMonitor struct {
// contains filtered or unexported fields
}
func NewCPUMonitor ¶
func NewCPUMonitor(context agent.AgentContext) *CPUMonitor
func (*CPUMonitor) Sample ¶
func (self *CPUMonitor) Sample() (sample *CPUSample, err error)
type CPUSample ¶
type CPUSample struct { CPUPercent float64 `json:"cpuPercent"` CPUUserPercent float64 `json:"cpuUserPercent"` CPUSystemPercent float64 `json:"cpuSystemPercent"` CPUIOWaitPercent float64 `json:"cpuIOWaitPercent"` CPUIdlePercent float64 `json:"cpuIdlePercent"` CPUStealPercent float64 `json:"cpuStealPercent"` }
type ContainerSampler ¶
type ContainerSampler interface { Enabled() bool NewDecorator() (ProcessDecorator, error) }
func NewDockerSampler ¶
func NewDockerSampler(cacheTTL time.Duration, apiVersion string) ContainerSampler
type DiskMonitor ¶
type DiskMonitor struct {
// contains filtered or unexported fields
}
func NewDiskMonitor ¶
func NewDiskMonitor(storageSampler *storage.Sampler) *DiskMonitor
func (*DiskMonitor) Sample ¶
func (m *DiskMonitor) Sample() (result *DiskSample, err error)
type DiskSample ¶
type DiskSample struct { UsedBytes float64 `json:"diskUsedBytes"` UsedPercent float64 `json:"diskUsedPercent"` FreeBytes float64 `json:"diskFreeBytes"` FreePercent float64 `json:"diskFreePercent"` TotalBytes float64 `json:"diskTotalBytes"` UtilizationPercent float64 `json:"diskUtilizationPercent"` ReadUtilizationPercent float64 `json:"diskReadUtilizationPercent"` WriteUtilizationPercent float64 `json:"diskWriteUtilizationPercent"` ReadsPerSec float64 `json:"diskReadsPerSecond"` WritesPerSec float64 `json:"diskWritesPerSecond"` }
type DockerSampler ¶
type DockerSampler struct {
// contains filtered or unexported fields
}
func (*DockerSampler) NewDecorator ¶
func (d *DockerSampler) NewDecorator() (ProcessDecorator, error)
type HeartbeatSample ¶
type HeartbeatSampler ¶
type HeartbeatSampler struct {
// contains filtered or unexported fields
}
HeartbeatSampler is used only when IsSecureForwardOnly configuration is true. The Rate of this sampler could be increased since we've set it up to 1 min but it could be way higher.
func NewHeartbeatSampler ¶
func NewHeartbeatSampler(context agent.AgentContext) *HeartbeatSampler
func (*HeartbeatSampler) Disabled ¶
func (hb *HeartbeatSampler) Disabled() bool
func (*HeartbeatSampler) Interval ¶
func (hb *HeartbeatSampler) Interval() time.Duration
func (*HeartbeatSampler) Name ¶
func (*HeartbeatSampler) Name() string
func (*HeartbeatSampler) OnStartup ¶
func (*HeartbeatSampler) OnStartup()
func (*HeartbeatSampler) Sample ¶
func (f *HeartbeatSampler) Sample() (sample.EventBatch, error)
type InternalProcess ¶
type InternalProcess struct {
// contains filtered or unexported fields
}
func NewInternalProcess ¶
func NewInternalProcess(p *process.Process) *InternalProcess
func (*InternalProcess) Ppid ¶
func (pw *InternalProcess) Ppid() (int32, error)
type InternalProcessInterrogator ¶
type InternalProcessInterrogator struct {
// contains filtered or unexported fields
}
func NewInternalProcessInterrogator ¶
func NewInternalProcessInterrogator(privileged bool) *InternalProcessInterrogator
func (*InternalProcessInterrogator) NewProcess ¶
func (ip *InternalProcessInterrogator) NewProcess(pid int32) (ProcessWrapper, error)
type LoadMonitor ¶
type LoadMonitor struct { }
func NewLoadMonitor ¶
func NewLoadMonitor() *LoadMonitor
func (*LoadMonitor) Sample ¶
func (self *LoadMonitor) Sample() (sample *LoadSample, err error)
type LoadSample ¶
type MemoryMonitor ¶
type MemoryMonitor struct {
// contains filtered or unexported fields
}
func NewMemoryMonitor ¶
func NewMemoryMonitor(ignoreReclaimable bool) *MemoryMonitor
NewMemoryMonitor returns a memory monitor. If consistentMemory is true, the reported free memory is reported as: total - free - buffers - cached - sreclaimable, as a consistent implementation that does not change between different kernel versions or library implementations. If consistentMemory is false, it reports the free memory as the Available Memory, dependant on the current kernel or library implementations.
func (*MemoryMonitor) Sample ¶
func (mm *MemoryMonitor) Sample() (result *MemorySample, err error)
type MemorySample ¶
type MemorySample struct { MemoryTotal float64 `json:"memoryTotalBytes"` MemoryFree float64 `json:"memoryFreeBytes"` MemoryUsed float64 `json:"memoryUsedBytes"` MemoryFreePercent float64 `json:"memoryFreePercent"` MemoryUsedPercent float64 `json:"memoryUsedPercent"` MemoryCachedBytes float64 `json:"memoryCachedBytes"` MemorySlabBytes float64 `json:"memorySlabBytes"` SwapTotal float64 `json:"swapTotalBytes"` SwapFree float64 `json:"swapFreeBytes"` SwapUsed float64 `json:"swapUsedBytes"` }
type ProcessCacheEntry ¶
type ProcessCacheEntry struct {
// contains filtered or unexported fields
}
Deprecated (just for windows compatibility before we migrate it to the "process" package)
type ProcessDecorator ¶
type ProcessDecorator interface {
Decorate(process *metricTypes.ProcessSample)
}
type ProcessInterrogator ¶
type ProcessInterrogator interface {
NewProcess(int32) (ProcessWrapper, error)
}
Deprecated (just for windows compatibility before we migrate it to the "process" package)
type ProcessWrapper ¶
Deprecated (just for windows compatibility before we migrate it to the "process" package)
type SystemSample ¶
type SystemSample struct { sample.BaseEvent *CPUSample *LoadSample *MemorySample *DiskSample }
SystemSample uses pointers to embedded structs to ensure that those attribute are only present if they are successfully collected.
type SystemSampler ¶
type SystemSampler struct { CpuMonitor *CPUMonitor DiskMonitor *DiskMonitor LoadMonitor *LoadMonitor MemoryMonitor *MemoryMonitor // contains filtered or unexported fields }
func NewSystemSampler ¶
func NewSystemSampler(context agent.AgentContext, storageSampler *storage.Sampler) *SystemSampler
func (*SystemSampler) Disabled ¶
func (s *SystemSampler) Disabled() bool
func (*SystemSampler) Interval ¶
func (s *SystemSampler) Interval() time.Duration
func (*SystemSampler) Name ¶
func (s *SystemSampler) Name() string
func (*SystemSampler) OnStartup ¶
func (s *SystemSampler) OnStartup()
func (*SystemSampler) Sample ¶
func (s *SystemSampler) Sample() (results sample.EventBatch, err error)