Skip to content

Commit

Permalink
log unsuccessful message, without killing exporter process
Browse files Browse the repository at this point in the history
  • Loading branch information
wakeful committed Jan 23, 2018
1 parent 8eb8148 commit b12213f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pve_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,15 +305,15 @@ func (e Exporter) Collect(ch chan<- prometheus.Metric) {

if err := e.pve.Auth(); err != nil {
e.up.Set(0)
log.Fatal(err)
log.Errorln(err)
}

e.up.Set(1)
ch <- e.up

nodeList, err := e.pve.GetNodes()
if err != nil {
log.Fatalln(err)
log.Errorln(err)
} else {
for _, node := range nodeList {
ch <- prometheus.MustNewConstMetric(
Expand All @@ -337,7 +337,7 @@ func (e Exporter) Collect(ch chan<- prometheus.Metric) {

lxcList, err := e.pve.GetLxc(node.Name)
if err != nil {
log.Fatalln(err)
log.Errorln(err)
} else {
for _, lxc := range lxcList {

Expand Down

0 comments on commit b12213f

Please sign in to comment.