Giter Club home page Giter Club logo

vsphere-graphite's Introduction

vSphere to Graphite

Export vSphere stats to graphite.

Written in go as the integration collectd and python plugin posed too much problems (cpu usage and pipe flood).

Build status

Build Status

Code report

Go Report Card

Example result

Bellow a dashboard realize with grafana. The backend used in this case is influxdb.

Example Dashboard

Extenal dependencies

Naturaly heavilly based on govmomi.

But also on daemon which provides simple daemon/service integration.

Configure

You need to know you vcenters, logins and password ;-)

If you set a domain, it will be automaticaly removed from found objects.

Metrics collected are defined by associating ObjectType groups with Metric groups. They are expressed via the vsphere scheme: group.metric.rollup

An example of configuration file of contoso.com is there.

You need to place it at /etc/binaryname.json (/etc/vsphere-graphite.json per default)

For contoso it would simply be:

cp vsphere-graphite-example.json vsphere-graphite.json

Backend paramters can also be set via environement paramterers (see docker)

Backend parameters

  • Type (BACKEND_TYPE): Type of backend to use. Currently "graphite" or "influxdb"

  • Hostname (BACKEND_HOSTNAME): hostname were the backend is running (graphite, influxdb)

  • Port (BACKEND_PORT): port to connect to for the backend (graphite, influxdb)

  • Username (BACKEND_USERNAME): username to connect to the backend (influxdb)

  • Password (BACKEND_PASSWORD): password to connect to the backend (influxdb)

  • Database (BACKEND_DATABASE): database to use in the backend (influxdb)

  • NoArray (BACKEND_NOARRAY): don't use csv 'array' as tags, only the first element is used (influxdb)

Docker

All builds are pushed to docker:

Default tags includes:

  • branch (i.e.: master) for latest commit in the branch

  • latest for latest release

Configration file can be passed by mounting /etc.

Backend parameters can be set via environment variables to make docker user easier (having graphite or influx as another container).

Run it

the container way

Edit the configuration file and set it in the place you like here $(pwd)

docker run -t -v $(pwd)/vsphere-graphite.json:/etc/vsphere-graphite.json cblomart/vsphere-graphite:latest

The old way

Deploy

typical GO:

go get github.com/cblomart/vsphere-graphite

The executable should be in $GOPATH/bin/

It can be copied on any "same system" (same: os and cpu platform).

Run on Commandline

vsphere-graphite

Install as a service

vsphere-graphite install

Run as a service

vsphere-graphite start

vsphere-graphite status

vsphere-graphite stop

Remove service

vsphere-graphite remove

License

The MIT License (MIT)

Copyright (c) 2016 cblomart

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

vsphere-graphite's People

Contributors

cblomart avatar sofixa avatar

Watchers

 avatar

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.