Skip to content

Commit

Permalink
Merge pull request #3 from herci85/main
Browse files Browse the repository at this point in the history
Fixed Blockchainheight and Status
  • Loading branch information
pperzyna authored Apr 2, 2022
2 parents 1316cae + 96834ff commit 3d4e2da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ func (e *Exporter) scrape(ch chan<- prometheus.Metric) (up float64) {
ch <- prometheus.MustNewConstMetric(e.bobcatStatus.Desc(), prometheus.GaugeValue, parseStatus(status.Status))
ch <- prometheus.MustNewConstMetric(e.bobcatStatusGap.Desc(), prometheus.GaugeValue, parseString(status.Gap))
ch <- prometheus.MustNewConstMetric(e.bobcatStatusMinerHeight.Desc(), prometheus.GaugeValue, parseString(status.MinerHeight))
ch <- prometheus.MustNewConstMetric(e.bobcatStatusBlockchainHeight.Desc(), prometheus.GaugeValue, parseString(status.MinerHeight))
ch <- prometheus.MustNewConstMetric(e.bobcatStatusBlockchainHeight.Desc(), prometheus.GaugeValue, parseString(status.BlockchainHeight))
ch <- prometheus.MustNewConstMetric(e.bobcatStatusEpoch.Desc(), prometheus.GaugeValue, parseString(status.Epoch))

// ENDPOINT: /temp.json
Expand Down Expand Up @@ -237,7 +237,7 @@ func parseTemperature(str string) (float64) {
}

func parseStatus(str string) (float64) {
if(str == "synced") {
if(str == "Synced") {
return 1;
}
return 0
Expand Down

0 comments on commit 3d4e2da

Please sign in to comment.