check active azure alerts
Project description
Azure alerts monitoring plugin
Checks azure alerts and raise an alert if some problem is found.
References:
Install
Linux:
sudo pip3 install azure_alerts_plugin --upgrade
Also is possible to use:
sudo python3 -m pip install azure_alerts_plugin --upgrade
On windows with python3.5:
pip install azure_alerts_plugin --upgrade
For proxies add:
--proxy='http://user:passw@server:port'
Usage
Use the command line:
> azure_alerts_plugin --help usage: azure_alerts_plugin [-h] [---tenant_id [TENANT_ID]] [--client_id [CLIENT_ID]] [--client_secret [CLIENT_SECRET]] [--suscription_id [SUSCRIPTION_ID]] [--time_range [TIME_RANGE]] [-e [EXTRA_ARGS]] optional arguments: -h, --help show this help message and exit [---tenant_id [TENANT_ID]] Header tenant_id [--client_id [CLIENT_ID]] Header client_id [--client_secret [CLIENT_SECRET]] Header client_secret [--suscription_id [SUSCRIPTION_ID]] Header client_id [--time_range [TIME_RANGE]] Header time_range -e [EXTRA_ARGS], --extra_args [EXTRA_ARGS] extra args to add to curl, see curl manpage
Example usage
Example basic usage:
> azure_alerts_plugin --tenant_id '{tenant_id}' --client_id '{client_id}' --client_secret '{client_secret}' --suscription_id '{suscription_id}' --time_range '{time_range}'
Nagios config
Example command:
define command{ command_name azure_alerts_plugin command_line /usr/local/bin/azure_alerts_plugin --tenant_id '$ARG1$' --client_id '$ARG2$' --client_secret '$ARG3$' --suscription_id '$ARG4$' --time_range '$ARG5$' }
With proxy defined
- # use azure_alerts_plugin with proxy
- define command{
command_name azure_alerts_plugin command_line https_proxy=http://user:pass@PROXYIP:PORT /usr/local/bin/azure_alerts_plugin –tenant_id ‘$ARG1$’ –client_id ‘$ARG2$’ –client_secret ‘$ARG3$’ –suscription_id ‘$ARG4$’ –time_range ‘$ARG5$’ }
Example service:
define service { host_name SERVERX service_description service_name check_command azure_alerts_plugin!{tenant_id}!{client_id}!{client_secret}!{suscription_id}!{time_range} use generic-service notes some useful notes }
With proxy defined:
- define service {
host_name SERVERX service_description service_name check_command azure_alerts_plugin_proxy!!{tenant_id}!{client_id}!{client_secret}!{suscription_id}!{time_range} 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
Hashes for azure_alerts_plugin-0.1.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c48481f613a93e1c5e4c50c93b46422b143a41cdb871e42d4431e8597fc86af |
|
MD5 | c346e08768d5b09c5ef908a0b3dc7d05 |
|
BLAKE2b-256 | 15104d93bab6fcb6b121b7caca3f448460a3b435464536ac8a2c6ea1625cfaa2 |