mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-28 15:46:36 +00:00
chore: Remove registry based perfdata collector (#1742)
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
@@ -105,7 +105,7 @@ func NewWithFlags(app *kingpin.Application) *Collector {
|
||||
return c
|
||||
}
|
||||
|
||||
func (c *Collector) Close(_ *slog.Logger) error {
|
||||
func (c *Collector) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -153,10 +153,6 @@ func (c *Collector) Build(_ *slog.Logger, miSession *mi.Session) error {
|
||||
|
||||
func (c *Collector) GetName() string { return Name }
|
||||
|
||||
func (c *Collector) GetPerfCounter(_ *slog.Logger) ([]string, error) {
|
||||
return []string{"Printer"}, nil
|
||||
}
|
||||
|
||||
type wmiPrinter struct {
|
||||
Name string `mi:"Name"`
|
||||
Default bool `mi:"Default"`
|
||||
@@ -169,7 +165,7 @@ type wmiPrintJob struct {
|
||||
Status string `mi:"Status"`
|
||||
}
|
||||
|
||||
func (c *Collector) Collect(_ *types.ScrapeContext, _ *slog.Logger, ch chan<- prometheus.Metric) error {
|
||||
func (c *Collector) Collect(ch chan<- prometheus.Metric) error {
|
||||
var errs []error
|
||||
|
||||
if err := c.collectPrinterStatus(ch); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user