activedirectoryinvreceiver

package module
v0.108.0-sumo-1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0, MIT Imports: 15 Imported by: 0

README

Windows Active Directory Inventory Receiver

Stability level: Alpha

A Windows Active Directory Inventory receiver collects inventory data from Active Directory. This includes information such as computer names, user names, email addresses, and location information. This receiver is only supported on Windows servers.

Supported pipeline types: logs

Configuration

receivers:
  active_directory_inv:
    # Base DN
    # default = ""
    # Base DN is a required field and cannot remain empty (default)
    base_dn: "CN=Users,DC=exampledomain,DC=com"

    # User attributes
    # default = [name, mail, department, manager, memberOf]
    attributes: [name, mail, department, manager, memberOf]

    # The polling interval.
    # default = 24h
    poll_interval: 24h

The full list of settings exposed for this receiver are documented in config.go.

Example configuration:

receivers:
  ## All my example logs
  active_directory_inv:
    base_dn: "CN=Users,DC=exampledomain,DC=com"
    attributes: [name, mail, department, manager, memberOf]
    poll_interval: 24h

exporters:
  debug:
    verbosity: detailed

service:
  telemetry:
    logs:
      level: "debug"
  pipelines:
    logs/syslog source:
      receivers:
        - active_directory_inv
      exporters:
        - debug

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Type = component.MustNewType(typeStr)

Functions

func CreateDefaultConfig

func CreateDefaultConfig() component.Config

CreateDefaultConfig creates the default configuration for the receiver

func NewFactory

func NewFactory() receiver.Factory

NewFactory creates a factory for Active Directory Inventory receiver

Types

type ADConfig

type ADConfig struct {
	BaseDN       string        `mapstructure:"base_dn"` // DN is the base distinguished name to search from
	Attributes   []string      `mapstructure:"attributes"`
	PollInterval time.Duration `mapstructure:"poll_interval"`
}

func (*ADConfig) Validate

func (c *ADConfig) Validate() error

Validate validates all portions of the relevant config

type ADObject

type ADObject struct {
	// contains filtered or unexported fields
}

ADObject is a wrapper for an Active Directory object

func (*ADObject) Attrs

func (o *ADObject) Attrs(key string) ([]interface{}, error)

Attrs returns the attributes of an Active Directory object

func (*ADObject) ToContainer

func (o *ADObject) ToContainer() (Container, error)

ToContainer converts an Active Directory object to an Active Directory container

type ADObjectIter

type ADObjectIter struct {
	// contains filtered or unexported fields
}

ADObjectIter is a wrapper for an Active Directory object iterator

func (*ADObjectIter) Close

func (o *ADObjectIter) Close()

Close closes an Active Directory object iterator

func (*ADObjectIter) Next

func (o *ADObjectIter) Next() (*adsi.Object, error)

Next returns the next Active Directory object in the iterator

type ADReceiver

type ADReceiver struct {
	// contains filtered or unexported fields
}

func (*ADReceiver) Shutdown

func (l *ADReceiver) Shutdown(_ context.Context) error

Shutdown the logs receiver

func (*ADReceiver) Start

func (l *ADReceiver) Start(ctx context.Context, _ component.Host) error

Start the logs receiver

type ADRuntimeInfo

type ADRuntimeInfo struct{}

ADRuntimeInfo is a wrapper for runtime information

func (*ADRuntimeInfo) SupportedOS

func (r *ADRuntimeInfo) SupportedOS() bool

SupportedOS returns whether the runtime is supported

type ADSIClient

type ADSIClient struct{}

ADSIClient is a wrapper for an Active Directory client

func (*ADSIClient) Open

func (c *ADSIClient) Open(path string, resourceLogs *plog.ResourceLogs) (Container, error)

Open an Active Directory container

type ADSIContainer

type ADSIContainer struct {
	// contains filtered or unexported fields
}

ADSIContainer is a wrapper for an Active Directory container

func (*ADSIContainer) Children

func (c *ADSIContainer) Children() (ObjectIter, error)

Children returns the children of an Active Directory container

func (*ADSIContainer) Close

func (c *ADSIContainer) Close()

Close closes an Active Directory container

func (*ADSIContainer) ToObject

func (c *ADSIContainer) ToObject() (Object, error)

ToObject converts an Active Directory container to an Active Directory object

type Client

type Client interface {
	Open(path string, resourceLogs *plog.ResourceLogs) (Container, error)
}

Client is an interface for an Active Directory client

type Container

type Container interface {
	ToObject() (Object, error)
	Close()
	Children() (ObjectIter, error)
}

Container is an interface for an Active Directory container

type Object

type Object interface {
	Attrs(key string) ([]interface{}, error)
	ToContainer() (Container, error)
}

Object is an interface for an Active Directory object

type ObjectIter

type ObjectIter interface {
	Next() (*adsi.Object, error)
	Close()
}

ObjectIter is an interface for an Active Directory object iterator

type RuntimeInfo

type RuntimeInfo interface {
	SupportedOS() bool
}

RuntimeInfo is an interface for runtime information

Jump to

Keyboard shortcuts

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