huawei_sensorPath

package module
v0.0.0-...-8759746 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 License: MIT Imports: 22 Imported by: 0

README

Huawei Telemetry Sensors

Este proyecto interpreta los mensajes de telemetria de los routers Huawei NE40E en V8R10

Sensores de Metricas

<Huawei>dis telemetry sensor-path | i Sample
Info: It will take a long time if the content you search is too much or the string you input is too long, you can press CTRL_C to break.
Sample(S) : Serial sample.
Sample(P) : Parallel sample.
Parallel sampled data may not be sent through UDP in out-of-band mode.
------------------------------------------------------------------------------------------------------------------
Type        MinPeriod(ms)  MaxEachPeriod  Path      
------------------------------------------------------------------------------------------------------------------
Sample(S)   10000          --             huawei-devm:devm/cpuInfos/cpuInfo - Probado Ok
Sample(S)   300000         --             huawei-devm:devm/fans/fan - Ok
Sample(S)   10000          --             huawei-devm:devm/memoryInfos/memoryInfo - Probado Ok
Sample(S)   300000         --             huawei-devm:devm/ports/port - Solo devuelve posicion y entIndex
Sample(S)   300000         --             huawei-devm:devm/ports/port/opticalInfo - Probado Ok
Sample(S)   300000         --             huawei-devm:devm/powerSupplys/powerSupply/powerEnvironments/powerEnvironment - Ok.
Sample(S)   300000         --             huawei-devm:devm/temperatureInfos/temperatureInfo - Ok
Sample(P)   300000         --             huawei-emdi:emdi/emdiTelemReps/emdiTelemRep -
Sample(P)   10000          --             huawei-emdi:emdi/emdiTelemRtps/emdiTelemRtp -
Sample(S)   10000          --             huawei-ifm:ifm/interfaces/interface - Solo devuelve AdminStatus si la interface esta UP. Sino solo index
Sample(P)   100            20             huawei-ifm:ifm/interfaces/interface/ifClearedStat - No Interesa
Sample(S)   10000          --             huawei-ifm:ifm/interfaces/interface/ifDynamicInfo - Devuelve el estado operativo de la interfaz
Sample(P)   100            20             huawei-ifm:ifm/interfaces/interface/ifStatistics - Probado ok
Sample(P)   1000           20             huawei-ifm:ifm/interfaces/interface/ifStatistics/ethPortErrSts - OK
Sample(S)   10000          --             huawei-mpls:mpls/mplsTe/rsvpTeTunnels/rsvpTeTunnel/tunnelPaths/tunnelPath - No hay RSVP
Sample(P)   1000           200            huawei-qos:qos/qosBuffers/qosBuffer - No da Informacion de metricas.
Sample(P)   100            20             huawei-qos:qos/qosIfQoss/qosIfQos/qosPolicyApplys/qosPolicyApply/qosPolicyStats/qosPolicyStat/qosRuleStats/qosRuleStat Da informacion de buffer por politica por puerto.
Sample(P)   1000           10             huawei-qos:qos/qosPortQueueStatInfos/qosPortQueueStatInfo - Probado Ok
Sample(S)   300000         --             huawei-trafficmng:trafficmng/tmSlotSFUs/tmSlotSFU/sfuStatisticss/sfuStatistics Probado Ok.
------------------------------------------------------------------------------------------------------------------

Sensor ISSUE

The NE40-X3/8/16A in VRP V8R10 sends the information of the sensor "huawei-qos:qos/qosPortQueueStatInfos/qosPortQueueStatInfo" misordered. The plugin not correct this input for future compatibility. Thats an ISSUE from Huawei so this is the information needed to use this plugin. Check if your device sends it correctly.

Sensor Queue Indication Real Queue
Null BE
AF2 AF1
AF3 AF2
AF4 AF3
BE AF4
CS6 EF
CS7 CS6
EF CS7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendTags

func AppendTags(k string, v string, tags map[string]string, path string) map[string]string

Append to the tags the telemetry values for position. @params: k - Key to evaluate v - Content of the Key tags - Global tags of the metric path - Telemetry path @returns original tag append the key if its a name Key.

func CreateMetrics

func CreateMetrics(grouper *metric.SeriesGrouper, tags map[string]string, timestamp time.Time, path string, subfield string, vals string)

Creates and add metrics from json mapped data in telegraf metrics SeriesGrouper @params:

  • grouper (*metric.SeriesGrouper) - pointer of metric series to append data.
  • tags (map[string]string) json data mapped
  • timestamp (time.Time) -
  • path (string) - sensor path
  • subfield (string) - subkey data. vals (string) - subkey content

func Find

func Find(a []string, x string) int

Search for a string in a string array.

@Params: a String Array
         x String to Search
@Returns: Returns the index location de x in a or -1 if not Found

func GetMessageType

func GetMessageType(path string) proto.Message

Returns the protoMessage of the sensor path.

Huawei have only a few sensors paths for metrics.
The sensors could be known with the command. "display telemetry sensor-path "
@params: path (string) - The head of the sensor path. Example: "huawei-ifm"
@returns: sensor-path proto message

func GetTypeValue

func GetTypeValue(path string) map[string]reflect.Type

Get the types of the Telemetry EndPoint @Params: a string with the telemetry complete path @Returns: a Map with keys and types of the endpoint

func LcFirst

func LcFirst(str string) string

Change the firts character of a string to Lowercase

func SearchKey

func SearchKey(Message *telemetry.TelemetryRowGPB, path string) ([]string, []string)

Search de keys and vals of the data row in telemetry message. @params: - Message (*TelemetryRowGPB) - data buffer GPB of sensor data - sensorType (string) - sensor-path group. @returns: - keys (string) - Keys of the fields - vals (string) - Vals of the fields

func UcFirst

func UcFirst(str string) string

Change the firts character of a string to Uppercase

Types

This section is empty.

Jump to

Keyboard shortcuts

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