collector

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

returns data points from Win32_PerfRawData_PerfOS_Processor https://msdn.microsoft.com/en-us/library/aa394317(v=vs.90).aspx - Win32_PerfRawData_PerfOS_Processor class

returns data points from Win32_PerfRawData_DNS_DNS https://msdn.microsoft.com/en-us/library/ms803992.aspx?f=255&MSPPError=-2147217396 https://technet.microsoft.com/en-us/library/cc977686.aspx

returns data points from Win32_Service https://msdn.microsoft.com/en-us/library/aa394418(v=vs.85).aspx - Win32_Service class

returns data points from Win32_PerfRawData_vmGuestLib_VMem and Win32_PerfRawData_vmGuestLib_VCPU

Index

Constants

View Source
const (
	Namespace = "wmi"
)

...

Variables

View Source
var ApplicationStates = map[uint32]string{
	1: "Uninitialized",
	2: "Initialized",
	3: "Running",
	4: "Disabling",
	5: "Disabled",
	6: "Shutdown Pending",
	7: "Delete Pending",
}
View Source
var Factories = make(map[string]func() (Collector, error))

Factories ...

Functions

This section is empty.

Types

type CPUCollector added in v0.1.0

type CPUCollector struct {
	CStateSecondsTotal *prometheus.Desc
	TimeTotal          *prometheus.Desc
	InterruptsTotal    *prometheus.Desc
	DPCsTotal          *prometheus.Desc
}

A CPUCollector is a Prometheus collector for WMI Win32_PerfRawData_PerfOS_Processor metrics

func (*CPUCollector) Collect added in v0.1.0

func (c *CPUCollector) Collect(ch chan<- prometheus.Metric) error

Collect sends the metric values for each metric to the provided prometheus Metric channel.

type CSCollector added in v0.1.0

type CSCollector struct {
	PhysicalMemoryBytes *prometheus.Desc
	LogicalProcessors   *prometheus.Desc
}

A CSCollector is a Prometheus collector for WMI metrics

func (*CSCollector) Collect added in v0.1.0

func (c *CSCollector) Collect(ch chan<- prometheus.Metric) error

Collect sends the metric values for each metric to the provided prometheus Metric channel.

type Collector

type Collector interface {
	// Get new metrics and expose them via prometheus registry.
	Collect(ch chan<- prometheus.Metric) (err error)
}

Collector is the interface a collector has to implement.

func NewCPUCollector added in v0.1.0

func NewCPUCollector() (Collector, error)

func NewCSCollector added in v0.1.0

func NewCSCollector() (Collector, error)

NewCSCollector ...

func NewDNSCollector added in v0.1.1

func NewDNSCollector() (Collector, error)

NewDNSCollector ...

func NewIISCollector

func NewIISCollector() (Collector, error)

NewIISCollector ...

func NewLogicalDiskCollector

func NewLogicalDiskCollector() (Collector, error)

NewLogicalDiskCollector ...

func NewNetworkCollector added in v0.1.0

func NewNetworkCollector() (Collector, error)

NewNetworkCollector ...

func NewOSCollector

func NewOSCollector() (Collector, error)

NewOSCollector ...

func NewSystemCollector added in v0.1.0

func NewSystemCollector() (Collector, error)

NewSystemCollector ...

func NewVmwareCollector added in v0.2.4

func NewVmwareCollector() (Collector, error)

func NewserviceCollector added in v0.1.3

func NewserviceCollector() (Collector, error)

NewserviceCollector ...

type DNSCollector added in v0.1.1

type DNSCollector struct {
	ZoneTransferRequestsReceived  *prometheus.Desc
	ZoneTransferRequestsSent      *prometheus.Desc
	ZoneTransferResponsesReceived *prometheus.Desc
	ZoneTransferSuccessReceived   *prometheus.Desc
	ZoneTransferSuccessSent       *prometheus.Desc
	ZoneTransferFailures          *prometheus.Desc
	MemoryUsedBytes               *prometheus.Desc
	DynamicUpdatesQueued          *prometheus.Desc
	DynamicUpdatesReceived        *prometheus.Desc
	DynamicUpdatesFailures        *prometheus.Desc
	NotifyReceived                *prometheus.Desc
	NotifySent                    *prometheus.Desc
	SecureUpdateFailures          *prometheus.Desc
	SecureUpdateReceived          *prometheus.Desc
	Queries                       *prometheus.Desc
	Responses                     *prometheus.Desc
	RecursiveQueries              *prometheus.Desc
	RecursiveQueryFailures        *prometheus.Desc
	RecursiveQuerySendTimeouts    *prometheus.Desc
	WinsQueries                   *prometheus.Desc
	WinsResponses                 *prometheus.Desc
	UnmatchedResponsesReceived    *prometheus.Desc
}

A DNSCollector is a Prometheus collector for WMI Win32_PerfRawData_DNS_DNS metrics

func (*DNSCollector) Collect added in v0.1.1

func (c *DNSCollector) Collect(ch chan<- prometheus.Metric) error

Collect sends the metric values for each metric to the provided prometheus Metric channel.

type IISCollector

type IISCollector struct {
	CurrentAnonymousUsers         *prometheus.Desc
	CurrentBlockedAsyncIORequests *prometheus.Desc
	CurrentCGIRequests            *prometheus.Desc
	CurrentConnections            *prometheus.Desc
	CurrentISAPIExtensionRequests *prometheus.Desc
	CurrentNonAnonymousUsers      *prometheus.Desc

	TotalBytesReceived                  *prometheus.Desc
	TotalBytesSent                      *prometheus.Desc
	TotalAnonymousUsers                 *prometheus.Desc
	TotalBlockedAsyncIORequests         *prometheus.Desc
	TotalCGIRequests                    *prometheus.Desc
	TotalConnectionAttemptsAllInstances *prometheus.Desc
	TotalRequests                       *prometheus.Desc
	TotalFilesReceived                  *prometheus.Desc
	TotalFilesSent                      *prometheus.Desc
	TotalISAPIExtensionRequests         *prometheus.Desc
	TotalLockedErrors                   *prometheus.Desc
	TotalLogonAttempts                  *prometheus.Desc
	TotalNonAnonymousUsers              *prometheus.Desc
	TotalNotFoundErrors                 *prometheus.Desc
	TotalRejectedAsyncIORequests        *prometheus.Desc

	CurrentApplicationPoolState        *prometheus.Desc
	CurrentApplicationPoolUptime       *prometheus.Desc
	CurrentWorkerProcesses             *prometheus.Desc
	MaximumWorkerProcesses             *prometheus.Desc
	RecentWorkerProcessFailures        *prometheus.Desc
	TimeSinceLastWorkerProcessFailure  *prometheus.Desc
	TotalApplicationPoolRecycles       *prometheus.Desc
	TotalApplicationPoolUptime         *prometheus.Desc
	TotalWorkerProcessesCreated        *prometheus.Desc
	TotalWorkerProcessFailures         *prometheus.Desc
	TotalWorkerProcessPingFailures     *prometheus.Desc
	TotalWorkerProcessShutdownFailures *prometheus.Desc
	TotalWorkerProcessStartupFailures  *prometheus.Desc
	// contains filtered or unexported fields
}

A IISCollector is a Prometheus collector for WMI Win32_PerfRawData_W3SVC_WebService and Win32_PerfRawData_APPPOOLCountersProvider_APPPOOLWAS metrics

func (*IISCollector) Collect

func (c *IISCollector) Collect(ch chan<- prometheus.Metric) error

Collect sends the metric values for each metric to the provided prometheus Metric channel.

type LogicalDiskCollector

type LogicalDiskCollector struct {
	RequestsQueued  *prometheus.Desc
	ReadBytesTotal  *prometheus.Desc
	ReadsTotal      *prometheus.Desc
	WriteBytesTotal *prometheus.Desc
	WritesTotal     *prometheus.Desc
	ReadTime        *prometheus.Desc
	WriteTime       *prometheus.Desc
	TotalSpace      *prometheus.Desc
	FreeSpace       *prometheus.Desc
	IdleTime        *prometheus.Desc
	SplitIOs        *prometheus.Desc
	// contains filtered or unexported fields
}

A LogicalDiskCollector is a Prometheus collector for WMI Win32_PerfRawData_PerfDisk_LogicalDisk metrics

func (*LogicalDiskCollector) Collect

func (c *LogicalDiskCollector) Collect(ch chan<- prometheus.Metric) error

Collect sends the metric values for each metric to the provided prometheus Metric channel.

type NetworkCollector added in v0.1.0

type NetworkCollector struct {
	BytesReceivedTotal       *prometheus.Desc
	BytesSentTotal           *prometheus.Desc
	BytesTotal               *prometheus.Desc
	PacketsOutboundDiscarded *prometheus.Desc
	PacketsOutboundErrors    *prometheus.Desc
	PacketsTotal             *prometheus.Desc
	PacketsReceivedDiscarded *prometheus.Desc
	PacketsReceivedErrors    *prometheus.Desc
	PacketsReceivedTotal     *prometheus.Desc
	PacketsReceivedUnknown   *prometheus.Desc
	PacketsSentTotal         *prometheus.Desc
	// contains filtered or unexported fields
}

A NetworkCollector is a Prometheus collector for WMI Win32_PerfRawData_Tcpip_NetworkInterface metrics

func (*NetworkCollector) Collect added in v0.1.0

func (c *NetworkCollector) Collect(ch chan<- prometheus.Metric) error

Collect sends the metric values for each metric to the provided prometheus Metric channel.

type OSCollector

type OSCollector struct {
	PhysicalMemoryFreeBytes *prometheus.Desc
	PagingFreeBytes         *prometheus.Desc
	VirtualMemoryFreeBytes  *prometheus.Desc
	ProcessesLimit          *prometheus.Desc
	ProcessMemoryLimitBytes *prometheus.Desc
	Processes               *prometheus.Desc
	Users                   *prometheus.Desc
	PagingLimitBytes        *prometheus.Desc
	VirtualMemoryBytes      *prometheus.Desc
	VisibleMemoryBytes      *prometheus.Desc
	Time                    *prometheus.Desc
	Timezone                *prometheus.Desc
}

A OSCollector is a Prometheus collector for WMI metrics

func (*OSCollector) Collect

func (c *OSCollector) Collect(ch chan<- prometheus.Metric) error

Collect sends the metric values for each metric to the provided prometheus Metric channel.

type SystemCollector added in v0.1.0

type SystemCollector struct {
	ContextSwitchesTotal     *prometheus.Desc
	ExceptionDispatchesTotal *prometheus.Desc
	ProcessorQueueLength     *prometheus.Desc
	SystemCallsTotal         *prometheus.Desc
	SystemUpTime             *prometheus.Desc
	Threads                  *prometheus.Desc
}

A SystemCollector is a Prometheus collector for WMI metrics

func (*SystemCollector) Collect added in v0.1.0

func (c *SystemCollector) Collect(ch chan<- prometheus.Metric) error

Collect sends the metric values for each metric to the provided prometheus Metric channel.

type VmwareCollector added in v0.2.4

type VmwareCollector struct {
	MemActive      *prometheus.Desc
	MemBallooned   *prometheus.Desc
	MemLimit       *prometheus.Desc
	MemMapped      *prometheus.Desc
	MemOverhead    *prometheus.Desc
	MemReservation *prometheus.Desc
	MemShared      *prometheus.Desc
	MemSharedSaved *prometheus.Desc
	MemShares      *prometheus.Desc
	MemSwapped     *prometheus.Desc
	MemTargetSize  *prometheus.Desc
	MemUsed        *prometheus.Desc

	CpuLimitMHz           *prometheus.Desc
	CpuReservationMHz     *prometheus.Desc
	CpuShares             *prometheus.Desc
	CpuStolenTotal        *prometheus.Desc
	CpuTimeTotal          *prometheus.Desc
	EffectiveVMSpeedMHz   *prometheus.Desc
	HostProcessorSpeedMHz *prometheus.Desc
}

A VmwareCollector is a Prometheus collector for WMI Win32_PerfRawData_vmGuestLib_VMem/Win32_PerfRawData_vmGuestLib_VCPU metrics

func (*VmwareCollector) Collect added in v0.2.4

func (c *VmwareCollector) Collect(ch chan<- prometheus.Metric) error

Collect sends the metric values for each metric to the provided prometheus Metric channel.

type Win32_ComputerSystem added in v0.1.0

type Win32_ComputerSystem struct {
	NumberOfLogicalProcessors uint32
	TotalPhysicalMemory       uint64
}

type Win32_OperatingSystem

