prometheus

package
v0.0.0-...-927e444 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Copyright 2018 The JIMDB Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

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

View Source
const Name = "prometheus"

Variables

This section is empty.

Functions

func New

func New() monitoring.Monitor

Types

type EmptyAlarm

type EmptyAlarm struct {
}

func (*EmptyAlarm) Alarm

func (a *EmptyAlarm) Alarm(string)

type MKey

type MKey struct {
	Namespace string
	Subsystem string
	Name      string
}

type Monitor

type Monitor struct {
	// contains filtered or unexported fields
}

func (*Monitor) Alive

func (m *Monitor) Alive()

func (*Monitor) GetAlarm

func (m *Monitor) GetAlarm(nameSpace, subSystem, name string, lvs ...string) monitoring.Alarm

func (*Monitor) GetCluster

func (m *Monitor) GetCluster() string

func (*Monitor) GetCounter

func (m *Monitor) GetCounter(nameSpace, subSystem, name string, lvs ...string) monitoring.Counter

func (*Monitor) GetGauge

func (m *Monitor) GetGauge(nameSpace, subSystem, name string, lvs ...string) monitoring.Gauge

func (*Monitor) GetInstance

func (m *Monitor) GetInstance() string

func (*Monitor) GetPushGatewayUrl

func (m *Monitor) GetPushGatewayUrl() string

func (*Monitor) Init

func (m *Monitor) Init(cluster, instance string, pushGateway string, pushInterval time.Duration)

func (*Monitor) Push

func (m *Monitor) Push()

func (*Monitor) RegisterCounter

func (m *Monitor) RegisterCounter(nameSpace, subSystem, name string, labelNames []string)

register must call before Start()

func (*Monitor) RegisterGauge

func (m *Monitor) RegisterGauge(nameSpace, subSystem, name string, labelNames []string)

func (*Monitor) Start

func (m *Monitor) Start()

after start(), call register will panic

func (*Monitor) Stop

func (m *Monitor) Stop()

Jump to

Keyboard shortcuts

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