No description
Find a file
Kumi a96c9d88b7
Refactor printerMetrics function to use int instead of int8 for printer states
- Replace int8 with int in the states map
- Cast the printer state values to int when updating the states map
- Update the metrics values to use int(ipp.PrinterState<state>) with the corresponding state names as labels
2023-09-03 09:19:56 +02:00
internal Refactor printerMetrics function to use int instead of int8 for printer states 2023-09-03 09:19:56 +02:00
.gitignore initial commit2 2019-12-26 21:52:54 +01:00
go.mod updated dependencies 2023-04-30 23:22:42 +02:00
go.sum updated dependencies 2023-04-30 23:22:42 +02:00
LICENSE initial commit2 2019-12-26 21:52:54 +01:00
main.go updated dependencies 2023-04-30 23:22:42 +02:00
README.md initial commit2 2019-12-26 21:52:54 +01:00

Prometheus CUPS Exporter

Version Licence

Prometheus exporter for CUPS server

Build

go build -o cups_exporter main.go

Running

By default the cups_exporter serves on port 0.0.0.0:9628 at /metrics. The cups server is specified by the cups.uri flag (default: https://localhost:631).

Examples:

./cups_exporter # use defaults
./cups_exporter -cups.uri https://exporter:prometheus@mycups.foo.bar:631 # scrape remote server with basic auth

Metrics

Metric Meaning Labels
up Was the last scrape of cups successful
cups_job_active_total Number of current print jobs
cups_job_total Total number of print jobs
cups_printer_state_total Number of printers per state state
cups_printer_total Number of available printers
cups_scrape_duration_seconds Duration of the last scrape in seconds

Licence

Apache Licence Version 2.0