monitoring

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2025 License: AGPL-3.0, MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

func NewAPI

func NewAPI(logger zerolog.Logger) *API

func (*API) RegisterEndpoints

func (a *API) RegisterEndpoints(router *http.ServeMux)

type Collector

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

func NewCollector

func NewCollector(url string) *Collector

func (*Collector) Collect

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

func (*Collector) Describe

func (c *Collector) Describe(ch chan<- *prometheus.Desc)

type LDAPMonitorWatcher

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

func NewLDAPMonitorWatcher

func NewLDAPMonitorWatcher(ldap LDAPServerInterface, monitor MonitorInterface, logger *zerolog.Logger) *LDAPMonitorWatcher

type LDAPServerAdapter added in v2.5.0

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

LDAPServerAdapter wraps ldap.Server to implement LDAPServerInterface without copying mutexes in the Stats struct

func NewLDAPServerAdapter added in v2.5.0

func NewLDAPServerAdapter(server *ldap.Server) *LDAPServerAdapter

NewLDAPServerAdapter creates a new adapter for ldap.Server

func (*LDAPServerAdapter) GetStats added in v2.5.0

func (a *LDAPServerAdapter) GetStats() StatsData

GetStats implements LDAPServerInterface.GetStats Returns stats data without the mutex to avoid copying issues

func (*LDAPServerAdapter) SetStats added in v2.5.0

func (a *LDAPServerAdapter) SetStats(enabled bool)

SetStats implements LDAPServerInterface.SetStats

type LDAPServerInterface

type LDAPServerInterface interface {
	SetStats(bool)
	GetStats() StatsData
}

type Monitor

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

func NewMonitor

func NewMonitor(logger *zerolog.Logger) *Monitor

func (*Monitor) SetLDAPMetric

func (m *Monitor) SetLDAPMetric(tags map[string]string, value float64) error

func (*Monitor) SetResponseTimeMetric

func (m *Monitor) SetResponseTimeMetric(tags map[string]string, value float64) error

type MonitorInterface

type MonitorInterface interface {
	SetResponseTimeMetric(map[string]string, float64) error
	SetLDAPMetric(map[string]string, float64) error
}

type StatsData added in v2.5.0

type StatsData struct {
	Conns    int
	Binds    int
	Unbinds  int
	Searches int
}

StatsData represents the stats data without mutex

Jump to

Keyboard shortcuts

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