mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-10-24 21:49:04 +02:00
collector: publish base units and _total counter names (#2743)
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
@@ -151,8 +151,8 @@ func (c *Collector) Build(_ *slog.Logger, _ *mi.Session) error {
|
||||
nil,
|
||||
)
|
||||
c.printerJobCount = prometheus.NewDesc(
|
||||
prometheus.BuildFQName(types.Namespace, Name, "job_count"),
|
||||
"Number of jobs processed by the printer since the last reset",
|
||||
prometheus.BuildFQName(types.Namespace, Name, "jobs"),
|
||||
"Number of jobs in the queue of the printer",
|
||||
[]string{"printer"},
|
||||
nil,
|
||||
)
|
||||
@@ -190,7 +190,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric, _ time.Duration) error
|
||||
// Win32_Printer JobCountSinceLastReset is PRINTER_INFO_2.cJobs, the number of queued jobs.
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.printerJobCount,
|
||||
prometheus.CounterValue,
|
||||
prometheus.GaugeValue,
|
||||
float64(printer.Jobs),
|
||||
printer.Name,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user