Update spelling errors
This commit is contained in:
parent
7fda4c0761
commit
babcedf827
11
main.go
11
main.go
|
@ -4,7 +4,9 @@
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
@ -17,14 +19,15 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
|
"net/http"
|
||||||
|
"os"
|
||||||
|
|
||||||
|
"git.st8l.com/dolysis/cups-exporter/pkg"
|
||||||
"github.com/go-logr/logr"
|
"github.com/go-logr/logr"
|
||||||
"github.com/go-logr/zapr"
|
"github.com/go-logr/zapr"
|
||||||
"git.st8l.com/dolysis/cups-exporter/pkg"
|
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"net/http"
|
|
||||||
"os"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type options struct {
|
type options struct {
|
||||||
|
@ -60,7 +63,7 @@ func main() {
|
||||||
</body>
|
</body>
|
||||||
</html>`))
|
</html>`))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Info("An error occured while writing http response: %v", err)
|
log.Info("An error occurred while writing http response: %v", err)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ func (e *Exporter) jobsMetrics(ch chan<- prometheus.Metric) error {
|
||||||
if value <= 9 && value >= 3 {
|
if value <= 9 && value >= 3 {
|
||||||
states[value]++
|
states[value]++
|
||||||
} else {
|
} else {
|
||||||
e.log.Info("Unknow job state : " + strconv.Itoa(int(value)))
|
e.log.Info("Unknown job state : " + strconv.Itoa(int(value)))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
e.log.Info("job state attribute missing")
|
e.log.Info("job state attribute missing")
|
||||||
|
|
Loading…
Reference in New Issue