type Win32_OperatingSystem struct {
	FreePhysicalMemory      uint64
	FreeSpaceInPagingFiles  uint64
	FreeVirtualMemory       uint64
	MaxNumberOfProcesses    uint32
	MaxProcessMemorySize    uint64
	NumberOfProcesses       uint32
	NumberOfUsers           uint32
	SizeStoredInPagingFiles uint64
	TotalVirtualMemorySize  uint64
	TotalVisibleMemorySize  uint64
	LocalDateTime           time.Time
}

type Win32_PerfRawData_APPPOOLCountersProvider_APPPOOLWAS added in v0.2.3

type Win32_PerfRawData_APPPOOLCountersProvider_APPPOOLWAS struct {
	Name             string
	Frequency_Object uint64
	Timestamp_Object uint64

	CurrentApplicationPoolState        uint32
	CurrentApplicationPoolUptime       uint64
	CurrentWorkerProcesses             uint32
	MaximumWorkerProcesses             uint32
	RecentWorkerProcessFailures        uint32
	TimeSinceLastWorkerProcessFailure  uint64
	TotalApplicationPoolRecycles       uint32
	TotalApplicationPoolUptime         uint64
	TotalWorkerProcessesCreated        uint32
	TotalWorkerProcessFailures         uint32
	TotalWorkerProcessPingFailures     uint32
	TotalWorkerProcessShutdownFailures uint32
	TotalWorkerProcessStartupFailures  uint32
}

type Win32_PerfRawData_DNS_DNS added in v0.1.1

type Win32_PerfRawData_DNS_DNS struct {
	AXFRRequestReceived            uint32
	AXFRRequestSent                uint32
	AXFRResponseReceived           uint32
	AXFRSuccessReceived            uint32
	AXFRSuccessSent                uint32
	CachingMemory                  uint32
	DatabaseNodeMemory             uint32
	DynamicUpdateNoOperation       uint32
	DynamicUpdateQueued            uint32
	DynamicUpdateRejected          uint32
	DynamicUpdateTimeOuts          uint32
	DynamicUpdateWrittentoDatabase uint32
	IXFRRequestReceived            uint32
	IXFRRequestSent                uint32
	IXFRResponseReceived           uint32
	IXFRSuccessSent                uint32
	IXFRTCPSuccessReceived         uint32
	IXFRUDPSuccessReceived         uint32
	NbstatMemory                   uint32
	NotifyReceived                 uint32
	NotifySent                     uint32
	RecordFlowMemory               uint32
	RecursiveQueries               uint32
	RecursiveQueryFailure          uint32
	RecursiveSendTimeOuts          uint32
	SecureUpdateFailure            uint32
	SecureUpdateReceived           uint32
	TCPMessageMemory               uint32
	TCPQueryReceived               uint32
	TCPResponseSent                uint32
	UDPMessageMemory               uint32
	UDPQueryReceived               uint32
	UDPResponseSent                uint32
	UnmatchedResponsesReceived     uint32
	WINSLookupReceived             uint32
	WINSResponseSent               uint32
	WINSReverseLookupReceived      uint32
	WINSReverseResponseSent        uint32
	ZoneTransferFailure            uint32
	ZoneTransferSOARequestSent     uint32
}

type Win32_PerfRawData_PerfDisk_LogicalDisk

type Win32_PerfRawData_PerfDisk_LogicalDisk struct {
	Name                   string
	CurrentDiskQueueLength uint32
	DiskReadBytesPerSec    uint64
	DiskReadsPerSec        uint32
	DiskWriteBytesPerSec   uint64
	DiskWritesPerSec       uint32
	PercentDiskReadTime    uint64
	PercentDiskWriteTime   uint64
	PercentFreeSpace       uint32
	PercentFreeSpace_Base  uint32
	PercentIdleTime        uint64
	SplitIOPerSec          uint32
}

type Win32_PerfRawData_PerfOS_Processor added in v0.1.0

type Win32_PerfRawData_PerfOS_Processor struct {
	Name                  string
	C1TransitionsPersec   uint64
	C2TransitionsPersec   uint64
	C3TransitionsPersec   uint64
	DPCRate               uint32
	DPCsQueuedPersec      uint32
	InterruptsPersec      uint32
	PercentC1Time         uint64
	PercentC2Time         uint64
	PercentC3Time         uint64
	PercentDPCTime        uint64
	PercentIdleTime       uint64
	PercentInterruptTime  uint64
	PercentPrivilegedTime uint64
	PercentProcessorTime  uint64
	PercentUserTime       uint64
}

