prometheus

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 9 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 PrometheusRegister

func PrometheusRegister(hook cmn.NetHookInterface)

func RunActiveConntrackCount

func RunActiveConntrackCount()

func RunGetConntrack

func RunGetConntrack()

func RunGetEndpoint

func RunGetEndpoint()

func RunGetLBRule

func RunGetLBRule()

func RunHostCount

func RunHostCount()

func RunLcusCalculator

func RunLcusCalculator()

func RunNewFlowCount

func RunNewFlowCount()

func RunProcessedStatistic

func RunProcessedStatistic()

func RunResetCounts

func RunResetCounts()

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