Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BuildersWithFlags = map[string]BuilderWithFlags[Collector]{ ad.Name: NewBuilderWithFlags(ad.NewWithFlags), adcs.Name: NewBuilderWithFlags(adcs.NewWithFlags), adfs.Name: NewBuilderWithFlags(adfs.NewWithFlags), cache.Name: NewBuilderWithFlags(cache.NewWithFlags), container.Name: NewBuilderWithFlags(container.NewWithFlags), cpu.Name: NewBuilderWithFlags(cpu.NewWithFlags), cpu_info.Name: NewBuilderWithFlags(cpu_info.NewWithFlags), cs.Name: NewBuilderWithFlags(cs.NewWithFlags), dfsr.Name: NewBuilderWithFlags(dfsr.NewWithFlags), dhcp.Name: NewBuilderWithFlags(dhcp.NewWithFlags), diskdrive.Name: NewBuilderWithFlags(diskdrive.NewWithFlags), dns.Name: NewBuilderWithFlags(dns.NewWithFlags), exchange.Name: NewBuilderWithFlags(exchange.NewWithFlags), filetime.Name: NewBuilderWithFlags(filetime.NewWithFlags), fsrmquota.Name: NewBuilderWithFlags(fsrmquota.NewWithFlags), hyperv.Name: NewBuilderWithFlags(hyperv.NewWithFlags), iis.Name: NewBuilderWithFlags(iis.NewWithFlags), license.Name: NewBuilderWithFlags(license.NewWithFlags), logical_disk.Name: NewBuilderWithFlags(logical_disk.NewWithFlags), logon.Name: NewBuilderWithFlags(logon.NewWithFlags), memory.Name: NewBuilderWithFlags(memory.NewWithFlags), mscluster.Name: NewBuilderWithFlags(mscluster.NewWithFlags), msmq.Name: NewBuilderWithFlags(msmq.NewWithFlags), mssql.Name: NewBuilderWithFlags(mssql.NewWithFlags), net.Name: NewBuilderWithFlags(net.NewWithFlags), netframework.Name: NewBuilderWithFlags(netframework.NewWithFlags), nps.Name: NewBuilderWithFlags(nps.NewWithFlags), os.Name: NewBuilderWithFlags(os.NewWithFlags), perfdata.Name: NewBuilderWithFlags(perfdata.NewWithFlags), physical_disk.Name: NewBuilderWithFlags(physical_disk.NewWithFlags), printer.Name: NewBuilderWithFlags(printer.NewWithFlags), process.Name: NewBuilderWithFlags(process.NewWithFlags), remote_fx.Name: NewBuilderWithFlags(remote_fx.NewWithFlags), scheduled_task.Name: NewBuilderWithFlags(scheduled_task.NewWithFlags), service.Name: NewBuilderWithFlags(service.NewWithFlags), smb.Name: NewBuilderWithFlags(smb.NewWithFlags), smbclient.Name: NewBuilderWithFlags(smbclient.NewWithFlags), smtp.Name: NewBuilderWithFlags(smtp.NewWithFlags), system.Name: NewBuilderWithFlags(system.NewWithFlags), tcp.Name: NewBuilderWithFlags(tcp.NewWithFlags), terminal_services.Name: NewBuilderWithFlags(terminal_services.NewWithFlags), textfile.Name: NewBuilderWithFlags(textfile.NewWithFlags), thermalzone.Name: NewBuilderWithFlags(thermalzone.NewWithFlags), time.Name: NewBuilderWithFlags(time.NewWithFlags), update.Name: NewBuilderWithFlags(update.NewWithFlags), vmware.Name: NewBuilderWithFlags(vmware.NewWithFlags), }
View Source
var ConfigDefaults = Config{ AD: ad.ConfigDefaults, ADCS: adcs.ConfigDefaults, ADFS: adfs.ConfigDefaults, Cache: cache.ConfigDefaults, Container: container.ConfigDefaults, CPU: cpu.ConfigDefaults, CPUInfo: cpu_info.ConfigDefaults, Cs: cs.ConfigDefaults, DFSR: dfsr.ConfigDefaults, Dhcp: dhcp.ConfigDefaults, DiskDrive: diskdrive.ConfigDefaults, DNS: dns.ConfigDefaults, Exchange: exchange.ConfigDefaults, Filetime: filetime.ConfigDefaults, Fsrmquota: fsrmquota.ConfigDefaults, HyperV: hyperv.ConfigDefaults, IIS: iis.ConfigDefaults, License: license.ConfigDefaults, LogicalDisk: logical_disk.ConfigDefaults, Logon: logon.ConfigDefaults, Memory: memory.ConfigDefaults, MSCluster: mscluster.ConfigDefaults, Msmq: msmq.ConfigDefaults, Mssql: mssql.ConfigDefaults, Net: net.ConfigDefaults, NetFramework: netframework.ConfigDefaults, Nps: nps.ConfigDefaults, OS: os.ConfigDefaults, PerfData: perfdata.ConfigDefaults, PhysicalDisk: physical_disk.ConfigDefaults, Printer: printer.ConfigDefaults, Process: process.ConfigDefaults, RemoteFx: remote_fx.ConfigDefaults, ScheduledTask: scheduled_task.ConfigDefaults, Service: service.ConfigDefaults, SMB: smb.ConfigDefaults, SMBClient: smbclient.ConfigDefaults, SMTP: smtp.ConfigDefaults, System: system.ConfigDefaults, TCP: tcp.ConfigDefaults, TerminalServices: terminal_services.ConfigDefaults, Textfile: textfile.ConfigDefaults, ThermalZone: thermalzone.ConfigDefaults, Time: time.ConfigDefaults, Update: update.ConfigDefaults, Vmware: vmware.ConfigDefaults, }
ConfigDefaults Is an interface to be used by the external libraries. It holds all ConfigDefaults form all collectors
Functions ¶
Types ¶
type BuilderWithFlags ¶ added in v0.27.0
type BuilderWithFlags[C Collector] func(*kingpin.Application) C
func NewBuilderWithFlags ¶ added in v0.28.0
func NewBuilderWithFlags[C Collector](fn BuilderWithFlags[C]) BuilderWithFlags[Collector]
type Collector ¶ added in v0.27.0
type Collector interface { Build(logger *slog.Logger, miSession *mi.Session) error // Close closes the collector Close(logger *slog.Logger) error // GetName get the name of the collector GetName() string // GetPerfCounter returns the perf counter required by the collector GetPerfCounter(logger *slog.Logger) ([]string, error) // Collect Get new metrics and expose them via prometheus registry. Collect(ctx *types.ScrapeContext, logger *slog.Logger, ch chan<- prometheus.Metric) (err error) }
Collector interface that a collector has to implement.
type Config ¶
type Config struct { AD ad.Config `yaml:"ad"` ADCS adcs.Config `yaml:"adcs"` ADFS adfs.Config `yaml:"adfs"` Cache cache.Config `yaml:"cache"` Container container.Config `yaml:"container"` CPU cpu.Config `yaml:"cpu"` CPUInfo cpu_info.Config `yaml:"cpu_info"` Cs cs.Config `yaml:"cs"` DFSR dfsr.Config `yaml:"dfsr"` Dhcp dhcp.Config `yaml:"dhcp"` DiskDrive diskdrive.Config `yaml:"disk_drive"` DNS dns.Config `yaml:"dns"` Exchange exchange.Config `yaml:"exchange"` Filetime filetime.Config `yaml:"filetime"` Fsrmquota fsrmquota.Config `yaml:"fsrmquota"` HyperV hyperv.Config `yaml:"hyper_v"` IIS iis.Config `yaml:"iis"` License license.Config `yaml:"license"` LogicalDisk logical_disk.Config `yaml:"logical_disk"` Logon logon.Config `yaml:"logon"` Memory memory.Config `yaml:"memory"` MSCluster mscluster.Config `yaml:"ms_cluster"` Msmq msmq.Config `yaml:"msmq"` Mssql mssql.Config `yaml:"mssql"` Net net.Config `yaml:"net"` NetFramework netframework.Config `yaml:"net_framework"` Nps nps.Config `yaml:"nps"` OS os.Config `yaml:"os"` PerfData perfdata.Config `yaml:"perf_data"` PhysicalDisk physical_disk.Config `yaml:"physical_disk"` Printer printer.Config `yaml:"printer"` Process process.Config `yaml:"process"` RemoteFx remote_fx.Config `yaml:"remote_fx"` ScheduledTask scheduled_task.Config `yaml:"scheduled_task"` Service service.Config `yaml:"service"` SMB smb.Config `yaml:"smb"` SMBClient smbclient.Config `yaml:"smb_client"` SMTP smtp.Config `yaml:"smtp"` System system.Config `yaml:"system"` TCP tcp.Config `yaml:"tcp"` TerminalServices terminal_services.Config `yaml:"terminal_services"` Textfile textfile.Config `yaml:"textfile"` ThermalZone thermalzone.Config `yaml:"thermal_zone"` Time time.Config `yaml:"time"` Update update.Config `yaml:"update"` Vmware vmware.Config `yaml:"vmware"` }
type MetricCollectors ¶ added in v0.29.0
Click to show internal directories.
Click to hide internal directories.