prometheus-vcd-sd

module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: Apache-2.0

README

Prometheus vCloud Director SD

Build Status Codacy Badge Go Doc Go Report

This project provides a server to automatically discover nodes within your vCloud Director organization in a Prometheus SD compatible format.

Install

You can download prebuilt binaries from our GitHub releases, or you can use our Docker images published on Docker Hub. If you need further guidance how to install this take a look at our documentation.

Integration

Available labels

The following list of meta labels can be used to relabel your scrape results entirely. Hopefully the names are self-explaining, that's why I have skipped a description for each label.

  • __address__
  • __meta_vcd_metadata_<name>
  • __meta_vcd_name
  • __meta_vcd_network_<name>
  • __meta_vcd_num_cores_per_socket
  • __meta_vcd_num_cpus
  • __meta_vcd_org
  • __meta_vcd_os_type
  • __meta_vcd_project
  • __meta_vcd_status
  • __meta_vcd_storage_profile
  • __meta_vcd_vdc
Prometheus config

Here you get a snippet for the Prometheus scrape_config that configures Prometheus to scrape node_exporter assuming that it is deployed on all your servers.

- job_name: node
  file_sd_configs:
  - files: [ "/etc/prometheus/vcd.json" ]
  relabel_configs:
  - source_labels: [__meta_vcd_network_internal]
    replacement: "${1}:9100"
    target_label: __address__
  - source_labels: [__meta_vcd_org]
    target_label: org
  - source_labels: [__meta_vcd_name]
    target_label: instance

Development

Make sure you have a working Go environment, for further reference or a guide take a look at the install instructions. This project requires Go >= v1.11.

git clone https://github.com/promhippie/prometheus-vcd-sd.git
cd prometheus-vcd-sd

make generate build

./bin/prometheus-vcd-sd -h

Security

If you find a security issue please contact thomas@webhippie.de first.

Contributing

Fork -> Patch -> Push -> Pull Request

Authors

License

Apache-2.0

Copyright (c) 2020 Thomas Boerger <thomas@webhippie.de>

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

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