Documentation ¶
Index ¶
- Constants
- Variables
- func FilteredHostMetricsHandler() http.Handler
- func GetFilteredHostMetrics(ctx context.Context) (*bytes.Buffer, error)
- func HostMetricsHandler(ncConfig *NodeCollectorConfig) (*http.Handler, error)
- func NewNodeCollector(config *NodeCollectorConfig) (*collector.NodeCollector, error)
- type MetricsPusher
- type NodeCollectorConfig
- type ServiceMetricsFetcher
Constants ¶
View Source
const MaxRequestsInFlight = 3
This should be more than enough concurrent requests. We're only polling this once per device (non-concurrently), so other requests come from customer API calls. If we exceed this count, we're probably doing something wrong.
Variables ¶
View Source
var ( ErrInvalidCollector = errors.New("invalid collector") DefaultNodeCollectorConfig = NodeCollectorConfig{ ProcFSPath: "/proc", SysFSPath: "/sys", RootFSPath: "/", Collectors: []string{ "cpu", "diskstats", "filesystem", "loadavg", "meminfo", "textfile", "time", "netdev", }, } )
Functions ¶
func GetFilteredHostMetrics ¶
func HostMetricsHandler ¶
func HostMetricsHandler(ncConfig *NodeCollectorConfig) (*http.Handler, error)
func NewNodeCollector ¶
func NewNodeCollector(config *NodeCollectorConfig) (*collector.NodeCollector, error)
Types ¶
type MetricsPusher ¶
type MetricsPusher struct {
// contains filtered or unexported fields
}
func NewMetricsPusher ¶
func NewMetricsPusher( client *client.Client, serviceMetricsFetcher *ServiceMetricsFetcher, ) *MetricsPusher
func (*MetricsPusher) PushDeviceMetrics ¶
func (m *MetricsPusher) PushDeviceMetrics(ctx *dpcontext.Context)
func (*MetricsPusher) PushServiceMetrics ¶
func (m *MetricsPusher) PushServiceMetrics(ctx *dpcontext.Context)
func (*MetricsPusher) SetBundle ¶
func (m *MetricsPusher) SetBundle(bundle models.Bundle)
type NodeCollectorConfig ¶
type ServiceMetricsFetcher ¶
type ServiceMetricsFetcher struct {
// contains filtered or unexported fields
}
func NewServiceMetricsFetcher ¶
func NewServiceMetricsFetcher( supervisorLookup supervisor.Lookup, netnsManager *netns.Manager, ) *ServiceMetricsFetcher
Click to show internal directories.
Click to hide internal directories.