winperfcounters

package
v4.2.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPCRInstanceTagTransformer

func NewPCRInstanceTagTransformer() func(telegraf.Metric) error

NewPCRInstanceTagTransformer returns a function for transforming perf counter measurements

func NewPCRMetricNamesTransformer

func NewPCRMetricNamesTransformer() func(string) string

NewPCRMetricNamesTransformer returns a function for tranforming perf counter metric names as parsed from telegraf into something matching the SignalFx PerfCounterReporter

func NewPCRReplacer

func NewPCRReplacer() *strings.Replacer

NewPCRReplacer returns a new replacer for sanitizing metricnames and instances like SignalFx PCR

Types

type Config

type Config struct {
	config.MonitorConfig `acceptsEndpoints:"false" deepcopier:"skip"`
	Object               []PerfCounterObj `yaml:"objects" default:"[]"`
	// The frequency that counter paths should be expanded
	// and how often to refresh counters from configuration.
	// This is expressed as a duration.
	CountersRefreshInterval time.Duration `yaml:"counterRefreshInterval" default:"5s"`
	// If `true`, instance indexes will be included in instance names, and wildcards will
	// be expanded and localized (if applicable).  If `false`, non partial wildcards will
	// be expanded and instance names will not include instance indexes.
	UseWildcardsExpansion bool `yaml:"useWildCardExpansion"`
	// Print out the configurations that match available performance counters
	PrintValid bool `yaml:"printValid"`
	// If `true`, metric names will be emitted in the format emitted by the
	// SignalFx PerfCounterReporter
	PCRMetricNames bool `yaml:"pcrMetricNames" default:"false"`
}

Config for this monitor

type Monitor

type Monitor struct {
	Output types.Output
	// contains filtered or unexported fields
}

Monitor for Utilization

func (*Monitor) Configure

func (m *Monitor) Configure(conf *Config) error

Configure the monitor

func (*Monitor) Shutdown

func (m *Monitor) Shutdown()

Shutdown stops the metric sync

type PerfCounterObj

type PerfCounterObj struct {
	// The name of a windows performance counter object
	ObjectName string `yaml:"objectName"`
	// The name of the counters to collect from the performance counter object
	Counters []string `yaml:"counters" default:"[]"`
	// The windows performance counter instances to fetch for the performance counter object
	Instances []string `yaml:"instances" default:"[]"`
	// The name of the telegraf measurement that will be used as a metric name
	Measurement string `yaml:"measurement"`
	// Log a warning if the perf counter object is missing
	WarnOnMissing bool `yaml:"warnOnMissing" default:"false"`
	// Panic if the performance counter object is missing (this will stop the agent)
	FailOnMissing bool `yaml:"failOnMissing" default:"false"`
	// Include the total instance when collecting performance counter metrics
	IncludeTotal bool `yaml:"includeTotal" default:"false"`
}

PerfCounterObj represents a windows performance counter object to monitor

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL