nsxtreceiver

package module
v0.122.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: Apache-2.0 Imports: 24 Imported by: 7

README

NSX-T Receiver

Status
Stability alpha: metrics
Distributions contrib
Issues Open issues Closed issues
Code Owners @dashpole, @schmikei

This receiver fetches metrics important to run virtual networking using NSX-T. The receiver ingests metrics via the NSX Rest API.

🚧 This receiver is in ALPHA. Configuration fields and metric data model are subject to change.

Purpose

The purpose of this receiver is to allow users to monitor metrics from NSX-T environments.

Prerequisites

Needs at least an “Auditor” user for NSX Manager Resources in the vSphere Client (can be created via Web UI or CLI)

The collector must be able to reach the NSX Manager with port 443 open.

This receiver supports NSX-T Datacenter versions:

  • 3.2.0
  • 3.1.2

Configuration

  • endpoint: Endpoint of the NSX Manager. Must be formatted as {scheme}://{host}:{port}. Schemes supported are http and https

  • username: Username of the Auditor user

  • password: Password of the Auditor user

  • collection_interval: (default = 1m): This receiver collects metrics on an interval. This value must be a string readable by Golang's time.ParseDuration. Valid time units are ns, us (or µs), ms, s, m, h.

  • initial_delay (default = 1s): defines how long this receiver waits before starting.

  • timeout: (default = 1m) The timeout of running commands against the NSX REST API.

  • metrics (default: see DefaultMetricsSettings [here])(./internal/metadata/generated_metrics.go): Allows enabling and disabling specific metrics from being collected in this receiver.

Example Configuration
receivers:
  nsxt:
    endpoint: https://nsx-manager
    username: admin
    password: password
    timeout: 60s
    metrics:
      nsxt.node.cpu.utilization:
        enabled: false

exporters:
  file:
    path: "./content.json"

service:
  pipelines:
    metrics:
      receivers: [nsxt]
      exporters: [file]

The full list of settings exposed for this receiver are documented in config.go with detailed sample configurations in testdata/config.yaml.

Metrics

Details about the metrics produced by this receiver can be found in metadata.yaml

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() receiver.Factory

NewFactory creates a new receiver factory

Types

type Client

type Client interface {
	TransportNodes(ctx context.Context) ([]dm.TransportNode, error)
	ClusterNodes(ctx context.Context) ([]dm.ClusterNode, error)
	NodeStatus(ctx context.Context, nodeID string, class nodeClass) (*dm.NodeStatus, error)
	Interfaces(ctx context.Context, nodeID string, class nodeClass) ([]dm.NetworkInterface, error)
	InterfaceStatus(ctx context.Context, nodeID, interfaceID string, class nodeClass) (*dm.NetworkInterfaceStats, error)
}

Client is a way of interacting with the NSX REST API

type Config

type Config struct {
	scraperhelper.ControllerConfig `mapstructure:",squash"`
	confighttp.ClientConfig        `mapstructure:",squash"`
	metadata.MetricsBuilderConfig  `mapstructure:",squash"`
	Username                       string              `mapstructure:"username"`
	Password                       configopaque.String `mapstructure:"password"`
}

Config is the configuration for the NSX receiver

func (*Config) Validate

func (c *Config) Validate() error

Validate returns if the NSX configuration is valid

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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