monitoring

package
v0.0.0-...-565800d Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2016 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SNMounttable       = "mounttable"
	SNIdentity         = "identity service"
	SNMacaroon         = "macaroon service"
	SNBinaryDischarger = "binary discharger"
	SNRole             = "role service"
	SNProxy            = "proxy service"
	SNBenchmark        = "benchmark service"
)

Human-readable service names.

View Source
const (
	MNMounttableMountedServers = "mounttable mounted servers"
	MNMounttableNodes          = "mounttable nodes"
)

Human-readable metric names.

Variables

View Source
var ServiceLocationMap = map[string]*ServiceLocation{
	"/ns.dev.v.io:8101": &ServiceLocation{
		Instance: "vanadium-cell-master",
		Zone:     "us-central1-c",
	},
	"/ns.dev.v.io:8151": &ServiceLocation{
		Instance: "vanadium-cell-master",
		Zone:     "us-central1-c",
	},
	"/ns.dev.staging.v.io:8101": &ServiceLocation{
		Instance: "vanadium-cell-master",
		Zone:     "us-central1-c",
	},
	"/ns.dev.staging.v.io:8151": &ServiceLocation{
		Instance: "vanadium-cell-master",
		Zone:     "us-central1-c",
	},
}

Functions

func Authenticate

func Authenticate(keyFilePath string) (*cloudmonitoring.Service, error)

Authenticate authenticates with the given JSON credentials file (or the default client if the file is not provided). If successful, it returns a service object that can be used in GCM API calls.

func GetMetric

func GetMetric(name, project string) (*cloudmonitoring.MetricDescriptor, error)

GetMetric gets the custom metric descriptor with the given name and project.

func GetServiceMountedName

func GetServiceMountedName(namespaceRoot, serviceName string) (string, error)

GetServiceMountedName gets the full mounted name for the given service.

func GetSortedMetricNames

func GetSortedMetricNames() []string

GetSortedMetricNames gets the sorted metric names.

func ResolveAndProcessServiceName

func ResolveAndProcessServiceName(v23ctx *context.T, ctx *tool.Context, serviceName, serviceMountedName string) (map[string]naming.MountEntry, error)

ResolveAndProcessServiceName resolves the given service name and groups the result entries by their routing ids.

Types

type ServiceLocation

type ServiceLocation struct {
	Instance string
	Zone     string
}

func GetServiceLocation

func GetServiceLocation(v23ctx *context.T, ctx *tool.Context, me naming.MountEntry) (*ServiceLocation, error)

GetServiceLocation returns the given service's location (instance and zone). If the service is replicated, the instance name is the pod name.

To make it simpler and faster, we look up service's location in hard-coded "zone maps" for both non-replicated and replicated services.

type StatValue

type StatValue struct {
	Name  string
	Value interface{}
}

StatValue stores the name and the value returned from the GetStat function.

func GetStat

func GetStat(v23ctx *context.T, ctx *tool.Context, me naming.MountEntry, pattern string) ([]*StatValue, error)

GetStat gets the given stat using rpc.

func (*StatValue) GetFloat64Value

func (sv *StatValue) GetFloat64Value() (float64, error)

func (*StatValue) GetStringValue

func (sv *StatValue) GetStringValue() string

Jump to

Keyboard shortcuts

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