metrics

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2020 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Copyright 2020 The Magma Authors.

This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	ActiveGatewayChanged = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "active_gateway_changed_total",
			Help: "increases everytime the active gateway for a network is updated",
		},
		[]string{metrics.NetworkLabelName},
	)
	TotalGatewayCount = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Name: "gateway_total_count",
			Help: "Total number of gateways that are in the network"},
		[]string{metrics.NetworkLabelName},
	)
	HealthyGatewayCount = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Name: "gateway_health_count",
			Help: "Number of gateways that are healthy in the network"},
		[]string{metrics.NetworkLabelName},
	)
)

Functions

func SetHealthyGatewayMetric

func SetHealthyGatewayMetric(networkID string, gwHealth1, gwHealth2 protos.HealthStatus_HealthState)

SetHealthyGatewayMetric takes the current health of both active and standby gateways in a network and sets the prometheus gauge metric for number of healthy gateways accordingly. Note: Prometheus gauge metric Set's are done with the atomic operation StoreUint64

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL