prometheus

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

* Copyright (c) 2023 NetLOX Inc * * 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

This section is empty.

Variables

View Source
var (
	ConntrackInfo []cmn.CtInfo
	EndPointInfo  []cmn.EndPointMod
	LBRuleInfo    []cmn.LbRuleMod

	ConntrackStats         map[ConntrackKey]Stats // Key [string] : sip dip pro sport dport
	PreFlowCounts          int
	PromethusDefaultPeriod = 10 * time.Second
	PromethusPartialPeriod = (PromethusDefaultPeriod / 6)
	PromethusLongPeriod    = (PromethusDefaultPeriod * 600) // To reset Period

)

Functions

func Init

func Init()

func Off added in v0.9.7

func Off() error

func PrometheusRegister

func PrometheusRegister(hook cmn.NetHookInterface)

func RunActiveConntrackCount

func RunActiveConntrackCount(ctx context.Context)

func RunGetConntrack

func RunGetConntrack(ctx context.Context)

func RunGetEndpoint

func RunGetEndpoint(ctx context.Context)

func RunGetLBRule

func RunGetLBRule(ctx context.Context)

func RunHostCount

func RunHostCount(ctx context.Context)

func RunLcusCalculator

func RunLcusCalculator(ctx context.Context)

func RunNewFlowCount

func RunNewFlowCount(ctx context.Context)

func RunProcessedStatistic

func RunProcessedStatistic(ctx context.Context)

func RunResetCounts

func RunResetCounts(ctx context.Context)

func TurnOn added in v0.9.7

func TurnOn() error

Types

type ConntrackKey

type ConntrackKey string

func MakeConntrackKey

func MakeConntrackKey(c cmn.CtInfo) (key ConntrackKey)

type Stats

type Stats struct {
	Bytes   uint64
	Packets uint64
}

Jump to

Keyboard shortcuts

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