Documentation ¶
Overview ¶
Package service implements a Metricbeat metricset for reading Windows Services
Index ¶
- Variables
- func CloseServiceDatabaseHandle(handle ServiceDatabaseHandle) error
- func CloseServiceHandle(handle ServiceHandle) error
- func New(base mb.BaseMetricSet) (mb.MetricSet, error)
- type EnumServiceStatusProcess
- type MetricSet
- type ProcessAccessRight
- type ProcessHandle
- type QueryServiceConfig
- type ServiceAccessRight
- type ServiceDatabaseHandle
- type ServiceEnumState
- type ServiceErrno
- type ServiceErrorControl
- type ServiceHandle
- type ServiceInfoLevel
- type ServiceReader
- type ServiceSCMAccessRight
- type ServiceStartType
- type ServiceState
- type ServiceStatus
- type ServiceStatusProcess
- type ServiceType
Constants ¶
This section is empty.
Variables ¶
View Source
var InvalidServiceDatabaseHandle = ^ServiceDatabaseHandle(0)
View Source
var InvalidServiceHandle = ^ServiceHandle(0)
Functions ¶
func CloseServiceDatabaseHandle ¶
func CloseServiceDatabaseHandle(handle ServiceDatabaseHandle) error
func CloseServiceHandle ¶
func CloseServiceHandle(handle ServiceHandle) error
Types ¶
type EnumServiceStatusProcess ¶
type EnumServiceStatusProcess struct { LpServiceName *int8 LpDisplayName *int8 ServiceStatusProcess ServiceStatusProcess Pad_cgo_0 [4]byte }
type MetricSet ¶
type MetricSet struct { mb.BaseMetricSet // contains filtered or unexported fields }
MetricSet type defines all fields of the MetricSet As a minimum it must inherit the mb.BaseMetricSet fields, but can be extended with additional entries. These variables can be used to persist data or configuration between multiple fetch calls.
type ProcessAccessRight ¶
type ProcessAccessRight uint32
const ( ProcessAllAccess ProcessAccessRight = 0x1f0fff ProcessCreateProcess ProcessAccessRight = 0x80 ProcessCreateThread ProcessAccessRight = 0x2 ProcessDupHandle ProcessAccessRight = 0x40 ProcessQueryInformation ProcessAccessRight = 0x400 ProcessQueryLimitInformation ProcessAccessRight = 0x1000 ProcessSetInformation ProcessAccessRight = 0x200 ProcessSetQuota ProcessAccessRight = 0x100 ProcessSuspendResume ProcessAccessRight = 0x800 ProcessTerminate ProcessAccessRight = 0x1 ProcessVmOperation ProcessAccessRight = 0x8 ProcessVmRead ProcessAccessRight = 0x10 ProcessVmWrite ProcessAccessRight = 0x20 ProcessSynchronize ProcessAccessRight = 0x100000 )
type ProcessHandle ¶
type ProcessHandle uintptr
type QueryServiceConfig ¶
type ServiceAccessRight ¶
type ServiceAccessRight uint32
const ( ServiceAllAccess ServiceAccessRight = 0xf01ff ServcieChangeConfig ServiceAccessRight = 0x2 ServiceEnumerateDependents ServiceAccessRight = 0x8 ServiceInterrogate ServiceAccessRight = 0x80 ServicePauseContinue ServiceAccessRight = 0x40 ServiceQueryConfig ServiceAccessRight = 0x1 ServiceQueryStatus ServiceAccessRight = 0x4 ServiceStart ServiceAccessRight = 0x10 ServiceStop ServiceAccessRight = 0x20 ServiceUserDefinedControl ServiceAccessRight = 0x100 )
type ServiceDatabaseHandle ¶
type ServiceDatabaseHandle uintptr
func OpenSCManager ¶
func OpenSCManager(machineName string, databaseName string, desiredAccess ServiceSCMAccessRight) (ServiceDatabaseHandle, error)
type ServiceEnumState ¶
type ServiceEnumState uint32
const ( ServiceActive ServiceEnumState = 0x1 ServiceInActive ServiceEnumState = 0x2 ServiceStateAll ServiceEnumState = 0x3 )
type ServiceErrno ¶
type ServiceErrno uintptr
const ( SERVICE_ERROR_ACCESS_DENIED ServiceErrno = 0x5 SERVICE_ERROR_MORE_DATA ServiceErrno = 0xea SERVICE_ERROR_INVALID_PARAMETER ServiceErrno = 0x57 SERVICE_ERROR_INVALID_HANDLE ServiceErrno = 0x6 SERVICE_ERROR_INVALID_LEVEL ServiceErrno = 0x7c SERVICE_ERROR_INVALID_NAME ServiceErrno = 0x7b SERVICE_ERROR_SHUTDOWN_IN_PROGRESS ServiceErrno = 0x45b SERVICE_ERROR_DATABASE_DOES_NOT_EXIST ServiceErrno = 0x429 SERVICE_ERROR_INSUFFICIENT_BUFFER ServiceErrno = 0x7a SERVICE_ERROR_SERVICE_DOES_NOT_EXIST ServiceErrno = 0x424 )
const ( SERVICE_ERROR_CRITICAL ServiceErrno = 0x3 SERVICE_ERROR_IGNORE ServiceErrno = 0x0 SERVICE_ERROR_NORMAL ServiceErrno = 0x1 SERVICE_ERROR_SEVERE ServiceErrno = 0x2 )
func (ServiceErrno) Error ¶
func (e ServiceErrno) Error() string
type ServiceErrorControl ¶
type ServiceErrorControl uint32
type ServiceHandle ¶
type ServiceHandle uintptr
func OpenService ¶
func OpenService(handle ServiceDatabaseHandle, serviceName string, desiredAccess ServiceAccessRight) (ServiceHandle, error)
type ServiceInfoLevel ¶
type ServiceInfoLevel uint32
const (
ScEnumProcessInfo ServiceInfoLevel = 0x0
)
type ServiceReader ¶
type ServiceReader struct {
// contains filtered or unexported fields
}
func NewServiceReader ¶
func NewServiceReader() (*ServiceReader, error)
func (*ServiceReader) Close ¶
func (reader *ServiceReader) Close() error
type ServiceSCMAccessRight ¶
type ServiceSCMAccessRight uint32
const ( ScManagerAllAccess ServiceSCMAccessRight = 0xf003f ScManagerConnect ServiceSCMAccessRight = 0x1 ScManagerEnumerateService ServiceSCMAccessRight = 0x4 ScManagerQueryLockStatus ServiceSCMAccessRight = 0x10 )
type ServiceStartType ¶
type ServiceStartType uint32
const ( ServiceAutoStart ServiceStartType = 0x2 ServiceBootStart ServiceStartType = 0x0 ServiceDemandStart ServiceStartType = 0x3 ServiceDisabled ServiceStartType = 0x4 ServiceSystemStart ServiceStartType = 0x1 )
type ServiceState ¶
type ServiceState uint32
const ( ServiceContinuePending ServiceState = 0x5 ServicePausePending ServiceState = 0x6 ServicePaused ServiceState = 0x7 ServiceRunning ServiceState = 0x4 ServiceStartPending ServiceState = 0x2 ServiceStopPending ServiceState = 0x3 ServiceStopped ServiceState = 0x1 )
func (ServiceState) String ¶
func (state ServiceState) String() string
type ServiceStatus ¶
type ServiceStatusProcess ¶
type ServiceType ¶
type ServiceType uint32
const ( ServiceDriver ServiceType = 0xb ServiceFileSystemDriver ServiceType = 0x2 ServiceKernelDriver ServiceType = 0x1 ServiceWin32 ServiceType = 0x30 ServiceWin32OwnProcess ServiceType = 0x10 ServiceInteractiveProcess ServiceType = 0x100 )
Click to show internal directories.
Click to hide internal directories.