Skip to content

Commit

Permalink
collect BoresightAzimuthDeg and BoresightElevationDeg
Browse files Browse the repository at this point in the history
  • Loading branch information
dwillcocks committed Jul 26, 2021
1 parent 1e63677 commit 851899f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
3 changes: 0 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
Expand Down Expand Up @@ -459,8 +458,6 @@ google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0=
google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
google.golang.org/grpc v1.39.0 h1:Klz8I9kdtkIN6EpHHUOMLCYhTn/2WAe5a0s1hcBkdTI=
google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
Expand Down
22 changes: 22 additions & 0 deletions internal/exporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,18 @@ var (
nil, nil,
)

dishBoreSightAzimuthDeg = prometheus.NewDesc(
prometheus.BuildFQName(namespace, "dish", "bore_sight_azimuth_deg"),
"azimuth in degrees",
nil, nil,
)

dishBoreSightElevationDeg = prometheus.NewDesc(
prometheus.BuildFQName(namespace, "dish", "bore_sight_elevation_deg"),
"elevation in degrees",
nil, nil,
)

// collectDishObstructions
dishCurrentlyObstructed = prometheus.NewDesc(
prometheus.BuildFQName(namespace, "dish", "currently_obstructed"),
Expand Down Expand Up @@ -245,6 +257,8 @@ func (e *Exporter) Describe(ch chan<- *prometheus.Desc) {
ch <- dishSnr
ch <- dishUplinkThroughputBytes
ch <- dishDownlinkThroughputBytes
ch <- dishBoreSightAzimuthDeg
ch <- dishBoreSightElevationDeg

// collectDishObstructions
ch <- dishCurrentlyObstructed
Expand Down Expand Up @@ -392,6 +406,14 @@ func (e *Exporter) collectDishStatus(ch chan<- prometheus.Metric) bool {
dishDownlinkThroughputBytes, prometheus.GaugeValue, float64(dishStatus.GetDownlinkThroughputBps()),
)

ch <- prometheus.MustNewConstMetric(
dishBoreSightAzimuthDeg, prometheus.GaugeValue, float64(dishStatus.GetBoresightAzimuthDeg()),
)

ch <- prometheus.MustNewConstMetric(
dishBoreSightElevationDeg, prometheus.GaugeValue, float64(dishStatus.GetBoresightElevationDeg()),
)

return true
}

Expand Down

0 comments on commit 851899f

Please sign in to comment.