Skip to content

Commit

Permalink
Merge pull request #7 from ties/fix/correct-url-in-metric
Browse files Browse the repository at this point in the history
Use the correct url in prometheus label
  • Loading branch information
job authored Jun 18, 2021
2 parents f384479 + 968a225 commit 4b72128
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions cmd/rtrmon/rtrmon.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import (
"errors"
"flag"
"fmt"
rtr "github.com/bgp/stayrtr/lib"
"github.com/bgp/stayrtr/prefixfile"
"github.com/bgp/stayrtr/utils"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
log "github.com/sirupsen/logrus"
"golang.org/x/crypto/ssh"
"io/ioutil"
"net"
"net/http"
Expand All @@ -22,6 +15,14 @@ import (
"runtime"
"sync"
"time"

rtr "github.com/bgp/stayrtr/lib"
"github.com/bgp/stayrtr/prefixfile"
"github.com/bgp/stayrtr/utils"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
log "github.com/sirupsen/logrus"
"golang.org/x/crypto/ssh"
)

const (
Expand Down Expand Up @@ -583,14 +584,14 @@ func (c *Comparator) Compare() {
VRPCount.With(
prometheus.Labels{
"server": "secondary",
"url": md1.URL,
"url": md2.URL,
"type": "total",
}).Set(float64(len(vrps2)))

VRPCount.With(
prometheus.Labels{
"server": "secondary",
"url": md1.URL,
"url": md2.URL,
"type": "diff",
}).Set(float64(len(onlyIn2)))

Expand Down

0 comments on commit 4b72128

Please sign in to comment.