prometheus-vmware-exporter

command module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: MIT Imports: 13 Imported by: 0

README

prometheus-vmware-exporter

Collect metrics ESXi Host

Help

Usage of prometheus-vmware-exporter:
  -idle_timeout int
        The host is not requested beyond the specified idle seconds will be deleted, the default value can be overridden by ESX_IDLE_TIMEOUT (default 7200)
  -listen string
        Listen port,the default value can be overridden by ESX_LISTEN (default ":9512")
  -log string
        Log level must be debug or info, the default value can be overridden by ESX_LOG (default "info")
  -password string
        The default password if not provided in the request,the default value can be overridden by ESX_PASSWORD
  -timeout int
        The seconds for request timeout, the default value can be overridden by ESX_TIMEOUT (default 5)
  -username string
        The default username if not provided in the request, the default value can be overridden by ESX_USERNAME

Build

docker build -t prometheus-vmware-exporter .

Run

sudo docker run -d -p 9512:9512 \
  --restart=always \
  --name=prometheus-vmware-exporter \
  --env=ESX_USERNAME=USERNAME \
  --env=ESX_PASSWORD=PASSWORD \
  --env=ESX_TIMEOUT=5 \
  --env=ESX_IDLE_TIMEOUT=7200 \
  --env=ESX_LOG=debug \
  prometheus-vmware-exporter

Request

curl 'http://localhost:9512/vm?target=192.168.1.2&username=root&password=123456&timeout=5' \
  -H 'Cache-Control: no-cache'

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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