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?
Metadata
Release files for azure-alerts-plugin 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| azure_alerts_plugin-0.1.9.tar.gz | 7.4 kB | Without provenance | Details for azure_alerts_plugin-0.1.9.tar.gz |
Release files / azure_alerts_plugin-0.1.9.tar.gz
| Download URL | azure_alerts_plugin-0.1.9.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c48481f613a93e1c5e4c50c93b46422b143a41cdb871e42d4431e8597fc86af
|
|
BLAKE2b-256 checksum How to use checksums |
15104d93bab6fcb6b121b7caca3f448460a3b435464536ac8a2c6ea1625cfaa2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.5
|
Security for azure-alerts-plugin 0.1.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.