GithubHelp home page GithubHelp logo

nsx-t-exporter's Introduction

Prometheus NSX-T Management Node Exporter

Exposes metrics from NSX-T Management Node REST API to a Prometheus compatible endpoint.

Exporter Configuration

NSX-T Expoerter takes input from environment variables as:

Mandatory Variables

  • NSXV3_LOGIN_HOST NSX-T Manager Node hostname or IP address.
  • NSXV3_LOGIN_PORT NSX-T Manager Node port.
  • NSXV3_LOGIN_USER NSX-T Manager Node login user.
  • NSXV3_LOGIN_PASSWORD NSX-T Manager Node login password.

Optional Variables

  • NSXV3_REQUESTS_PER_SECOND (10) NSX-T Manager Node requestes per second [<100].
  • NSXV3_REQUESTS_PER_SECOND_TIMEOUT (10) NSX-T Manager Node requestes per second timeout
  • NSXV3_SUPPRESS_SSL_WORNINGS (false) NSX-T Manager Node disables ssl host validattion.
  • LOG_LEVEL (debug) NSX-T Exporter logging level.

Build

git clone https://github.com/sapcc/github.com/sapcc/nsx-t-exporter.git
cd nsx-t-exporter
docker build -t <image-name> .

Run (Simple)

Edit docker-compose.yml

version: "2"

services:
  nsxv3-exporter:
    tty: true
    stdin_open: true
    expose:
      - 9191
    ports:
      - 9191:9191
    image: <image-name> 
    environment:
      - NSXV3_LOGIN_HOST=<NSX-T Manager Node hostname or IP address>
      - NSXV3_LOGIN_PORT=<NSX-T Manager Node port>
      - NSXV3_LOGIN_USER=<NSX-T Manager Node login user>
      - NSXV3_LOGIN_PASSWORD=<NSX-T Manager Node login password>
      - NSXV3_REQUESTS_PER_SECOND=<NSX-T Manager Node requestes per second [<100]>
      - NSXV3_REQUESTS_PER_SECOND_TIMEOUT=<NSX-T Manager Node requestes per second timeout>
      - NSXV3_CONNECTION_POOL_SIZE=<NSX-T Manager Node connection pool size>
      - NSXV3_REQUEST_TIMEOUT_SECONDS=<NSX-T Manager request timeout in seconds>
      - NSXV3_SUPPRESS_SSL_WORNINGS=<NSX-T Manager Node disables ssl host validattion>
      - SCRAP_PORT=<The exporter scrap port>
      - SCRAP_SCHEDULE_SECONDS=<The exporter scrap NSX-T Manager schedule in seconds>
      - LOG_LEVEL=<NSX-T Exporter logging level.>

Metrics

Metrics will be made available on http://<docker_host>:9191/metrics Metrics export can be seen at METRICS.md

nsx-t-exporter's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nsx-t-exporter's Issues

docker-compose.yml Contains typo

On line 20 it shows:
NSXV3_SUPPRESS_SSL_WORNINGS=true

Should instead show:
NSXV3_SUPPRESS_SSL_WARNINGS=true

This issue is also present in README.md

docket_host reference not given

where is the value for docker_host in the last line of read.md coming from?
on is the NSXV3_HOST_NAME in the environment variable
But to see the metrics once the docker container is up, what is the docker_host value?
it doesn't work with 'curl http://localhost:9191/metrics'

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

docker-compose
docker-compose.yml
dockerfile
Dockerfile
  • golang 1.18-alpine
  • alpine 3.16
gomod
go.mod
  • go 1.17
  • github.com/caarlos0/env/v6 v6.9.3
  • github.com/fatih/structs v1.1.0
  • github.com/prometheus/client_golang v1.12.2
  • github.com/sirupsen/logrus v1.8.1
  • golang.org/x/time v0.0.0-20220609170525-579cf78fd858@579cf78fd858

  • Check this box to trigger a request for Renovate to run again on this repository

What privilege is need to connect to NSX-T?

Hi,

I follow the command to build the code and run, but I see 403 error in the log.
And I use local administrator account to connect and still get the same error,
Could you advise what privilege is need to run this exporter? Thanks.

nsxv3-exporter_1 | {"level":"info","msg":"Data collection started","time":"2022-07-21T02:06:44Z"}
nsxv3-exporter_1 | {"level":"error","msg":"Request to endpoint ActivityFrameworkStatistics failed with 403","time":"2022-07-21T02:06:49Z"}
nsxv3-exporter_1 | {"level":"error","msg":"Error gathering Data from remote API: Data collection completed with errors","time":"2022-07-21T02:06:49Z"}
nsxv3-exporter_1 | {"level":"info","msg":"Data collection started","time":"2022-07-21T02:06:49Z"}
nsxv3-exporter_1 | {"level":"error","msg":"Request to endpoint ActivityFrameworkStatistics failed with 403","time":"2022-07-21T02:06:52Z"}
nsxv3-exporter_1 | {"level":"error","msg":"Error gathering Data from remote API: Data collection completed with errors","time":"2022-07-21T02:06:52Z"}
nsxv3-exporter_1 | {"level":"info","msg":"Data collection started","time":"2022-07-21T02:06:52Z"}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.