Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when trying to query metrics #1

Open
floribe2000 opened this issue Feb 26, 2024 · 0 comments
Open

Crash when trying to query metrics #1

floribe2000 opened this issue Feb 26, 2024 · 0 comments

Comments

@floribe2000
Copy link

Cups Exporter crashes when we try to query the metrics.
Operating system: Arch Linux (Rolling Release)
Cups version: 2.4.7-2
cups_exporter: latest source available at this time
go version: 1.22.0

We get the following error message:

panic: interface conversion: interface {} is int, not int8

goroutine 14 [running]:
github.com/phin1x/cups-exporter/internal.(*Exporter).printerMetrics(0xc00007a120, 0xc00007a540)
        .../cups_exporter/internal/printers.go:22 +0x5e5
github.com/phin1x/cups-exporter/internal.(*Exporter).Collect(0xc00007a120, 0xc00007a540)
        .../cups_exporter/internal/exporter.go:110 +0xbc
github.com/prometheus/client_golang/prometheus.(*Registry).Gather.func1()
       .../go/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:455 +0x105
created by github.com/prometheus/client_golang/prometheus.(*Registry).Gather in goroutine 10
        .../go/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:547 +0xbab

I replaced the paths from my local system with ... in the error log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant