Giter Site home page Giter Site logo

xenstats_exporter's Introduction

Xenstats Exporter

GoDoc

Xenstats exporter for prometheus.io, written in go.

Docker Usage

Building:
docker build  --rm --force-rm --no-cache -t lovoo/xenstats_exporter .

Running:
docker run  -p 9290:9290 --rm  -v /path/to/config/file/:/configs lovoo/xenstats_exporter:latest  -config.file /configs/config.yml

Building

go get -u github.com/lovoo/xenstats_exporter
go install github.com/lovoo/xenstats_exporter

Config

create a yml in form of:

  xenhost: "xen1.fqdn.de"
  credentials:
    username: "root"
    password: "password"

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request

xenstats_exporter's People

Contributors

sqisch avatar thomersch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  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

xenstats_exporter's Issues

Please export additional VM metrics

Hi,

it would be much appreciated if the xenstat_exporter could export additional VM metrics such as, but not limited to, VM_metrics.get_VCPUs_utilisation, VM_metrics.get_VCPUs_CPU, VM_metrics.get_memory_actual, ... as this would allow for monitoring of running guests as well.

Thank you!

Help request

Starting the exporter the following error is raised , i'm logging in using the admin account of xenserver.
./xenstats_exporter -config.file ../config.yml
2019/03/20 09:26:02 service.time call error: Invalid credentials supplied
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7a7bb7]

goroutine 1 [running]:
github.com/xenserver/go-xenserver-client.(*XenAPIClient).APICall(0x0, 0xc0000c7bc0, 0x97731e, 0xc, 0x0, 0x0, 0x0, 0x4a, 0x50)
/root/go/src/github.com/xenserver/go-xenserver-client/client.go:58 +0x37
github.com/xenserver/go-xenserver-client.(*XenAPIClient).GetHosts(0x0, 0x4a, 0x997ee8, 0xc0000ca460, 0xc0000c7c38, 0xc0000c7cd8)
/root/go/src/github.com/xenserver/go-xenserver-client/client.go:95 +0xb0
main.Xenstats.createHostMemMetrics(0xc00002fb00, 0x0, 0xc0000247f0, 0x4, 0xc000024800, 0x9, 0xc000067d10)
/root/go/src/github.com/lovoo/xenstats_exporter/xenstats.go:95 +0x43
main.(*Exporter).collect(0xc00007a540)
/root/go/src/github.com/lovoo/xenstats_exporter/collector.go:63 +0xa8
main.NewExporter(...)
/root/go/src/github.com/lovoo/xenstats_exporter/collector.go:37
main.main()
/root/go/src/github.com/lovoo/xenstats_exporter/main.go:45 +0x1c7

Panic "interface is nil"

Hi,

I get the following error starting the exporter:

./xenstats_exporter

panic: interface conversion: interface is nil, not string

goroutine 1 [running]:
panic(0x95cd00, 0xc82021ab00)
	/usr/lib/go/src/runtime/panic.go:481 +0x3e6
main.Xenstats.createPoolMetrics(0xc820011fc0, 0xc820016ba0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/engel/GO/src/github.com/lovoo/xenstats_exporter/xenstats.go:247 +0x48b
main.(*Exporter).collect(0xc820016b40)
	/home/engel/GO/src/github.com/lovoo/xenstats_exporter/collector.go:68 +0x1eb
main.NewExporter(0xc8201402d0, 0xa, 0xc820140318, 0x4, 0xc820140340, 0xb, 0x0)
	/home/engel/GO/src/github.com/lovoo/xenstats_exporter/collector.go:37 +0x11a
main.main()
	/home/engel/GO/src/github.com/lovoo/xenstats_exporter/main.go:45 +0x1a0

Did I miss something?

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.