akcp

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoStatus     snsrStts = 1
	Normal       snsrStts = 2
	HighWarning  snsrStts = 3
	HighCritical snsrStts = 4
	LowWarning   snsrStts = 5
	LowCritical  snsrStts = 6
	SensorError  snsrStts = 7
)
View Source
const (
	SensorProbeType     = 1
	SecurityProbeType   = 2
	SensorProbePlusType = 3
)

Variables

This section is empty.

Functions

func GetIDsFromHumidityTable

func GetIDsFromHumidityTable(params *gosnmp.GoSNMP, deviceType int) (sensors []string, err error)

func GetIDsFromTemperatureTable

func GetIDsFromTemperatureTable(params *gosnmp.GoSNMP, deviceType int) (sensors []string, err error)

Fetches the IDs of all temperature sensors in the temperature table

func GetSensorTypeInt

func GetSensorTypeInt(typeString string, deviceType int) (uint32, error)

func GetSensorsIDsFromTable

func GetSensorsIDsFromTable(params *gosnmp.GoSNMP, tableOID string) (sensors []string, err error)

func QuerySensorList

func QuerySensorList(params *gosnmp.GoSNMP, deviceType int) (sensors []string, err error)

Fetches the IDs of all sensors This ID consists of four positive integers, separated by dots (aka usable as an OID)

func ValueIEEE754ToFloat64

func ValueIEEE754ToFloat64(pdu gosnmp.SnmpPDU) (float64, error)

func ValueToString

func ValueToString(pdu gosnmp.SnmpPDU) string

func ValueToUint64

func ValueToUint64(pdu gosnmp.SnmpPDU) (uint64, error)

Types

type MayThreshold

type MayThreshold struct {
	Present bool
	Val     check.Threshold
}

type SensorDetails

type SensorDetails struct {
	SensorType   uint64
	Name         string
	Value        float64
	Unit         string
	Status       snsrStts
	Acknowledged bool
	Warning      MayThreshold
	Critical     MayThreshold
	Description  string
}

func QueryHumidityTable

func QueryHumidityTable(snmp *gosnmp.GoSNMP, deviceType int) ([]SensorDetails, error)

nolint: gocognit

func QuerySensorDetails

func QuerySensorDetails(params *gosnmp.GoSNMP, sensorIndex string, deviceType int) (SensorDetails, error)

func QueryTemperatureTable

func QueryTemperatureTable(snmp *gosnmp.GoSNMP, deviceType int) ([]SensorDetails, error)

nolint: gocognit

type SensorType

type SensorType uint64

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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