type Win32_PerfRawData_PerfOS_System added in v0.1.0

type Win32_PerfRawData_PerfOS_System struct {
	ContextSwitchesPersec     uint32
	ExceptionDispatchesPersec uint32
	Frequency_Object          uint64
	ProcessorQueueLength      uint32
	SystemCallsPersec         uint32
	SystemUpTime              uint64
	Threads                   uint32
	Timestamp_Object          uint64
}

type Win32_PerfRawData_Tcpip_NetworkInterface added in v0.1.0

type Win32_PerfRawData_Tcpip_NetworkInterface struct {
	BytesReceivedPerSec      uint64
	BytesSentPerSec          uint64
	BytesTotalPerSec         uint64
	Name                     string
	PacketsOutboundDiscarded uint64
	PacketsOutboundErrors    uint64
	PacketsPerSec            uint64
	PacketsReceivedDiscarded uint64
	PacketsReceivedErrors    uint64
	PacketsReceivedPerSec    uint64
	PacketsReceivedUnknown   uint64
	PacketsSentPerSec        uint64
}

type Win32_PerfRawData_W3SVC_WebService

type Win32_PerfRawData_W3SVC_WebService struct {
	Name string

	CurrentAnonymousUsers         uint32
	CurrentBlockedAsyncIORequests uint32
	CurrentCGIRequests            uint32
	CurrentConnections            uint32
	CurrentISAPIExtensionRequests uint32
	CurrentNonAnonymousUsers      uint32

	TotalBytesSent                      uint64
	TotalBytesReceived                  uint64
	TotalAnonymousUsers                 uint32
	TotalBlockedAsyncIORequests         uint32
	TotalCGIRequests                    uint32
	TotalConnectionAttemptsAllInstances uint32
	TotalCopyRequests                   uint32
	TotalDeleteRequests                 uint32
	TotalFilesReceived                  uint32
	TotalFilesSent                      uint32
	TotalGetRequests                    uint32
	TotalHeadRequests                   uint32
	TotalISAPIExtensionRequests         uint32
	TotalLockedErrors                   uint32
	TotalLockRequests                   uint32
	TotalLogonAttempts                  uint32
	TotalMethodRequests                 uint32
	TotalMethodRequestsPerSec           uint32
	TotalMkcolRequests                  uint32
	TotalMoveRequests                   uint32
	TotalNonAnonymousUsers              uint32
	TotalNotFoundErrors                 uint32
	TotalOptionsRequests                uint32
	TotalOtherRequestMethods            uint32
	TotalPostRequests                   uint32
	TotalPropfindRequests               uint32
	TotalProppatchRequests              uint32
	TotalPutRequests                    uint32
	TotalRejectedAsyncIORequests        uint32
	TotalSearchRequests                 uint32
	TotalTraceRequests                  uint32
	TotalUnlockRequests                 uint32
}

type Win32_PerfRawData_vmGuestLib_VCPU added in v0.2.4

type Win32_PerfRawData_vmGuestLib_VCPU struct {
	CpuLimitMHz           uint64
	CpuReservationMHz     uint64
	CpuShares             uint64
	CpuStolenMs           uint64
	CpuTimePercents       uint64
	EffectiveVMSpeedMHz   uint64
	HostProcessorSpeedMHz uint64
}

type Win32_PerfRawData_vmGuestLib_VMem added in v0.2.4

type Win32_PerfRawData_vmGuestLib_VMem struct {
	MemActiveMB      uint64
	MemBalloonedMB   uint64
	MemLimitMB       uint64
	MemMappedMB      uint64
	MemOverheadMB    uint64
	MemReservationMB uint64
	MemSharedMB      uint64
	MemSharedSavedMB uint64
	MemShares        uint64
	MemSwappedMB     uint64
	MemTargetSizeMB  uint64
	MemUsedMB        uint64
}

type Win32_Service added in v0.1.3

type Win32_Service struct {
	Name      string
	State     string
	StartMode string
}

Jump to

Keyboard shortcuts

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