Giter Club home page Giter Club logo

api_uptime-1's Introduction

A python script that pings an OpenStack environment in-parallel using NovaClient.

To get started:

  1. Pull the repository
  2. pip install -r requirements.txt
  3. Setup os.cnf file

Setup Config

To set up the config the required parameters are below:

  • version=2.1
  • user=
  • password=
  • tenant=
  • auth_url=http://XX.XX.XXX.XXX:5000/v2.0
  • services_list=cinder, nova, glance, neutron, swift
  • daemon_file=
  • output_file=

Note: If you are pinging Swift you must have a container name specified.

Running the script

This script will parse the following arguments from the command-line and pulls additional data from os.cnf

[-s/--services] [-t/--time] || [-d/--daemon]} [-o/--output-file]

--services is a comma-delimited list of services, defaults to the value in os.cnf

--time is the total amount of time in seconds that the script will check the api's of the given services. Defaults to 60.

To test against glance & nova:

python call_test.py -s glance, nova

Daemon Mode

This script can also be run in daemon mode, where it will continuously run until a given file (specified in os.cnf) is detected (the default is sys.prefix/api.uptime.stop).

To run the script in daemon mode, simply run:

python call_test.py -d

To end daemon mode, create the file at the specified location.

Time Mode

This script can also be run in time mode, where it will continuously run for the specified number of seconds.

To run the script in time mode, simply run:

python call_test.py -t 5

Where 5 is the number of seconds.

Output File

A location for the output file can be specified in os.cnf or specified via the command-line via the -o/--output-file option.

If no output file is given the output will be printed to stdout.

api_uptime-1's People

Contributors

lamarwhitej avatar jlwhite709 avatar

Watchers

James Cloos avatar Steve Heyman 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.