{ "info": { "author": "Peter Wang", "author_email": "peter.wang13@dell.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation", "Topic :: Software Development :: Libraries" ], "description": "nagios-unity\n============\n\nNagios plugin for monitoring Unity system\n\n``nagios-unity`` is built on top of ``storops``, which interacts with Unity storage via RESTful API. ``nagios-unity`` provides\nan easy-to-use command line interface for invocation of nagios servers. ``nagios-unity`` follows the output rules defined\nby `Print only one line of text `_\n\n\nInstallation\n------------\n\n>From Pypi\n^^^^^^^^^\n\nThe ``nagios-unity`` can be install via pypi.\n\n.. code-block:: bash\n\n $ pip install nagios-unity\n\n>From source\n^^^^^^^^^^^\n\nAlternatively, clone this repo via git and:\n\n.. code-block:: bash\n\n $ cd nagios-unity\n $ sudo python setup.py install\n\nOnce installed, a ``nagios-unity`` (on *nux) or ``nagios-unity.exe`` (on Windows) command will be available for use.\n\nCommand line usage\n------------------\n\nUser can invoke the command line ``nagios-unity`` in bash or CMD/PowerShell. To get the help, type ``nagios-unity --help``.\n\nHere is the example:\n\n.. code-block:: bash\n\n $ nagios-unity --help\n Unity plugin for Nagios.\n\n Usage:\n nagios-unity -H -u -p [--cacert ] \n nagios-unity -h | --help\n nagios-unity --version\n\n Arguments:\n OBJECT One of below values:\n battery, dae, disk, dpe,\n ethernet_port fan, fc_port,\n io_module, lcc, lun, memory_module,\n pool, power_supply, sas_port,\n sp, ssc, ssd, system, array_hardware\n\n Options:\n -h --help Show this screen.\n -V --version Show version.\n -C --cacert Unity CA certificates.\n -H --host Unity IP address.\n -u --username Unity User login.\n -p --password Unity password.\n -v --verbose show verbose logs.\n\n Examples:\n nagios-unity -H 10.245.101.39 -u admin -p Password123! ssc\n\n\nAvailable monitoring commands\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n- **battery**\n- **dae**\n- **disk**\n- **dpe**\n- **ethernet_port**\n- **fan**\n- **fc_port**\n- **io_module**\n- **lcc**\n- **lun**\n- **memory_module**\n- **pool**\n- **power_supply**\n- **sas_port**\n- **sp**\n- **ssc**\n- **ssd**\n- **system**\n- **array_hardware**\n\n\n**array_hardware** is a virtual command which combines a serial of hardware components of Unity.\n\nArray health enum mapping\n-------------------------\n\nThe nagios requires plugins to provide defined return codes for each periodic check, see `Plugin Return Codes `_ for more details.\n\nThis plugin will perform following mapping between the Unity health enum and nagios return codes:\n\n\n+-------------------+--------------------+-----------------------+\n| Unity Health Enum | Nagios Return Code | Nagios Service Status |\n+-------------------+--------------------+-----------------------+\n| OK | 0 | OK |\n+-------------------+--------------------+-----------------------+\n| OK_BUT | 0 | OK |\n+-------------------+--------------------+-----------------------+\n| DEGRADED | 1 | WARNING |\n+-------------------+--------------------+-----------------------+\n| MINOR | 1 | WARNING |\n+-------------------+--------------------+-----------------------+\n| MAJOR | 1 | WARNING |\n+-------------------+--------------------+-----------------------+\n| CRITICAL | 2 | CRITICAL |\n+-------------------+--------------------+-----------------------+\n| NON_RECOVERABLE | 2 | CRITICAL |\n+-------------------+--------------------+-----------------------+\n| UNKNOWN | 3 | UNKNOWN |\n+-------------------+--------------------+-----------------------+\n\n\nConfiguration\n-------------\n\n.. caution::\n\n Before proceeding, make sure the nagios and its components are corrected configured.\n It is also suggested to try out the ``nagios-unity`` command line.\n\n\n\n- Create a template ``storage-array`` in ``templates.cfg``.\n\n.. code-block:: ini\n\n # Define a template for storage that we can reuse\n define host{\n name storage-array ; The name of this host template\n use generic-host ; Inherit default values from the generic-host template\n hostgroups storage-arrays ; Host groups that storage arrays should be a member of\n check_period 24x7 ; By default, storage arrays are monitored round the clock\n check_interval 5 ; Arrays are checked every 5 minutes\n retry_interval 1 ; Schedule array check retries at 1 minute intervals\n max_check_attempts 10 ; Check each array 10 times (max)\n check_command check-host-alive ; Default command to check if arrays are \"alive\"\n notification_period 24x7 ; Send notifications at any time\n notification_interval 30 ; Resend notifications every 30 minutes\n notification_options d,r ; Only send notifications for specific array states\n contact_groups admins ; Notifications get sent to the admins by default\n register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE\n }\n\n\n\n- Create a dedicated ``storage.cfg`` for storing all storage arrays.\n\n.. code-block:: ini\n\n $ touch storage.cfg\n\n\n- Add groups for grouping all storage devices in ``storage.cfg``\n\n.. code-block:: ini\n\n define hostgroup{\n hostgroup_name storage-arrays\n alias External Storage\n }\n\n- Add array for nagios management.\n\n.. code-block:: ini\n\n define host{\n use storage-array\n host_name OB_H1132 ; The name we're giving to this array\n alias My Nagios Unity ; A longer name associated with the array\n address 10.245.101.35 ; IP address of the Unity array\n _user_name admin ; Customer variable for Unity user name\n _password password ; Customer variable for Unity password\n }\n\n- Add command for nagios use in ``commands.cfg``.\n\n.. code-block:: ini\n\n # for unity\n\n define command{\n command_name nagios-unity\n command_line /usr/local/bin/nagios-unity -H $HOSTADDRESS$ -u $_HOSTUSER_NAME$ -p $_HOSTPASSWORD$ $ARG1$\n }\n\n\n\n\nNote: ``_HOST`` prefix is prepended by nagios, see `custom object vars `_.\n\n\n\n- Add services for managed arrays.\n\n.. code-block:: ini\n\n define service{\n use generic-service\n host_name OB_H1132\n service_description Ethernet Ports\n check_command nagios-unity!ethernet_port\n }\n\n define service{\n use generic-service\n host_name OB_H1132\n service_description FC Ports\n check_command nagios-unity!fc_port\n }\n\n define service{\n use generic-service\n host_name OB_H1132\n service_description SAS Ports\n check_command nagios-unity!sas_port\n }\n\n\nFor a full list of available commands, check it out `Available monitoring commands`_\n\n- Restart nagios to reflect the changes.\n\n.. code-block:: ini\n\n $ sudo service nagios restart\n\n\nSSL consideration\n^^^^^^^^^^^^^^^^^\n\nUnity supports SSL via RESTful API, administartor can setup their own CA for SSL verification.\n\n``nagios-unity`` also leverages the capability of RESTful API, and provides a ``-C`` option for SSL verification.\n\nTo do this:\n\n- First add the ``-C `` to the ``commands.cfg``\n\n.. code-block:: ini\n\n # for unity\n\n define command{\n command_name nagios-unity\n command_line /usr/local/bin/nagios-unity -H $HOSTADDRESS$ -u $_HOSTUSER_NAME$ -p $_HOSTPASSWORD$ -C $_HOSTCACERT $ARG1$\n }\n\n\n- Then supply ``_cacert`` option in the ``storage.cfg``.\n\n\n.. code-block:: ini\n\n define host{\n use storage-array\n host_name OB_H1132 ; The name we're giving to this array\n alias My Nagios Unity ; A longer name associated with the array\n address 10.245.101.35 ; IP address of the Unity array\n _user_name admin ; Customer variable for Unity user name\n _password password ; Customer variable for Unity password\n _cacert /path/to/CA ; Customer variable for Unity CA certificate\n }\n\n- Restart nagios service to reflect the changes.\n\n\nContributions\n-------------\n\nSimply fork this repo and send PR for your code change(also tests to cover your change),\nremember to give a title and description of your PR. We are willing to enhance this project with you :).\n\n\nLicense\n-------\n\n`Apache license version 2 `_\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/thecodeteam/nagios-unity", "keywords": "", "license": "Apache Software License", "maintainer": "", "maintainer_email": "", "name": "nagios-unity", "package_url": "https://pypi.org/project/nagios-unity/", "platform": "all", "project_url": "https://pypi.org/project/nagios-unity/", "project_urls": { "Homepage": "http://github.com/thecodeteam/nagios-unity" }, "release_url": "https://pypi.org/project/nagios-unity/0.1.2/", "requires_dist": [ "bitmath (>=1.3.0)", "docopt (>=0.6.2)", "requests", "storops (>=0.5.0)", "urllib3 (>=1.21.1)" ], "requires_python": "", "summary": "Unity plugin for Nagios.", "version": "0.1.2" }, "last_serial": 3801121, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "7532cd74d9114e25b270fcb13e25c034", "sha256": "1ddfd4c23e62ad1c7da52c6a5f3fb1b8c6b83f543175c5ef5729c8ea6eb24ba4" }, "downloads": -1, "filename": "nagios_unity-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7532cd74d9114e25b270fcb13e25c034", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 42516, "upload_time": "2017-11-23T08:12:08", "url": "https://files.pythonhosted.org/packages/f0/34/c19042b95b1ea06a190e3df050171e8ab86025dfbb91f8ab04d1049f24fd/nagios_unity-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "43959fc4c687f707c41c898e5fbff9b7", "sha256": "747ee66cad4212a0a0790e486704cfd8218d7a80d4e5c57b563555b75af26cc5" }, "downloads": -1, "filename": "nagios-unity-0.1.2.tar.gz", "has_sig": false, "md5_digest": "43959fc4c687f707c41c898e5fbff9b7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20126, "upload_time": "2017-11-23T08:12:10", "url": "https://files.pythonhosted.org/packages/19/cf/249f55c92955b31138fe171546ce5602ba1985fec49a8d2d565acdb42ffb/nagios-unity-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7532cd74d9114e25b270fcb13e25c034", "sha256": "1ddfd4c23e62ad1c7da52c6a5f3fb1b8c6b83f543175c5ef5729c8ea6eb24ba4" }, "downloads": -1, "filename": "nagios_unity-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7532cd74d9114e25b270fcb13e25c034", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 42516, "upload_time": "2017-11-23T08:12:08", "url": "https://files.pythonhosted.org/packages/f0/34/c19042b95b1ea06a190e3df050171e8ab86025dfbb91f8ab04d1049f24fd/nagios_unity-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "43959fc4c687f707c41c898e5fbff9b7", "sha256": "747ee66cad4212a0a0790e486704cfd8218d7a80d4e5c57b563555b75af26cc5" }, "downloads": -1, "filename": "nagios-unity-0.1.2.tar.gz", "has_sig": false, "md5_digest": "43959fc4c687f707c41c898e5fbff9b7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20126, "upload_time": "2017-11-23T08:12:10", "url": "https://files.pythonhosted.org/packages/19/cf/249f55c92955b31138fe171546ce5602ba1985fec49a8d2d565acdb42ffb/nagios-unity-0.1.2.tar.gz" } ] }