cisco_telemetry_gnmi

package
v0.0.0-...-37ae9a4 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

README

Cisco GNMI telemetry

Cisco GNMI telemetry is an input plugin that consumes telemetry data according to the GNMI specification. This GRPC-based protocol can utilize TLS for authentication and encryption.

This plugin has been developed to support GNMI telemetry as produced by Cisco IOS XR (64-bit) version 6.5.1 and later.

Configuration:

This is a sample configuration for the plugin.

[[inputs.cisco_telemetry_gnmi]]
  ## Address and port of the GNMI GRPC server
  service_address = "10.49.234.114:57777"
  
  ## define credentials
  username = "cisco"
  password = "cisco"

  ## redial in case of failures after
  redial = "10s"

  ## enable client-side TLS and define CA to authenticate the device
  # tls = true
  # tls_ca = "/etc/telegraf/ca.pem"
  # insecure_skip_verify = true

  ## define client-side TLS certificate & key to authenticate to the device
  # tls_cert = "/etc/telegraf/cert.pem"
  # tls_key = "/etc/telegraf/key.pem"

  [[inputs.cisco_telemetry_gnmi.subscription]]
    origin = "Cisco-IOS-XR-infra-statsd-oper"
    path = "infra-statistics/interfaces/interface/latest/generic-counters"

    # Subscription mode (one of: "target_defined", "sample", "on_change") and interval
    subscription_mode = "sample"
    sample_interval = "10s"

    ## Suppress redundant transmissions when measured values are unchanged
    # suppress_redundant = false

    ## If suppression is enabled, send updates at least every X seconds anyway
    # heartbeat_interval = "60s"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CiscoTelemetryGNMI

type CiscoTelemetryGNMI struct {
	ServiceAddress string         `toml:"service_address"`
	Subscriptions  []Subscription `toml:"subscription"`

	// Optional subscription configuration
	Encoding    string
	Origin      string
	Prefix      string
	Target      string
	UpdatesOnly bool `toml:"updates_only"`

	// Cisco IOS XR credentials
	Username string
	Password string

	// Redial
	Redial internal.Duration

	// GRPC TLS settings
	TLS bool
	internaltls.ClientConfig
	// contains filtered or unexported fields
}

CiscoTelemetryGNMI plugin instance

func (*CiscoTelemetryGNMI) Description

func (c *CiscoTelemetryGNMI) Description() string

Description of plugin

func (*CiscoTelemetryGNMI) Gather

Gather plugin measurements (unused)

func (*CiscoTelemetryGNMI) SampleConfig

func (c *CiscoTelemetryGNMI) SampleConfig() string

SampleConfig of plugin

func (*CiscoTelemetryGNMI) Start

Start the http listener service

func (*CiscoTelemetryGNMI) Stop

func (c *CiscoTelemetryGNMI) Stop()

Stop listener and cleanup

type Subscription

type Subscription struct {
	Origin string
	Path   string
	Target string

	// Subscription mode and interval
	SubscriptionMode string            `toml:"subscription_mode"`
	SampleInterval   internal.Duration `toml:"sample_interval"`

	// Duplicate suppression
	SuppressRedundant bool              `toml:"suppress_redundant"`
	HeartbeatInterval internal.Duration `toml:"heartbeat_interval"`
}

Subscription for a GNMI client

Jump to

Keyboard shortcuts

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