Windows Azure Monitor
Project description
Introduction
Windows Azure Monitor includes utilities to monitor different aspects of Windows Azure. These utilities are designed to be used with Nagios and Zabbix, but could also be used in other creative ways.
License
Apache License, Version 2.0 See COPYING
Installation
Two ways to install:
Download and extract the source package. Run ‘python setup.py install’ See http://docs.python.org/2.7/install/index.html for additional information
Install using pip, ‘pip install azuremonitor’ Some distributions call pip pip-python.
Dependencies
Python 2.6 or 2.7
azure - Window Azure sdk for Python
argparse - For Python 2.6
OpenSSL - pyOpenSSL
pyodbc - Connect to SQL Azure
FreeTDS - Used by ODBC to connect to SQL Azure
Setup
Nagios
Create symlinks from your Nagios plugin directory to the Azure monitor utilities. Example:
ln -s /usr/bin/check_azure_compute.py /usr/lib64/nagios/plugins ln -s /usr/bin/check_azure_ad.py /usr/lib64/nagios/plugins ln -s /usr/bin/check_azure_sql.py /usr/lib64/nagios/plugins ln -s /usr/bin/check_azure_storage.py /usr/lib64/nagios/plugins ln -s /usr/bin/check_azure_paas.py /usr/lib64/nagios/pluginsDownload your .publishsettings file for your Azure account. Something like: https://windows.azure.com/download/publishprofile.aspx
Move your .publishsetttings file to a safe place and protect it. Example:
mv azure.publishsettings /etc/nagios/private chmod 640 /etc/nagios/private/azure.publishsettings chown root:nagios /etc/nagios/private/azure.publishsettingsHere only root and the nagios group, which nagios runs under, is allowed to read the file
Optionally set a variable in your resource.cfg (usually /etc/nagios/private/resource.cfg) To point to your publishsettings file
Setup a command in a config file as usual for nagios:
define command{ command_name check_azure_compute command_line $USER1$/check_azure_compute.py $HOSTADDRESS$ -p $PSFILE$ } define command{ command_name check_azure_sql command_line $USER1$/check_azure_sql.py $HOSTADDRESS$ $ARG1$ } define command{ command_name check_azure_ad command_line $USER1$/check_azure_ad.py $HOSTADDRESS$ $ARG1$ } define command{ command_name check_azure_paas command_line $USER1$/check_azure_paas.py $HOSTADDRESS$ $ARG1$ } define command{ command_name check_azure_storage command_line $USER1$/check_azure_storage.py $HOSTADDRESS$ $ARG1$ }In the service file setup appropriate parameters. Examples:
check_command check_azure_sql!-d azuredb -u username -p pwd -k dbsize -vv! check_command check_azure_ad!-c clientid -s secret -k listusers -vv! check_command check_azure_paas!-p psfile -s storageact -k availmemory -w 3000: -c 2000: -vv! check_command check_azure_storage!-p psfile --table --tx -k percentsuccess -w 99: -c 95:!
Zabbix
Use these utilities as an external check: https://www.zabbix.com/documentation/1.8/manual/config/items#external_checks
You may need to increase the timeout for external check in yor zabbix_server.conf:
Timeout=10Also in zabbix_server.conf, uncomment the ExternalScripts location, if commented:
ExternalScripts=/etc/zabbix/externalscriptsLink the utilities to that location. Example:
ln -s /usr/bin/check_azure_compute.py /etc/zabbix/externalscriptsDownload your .publishsettings file for your Azure account. Something like: https://windows.azure.com/download/publishprofile.aspx
Move you .publishsetttings file to a safe place and protect it. Example:
mv azure.publishsettings /etc/zabbix chmod 640 /etc/zabbix/azure.publishsettings chown root:zabbix /etc/zabbix/azure.publishsettingsHere only root and the zabbix group, which zabbix runs under, is allowed to read the file
Use the zabbix interface to setup the external check. Example:
Item External check Key: check_azure_compute.py[-p /etc/zabbix/azure.publishsettings] Type: CharacterUse the zabbix interface to setup the trigger. Example:
Trigger Expression: {<host/template>:check_azure_compute.py[-p /etc/zabbix/azure.publishsettings].str(All cool)}=0
Changelog
0.1
Initial Release.
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
File details
Details for the file azuremonitor-0.1.tar.gz
.
File metadata
- Download URL: azuremonitor-0.1.tar.gz
- Upload date:
- Size: 22.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba9713f5753d28ed452e9502a55e03aceb9b511dc3bbb201254bca8b383f74a9 |
|
MD5 | 35e91659afa77fd5743f319e355b482c |
|
BLAKE2b-256 | 62b5dfe9150ef88c4fe20f5571500776b50ee2559bdad5636a6bd53e48d17087 |