Giter Club home page Giter Club logo

openstack_client_exporter's Introduction

openstack_client_exporter

A prometheus exporter for monitoring OpenStack from user side

Usage

$ ./openstack_client_exporter --help
Usage of ./openstack_client_exporter:
  -external-network string
    	name of the external network (default "internet")
  -flavor string
    	name of the instance flavor (default "t2.small")
  -image string
    	name of the image (default "ubuntu-16.04-x86_64")
  -internal-network string
    	name of the internal network (default "private")
  -user string
      username used for sshing into the instance (default "ubuntu")

Sample output

$ curl localhost:9539/metrics
[ a bunch of standard go metrics ]
# HELP openstack_client_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, and goversion from which openstack_client_exporter was built.
# TYPE openstack_client_exporter_build_info gauge
openstack_client_exporter_build_info{branch="",goversion="go1.11",revision="",version=""} 1
# HELP openstack_client_object_store_success '1' when a file was successfuly uploaded and downloaded from the object store
# TYPE openstack_client_object_store_success gauge
openstack_client_object_store_success{error="object store client failure: No suitable endpoint could be found in the service catalog."} 0
# HELP openstack_client_object_store_timing Timestamp of each step for uploading and downloadin a file from the object store
# TYPE openstack_client_object_store_timing gauge
openstack_client_object_store_timing{step="auth_ok"} 1.5513639574306479e+09
openstack_client_object_store_timing{step="start"} 1.5513639567950132e+09
# HELP openstack_client_spawn_success '1' when an OpenStack instance was booted from volume and successfully ssh'ed into
# TYPE openstack_client_spawn_success gauge
openstack_client_spawn_success{error=""} 1
# HELP openstack_client_spawn_timing Timestamp of each step for booting on OpenStack instance from volume
# TYPE openstack_client_spawn_timing gauge
openstack_client_spawn_timing{step="auth_ok"} 1.551363957387765e+09
openstack_client_spawn_timing{step="boot_started"} 1.5513639862414603e+09
openstack_client_spawn_timing{step="end"} 1.5513640235120518e+09
openstack_client_spawn_timing{step="external_network_id"} 1.5513639592846642e+09
openstack_client_spawn_timing{step="flavor_id"} 1.5513639577655594e+09
openstack_client_spawn_timing{step="floating_ip_associated"} 1.551363981913244e+09
openstack_client_spawn_timing{step="floating_ip_created"} 1.55136396145901e+09
openstack_client_spawn_timing{step="image_id"} 1.5513639575788805e+09
openstack_client_spawn_timing{step="network_id"} 1.551363958037408e+09
openstack_client_spawn_timing{step="security_group_created"} 1.5513639583344443e+09
openstack_client_spawn_timing{step="security_group_rule_created"} 1.5513639585917253e+09
openstack_client_spawn_timing{step="server_active_status"} 1.5513639798895202e+09
openstack_client_spawn_timing{step="server_created"} 1.5513639632566118e+09
openstack_client_spawn_timing{step="ssh_host_keys_retrieved"} 1.5513640228404794e+09
openstack_client_spawn_timing{step="ssh_key_uploaded"} 1.5513639590000303e+09
openstack_client_spawn_timing{step="ssh_successful"} 1.5513640235120487e+09
openstack_client_spawn_timing{step="start"} 1.5513639567950585e+09
$

Initial setup

It is recommended to create a dedicated OpenStack project for use with this exporter. It needs access to an Ubuntu cloud image with cloud-init

$ wget https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img
$ openstack image create --file xenial-server-cloudimg-amd64-disk1.img ubuntu-16.04-x86_64
$ openstack network create private
$ openstack subnet create --subnet-range 192.168.0.0/24 --network private private
$ openstack router create router
$ openstack router add subnet router private
$ openstack router set --external-gateway public router

openstack_client_exporter's People

Contributors

ctrlaltdel avatar

Stargazers

GaoZizhong avatar Jonathan Herlin avatar  avatar Tobias Krischer avatar Kevin M. Gallagher avatar Luis Domingues avatar Christian Rohmann avatar 过客 avatar Yusuf Ozturk avatar Bryan A. S. avatar Ali Borhani avatar Eric D. Stein avatar Blake Gao avatar Daniel Palstra avatar Mykola Mogylenko avatar

Watchers

James Cloos avatar Christian Rohmann avatar  avatar

openstack_client_exporter's Issues

goroutine leak

After running for 1 hour, the following goroutines are running:

openstack_client_exporter[29818]: goroutine 706 [syscall]:
openstack_client_exporter[29818]: goroutine 1 [IO wait, 60 minutes]:
openstack_client_exporter[29818]: goroutine 19 [sleep]:
openstack_client_exporter[29818]: goroutine 3790 [select, 44 minutes]:
openstack_client_exporter[29818]: goroutine 2685 [select, 49 minutes]:
openstack_client_exporter[29818]: goroutine 210393 [select, 34 minutes]:
openstack_client_exporter[29818]: goroutine 419 [IO wait, 3 minutes]:
openstack_client_exporter[29818]: goroutine 3791 [select, 44 minutes]:
openstack_client_exporter[29818]: goroutine 87050 [select, 39 minutes]:
openstack_client_exporter[29818]: goroutine 486 [select, 59 minutes]:
openstack_client_exporter[29818]: goroutine 487 [select, 59 minutes]:
openstack_client_exporter[29818]: goroutine 210394 [select, 34 minutes]:
openstack_client_exporter[29818]: goroutine 3754 [select]:
openstack_client_exporter[29818]: goroutine 971091 [select, 4 minutes]:
openstack_client_exporter[29818]: goroutine 469155 [select, 24 minutes]:
openstack_client_exporter[29818]: goroutine 1023 [select, 54 minutes]:
openstack_client_exporter[29818]: goroutine 1024 [select, 54 minutes]:
openstack_client_exporter[29818]: goroutine 2686 [select, 49 minutes]:
openstack_client_exporter[29818]: goroutine 718814 [select, 14 minutes]:
openstack_client_exporter[29818]: goroutine 597406 [select, 19 minutes]:
openstack_client_exporter[29818]: goroutine 335237 [select, 29 minutes]:
openstack_client_exporter[29818]: goroutine 849664 [select, 9 minutes]:
openstack_client_exporter[29818]: goroutine 87049 [select, 39 minutes]:
openstack_client_exporter[29818]: goroutine 335236 [select, 29 minutes]:
openstack_client_exporter[29818]: goroutine 971092 [select, 4 minutes]:
openstack_client_exporter[29818]: goroutine 597405 [select, 19 minutes]:
openstack_client_exporter[29818]: goroutine 1095193 [IO wait]:
openstack_client_exporter[29818]: goroutine 718815 [select, 14 minutes]:
openstack_client_exporter[29818]: goroutine 469154 [select, 24 minutes]:
openstack_client_exporter[29818]: goroutine 1095050 [chan receive]:
openstack_client_exporter[29818]: goroutine 849663 [select, 9 minutes]:

The leak is probably in these ones:

openstack_client_exporter[29818]: goroutine 1023 [select, 54 minutes]:
openstack_client_exporter[29818]: net/http.(*persistConn).readLoop(0xc00014c900)
openstack_client_exporter[29818]:         /home/travis/.gimme/versions/go1.11.5.linux.amd64/src/net/http/transport.go:1761 +0x6b9
openstack_client_exporter[29818]: created by net/http.(*Transport).dialConn
openstack_client_exporter[29818]:         /home/travis/.gimme/versions/go1.11.5.linux.amd64/src/net/http/transport.go:1338 +0x941

/cc @BenoitKnecht

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.