check gurobi machines actives for long time
Project description
Gurobi monitoring plugin
Checks an url raise an alert if some problem is found. Uses curl with all its power, so you can extend your check with all curl options.
Install
Linux:
sudo pip3 install gurobi_machines_plugin --upgrade
Also is possible to use:
sudo python3 -m pip install gurobi_machines_plugin --upgrade
On windows with python3.5:
pip install gurobi_machines_plugin --upgrade
For proxies add:
--proxy='http://user:passw@server:port'
Usage
Use the command line:
> gurobi_machines_plugin --help usage: gurobi_machines_plugin [-h] [-u [URL]] [-e [EXTRA_ARGS]] [--client_id [CLIENT_ID]] [--client_secret [CLIENT_SECRET]] [--outdated_minutes [OUTDATED_MINUTES]] optional arguments: -h, --help show this help message and exit -u [URL], --url [URL] url to check -e [EXTRA_ARGS], --extra_args [EXTRA_ARGS] extra args to add to curl, see curl manpage --client_id [CLIENT_ID] Header client_id --client_secret [CLIENT_SECRET] Header client_secret --outdated_minutes [OUTDATED_MINUTES] Minutes to consider outdated
Example usage
Example basic usage:
> gurobi_machines_plugin --url 'https://cloud.gurobi.com/api/v2/pools/{PoolID}/machines' --client_id '{client_id}' --client_secret '{client_secret}' --outdated_minute 60
Nagios config
Example command:
define command{ command_name check_gurobi_machines command_line /usr/local/bin/gurobi_machines_plugin --url '$ARG1$' --client_id '$ARG2$' --client_secret '$ARG3$' --outdated_minute $ARG4$ $ARG5$ }
Example service:
define service { host_name SERVERX service_description service_name check_command check_gurobi_machines!https://cloud.gurobi.com/api/v2/pools/{PoolID}/machines!{client_id}!{client_secret}!60 use generic-service notes some useful notes }
You can use ansible role that already has the installation and command: https://github.com/CoffeeITWorks/ansible_nagios4_server_plugins
TODO
Use hash passwords
Add Unit tests?
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file gurobi_machines_plugin-0.7.0.tar.gz
.
File metadata
- Download URL: gurobi_machines_plugin-0.7.0.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.19.7 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | adf3a3702de9fdaf4c869f018879234b3dadca553ada5a41410e58b8a3081db9 |
|
MD5 | 52096c08e7b205ea37ca28bd9f4b8768 |
|
BLAKE2b-256 | 8800e9e49aa5a64dd682dee7ce8bc5d8ccef34a6fc33fe87d6c32c03739da7ba |
File details
Details for the file gurobi_machines_plugin-0.7.0-py3-none-any.whl
.
File metadata
- Download URL: gurobi_machines_plugin-0.7.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.19.7 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2006cfe3b0fbd3dffc1e5bd0e4600f9a16a07412dc749818fe4d990b5e5c4ad |
|
MD5 | a61bcc655020bf4b9415fa6b0c468b22 |
|
BLAKE2b-256 | 54a928a4c650c14d0f2de1de2d1404ad5f54098c97d7f75b0ffa8264c58e545f |