{
"info": {
"author": "Michael Paul Thomas Conigliaro",
"author_email": "mike [at] conigliaro [dot] org",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"License :: Freely Distributable",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 2.6",
"Topic :: System :: Monitoring"
],
"description": "====================\ncheck_ganglia_metric\n====================\n\n**check_ganglia_metric** is a `Nagios `_ plugin that allows\nyou to trigger alerts on any Ganglia metric.\n\n\nInstallation\n------------\n\n::\n\n # pip install check_ganglia_metric\n\n...or:\n\n::\n\n # easy_install check_ganglia_metric\n\n\nGanglia Configuration\n---------------------\n\nUnless your Nagios server and Ganglia Meta Daemon are running on the same host,\nYou probably need to edit your **gmetad.conf** to allow remote connections from\nyour Nagios server.\n\nTo allow connections from **nagios-server.example.com**:\n\n::\n\n trusted_hosts nagios-server.example.com\n\nTo allow connections from **all hosts** (probably a security risk):\n\n::\n\n all_trusted on\n\n\nTesting on the Command Line\n---------------------------\n\nFirst, let's see if **check_ganglia_metric** can communicate with the Ganglia\nMeta Daemon:\n\n::\n\n $ check_ganglia_metric.py --gmetad_host=gmetad-server.example.com \\\n --metric_host=host.example.com --metric_name=cpu_idle\n Status Ok, CPU Idle = 99.3 %|cpu_idle=99.3%;;;;\n\nThe \"Status Ok\" message indicates that **check_ganglia_metric** is working. If\nyou're having trouble getting this to work, try again with verbose logging\nenabled (``--verbose``) in order to gain better insight into what's going\nwrong.\n\nNow let's try setting an alert threshold:\n\n::\n\n $ check_ganglia_metric.py --gmetad_host=gmetad-server.example.com \\\n --metric_host=host.example.com --metric_name=cpu_idle --critical=99\n Status Critical, CPU Idle = 99.6 %|cpu_idle=99.6%;;99;;\n\nWe told **check_ganglia_metric** to return a \"Critical\" status if the Idle CPU\nwas greater than 99. The \"Status Critical\" message indicates that it worked.\nNote that **check_ganglia_metric** uses `NagAconda `_\nto parse ranges and thresholds according to the `official Nagios plugin\ndevelopment guidelines `_.\n\nTo see a complete list of command line options with brief explanations, run\n**check_ganglia_metric** with the ``--help`` option.\n\n\nNagios Configuration\n--------------------\n\nFirst, create a command definition:\n\n::\n\n define command {\n command_name check_ganglia_metric\n command_line /usr/bin/check_ganglia_metric.py --gmetad_host=gmetad-server.example.com --metric_host=$HOSTADDRESS$ --metric_name=$ARG1$ --warning=$ARG2$ --critical=$ARG3$\n }\n\nNow you can use the above command in your service definitions:\n\n::\n\n define service {\n service_description CPU idle - Ganglia\n use some_template\n check_command check_ganglia_metric!cpu_idle!0:20!0:0\n host_name host.example.com\n }\n\nThis will work fine until something goes wrong with **check_ganglia_metric**\n(e.g. the cache file can't be read/written to, the Ganglia Meta Daemon can't be\nreached, etc.). At that point, every service that relies on\n**check_ganglia_metric** will fail, possibly inundating you with alerts. We can\nprevent this through the use of `service dependencies `_.\n\nThe first thing we need is a command definition for checking the age of a file:\n\n::\n\n define command {\n command_name check_file_age\n command_line /usr/lib/nagios/plugins/check_file_age -f $ARG1$ -w $ARG2$ -c $ARG3$\n }\n\nNext, we define a service which checks the age of **check_ganglia_metric**'s\ncache file. Note that in order to be truly effective, this service needs to be\nchecked at least as (preferably more) frequently than all the other checks\nthat rely on **check_ganglia_metric**:\n\n::\n\n define service {\n service_description Cache for check_ganglia_metric\n use some_template\n check_command check_file_age!/var/lib/nagios/.check_ganglia_metric.cache!60!120\n host_name localhost\n check_interval 1\n max_check_attempts 1\n }\n\nAnd finally, we set up the actual service dependency. Note that I've enabled\n**use_regexp_matching** in Nagios, which allows me to use regular expressions\nin my directives. By sticking \"- Ganglia\" at the end of every service that\nrelies on **check_ganglia_metric**, I can save myself a lot of effort:\n\n::\n\n define servicedependency {\n host_name localhost\n service_description Cache for check_ganglia_metric\n dependent_host_name .*\n dependent_service_description .* \\- Ganglia$\n execution_failure_criteria c,p\n }\n\nNow if something goes wrong with **check_ganglia_metric**, only one alert will\nbe sent out about the cache file, and all dependent service checks will be\npaused until you fix the problem that caused **check_ganglia_metric** to fail.\nOnce the problem is fixed, you'll need to update the timestamp on the cache\nfile in order to put the \"Cache for check_ganglia_metric\" service back into an\nOK state (which will allow dependent service checks to continue):\n\n::\n\n $ touch /var/lib/nagios/.check_ganglia_metric.cache\n\n\nTips and Tricks\n---------------\n\nIt's possible to get a complete list of available hosts and metrics by enabling\n\"more verbose\" logging (``-vv``). Since the metric_host and metric_name options\nare required, you have a little bit of a \"chicken and egg\" problem here, but\nthat's OK. Just supply some dummy data. The plugin will error out at the end\nwith a \"host/metric not found\" error, but not before it dumps its cache:\n\n::\n\n $ check_ganglia_metric.py --gmetad_host=gmetad-server.example.com \\\n --metric_host=dummy --metric_name=dummy -vv\n\n\nKnown Issues\n------------\n\n- Doesn't work with Python 2.4\n\n\nChange Log\n----------\n\n2012.02.28\n~~~~~~~~~~\n\n- Add --metrics_max_age option\n- Merge CHANGELOG.rst into README.rst\n\n2011.09.09\n~~~~~~~~~~\n\n- Fix crash when metric name has no title\n- Add CHANGELOG.rst\n\n2011.05.10a\n~~~~~~~~~~~\n\n- Initial public release\n\n\nLicense\n-------\n\nCopyright (C) 2011 Michael Paul Thomas Conigliaro\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n\nCredits\n-------\n\n- `Michael Paul Thomas Conigliaro `_: Original author\n- `Vladimir Vuksan `_: Inspiration (check_ganglia_metric.php) and many suggestions\n- Julien Rottenberg: --metrics_max_age option",
"description_content_type": null,
"docs_url": null,
"download_url": "UNKNOWN",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "http://github.com/mconigliaro/check_ganglia_metric",
"keywords": "nagios ganglia monitoring",
"license": "UNKNOWN",
"maintainer": null,
"maintainer_email": null,
"name": "check_ganglia_metric",
"package_url": "https://pypi.org/project/check_ganglia_metric/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/check_ganglia_metric/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "http://github.com/mconigliaro/check_ganglia_metric"
},
"release_url": "https://pypi.org/project/check_ganglia_metric/2012.02.28/",
"requires_dist": null,
"requires_python": null,
"summary": "Ganglia metric check plugin for Nagios",
"version": "2012.02.28"
},
"last_serial": 787357,
"releases": {
"2011.05.10a": [
{
"comment_text": "",
"digests": {
"md5": "5e25c47c6d64b6a738b43316e4e80ec5",
"sha256": "16330188eea71f182026fdc97ad242c8273b39787d98a28187e92d8bf2247575"
},
"downloads": -1,
"filename": "check_ganglia_metric-2011.05.10a.tar.gz",
"has_sig": false,
"md5_digest": "5e25c47c6d64b6a738b43316e4e80ec5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12020,
"upload_time": "2011-05-10T21:53:02",
"url": "https://files.pythonhosted.org/packages/66/8b/9e6440ffbe2ded02f4f7a163c895277f4b81e18598f5cd6990c38d8d143b/check_ganglia_metric-2011.05.10a.tar.gz"
}
],
"2011.09.09": [
{
"comment_text": "",
"digests": {
"md5": "60846a0e1901d462d482d89f93120d22",
"sha256": "2839bf77a5050cbad3c6067c2d5baab9193f1c946834c989bcedf9f8ca407009"
},
"downloads": -1,
"filename": "check_ganglia_metric-2011.09.09.tar.gz",
"has_sig": false,
"md5_digest": "60846a0e1901d462d482d89f93120d22",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12563,
"upload_time": "2011-09-09T18:38:25",
"url": "https://files.pythonhosted.org/packages/5a/b7/5540d13959ce948dd87c45651f6d1d6b0df5214307b2f4e96251bfcd15dd/check_ganglia_metric-2011.09.09.tar.gz"
}
],
"2012.02.28": [
{
"comment_text": "",
"digests": {
"md5": "f3623577aa04fb7b53b374f664cd8483",
"sha256": "00229517cbf951c1f503f8a13bdb82079c8e823a533c3f70e666aeed3e22861a"
},
"downloads": -1,
"filename": "check_ganglia_metric-2012.02.28.tar.gz",
"has_sig": false,
"md5_digest": "f3623577aa04fb7b53b374f664cd8483",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12794,
"upload_time": "2012-03-01T19:12:02",
"url": "https://files.pythonhosted.org/packages/8a/a4/753aa223d34068c6905df30814baf5c34cf5831796eccf43616595eb16d0/check_ganglia_metric-2012.02.28.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "f3623577aa04fb7b53b374f664cd8483",
"sha256": "00229517cbf951c1f503f8a13bdb82079c8e823a533c3f70e666aeed3e22861a"
},
"downloads": -1,
"filename": "check_ganglia_metric-2012.02.28.tar.gz",
"has_sig": false,
"md5_digest": "f3623577aa04fb7b53b374f664cd8483",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12794,
"upload_time": "2012-03-01T19:12:02",
"url": "https://files.pythonhosted.org/packages/8a/a4/753aa223d34068c6905df30814baf5c34cf5831796eccf43616595eb16d0/check_ganglia_metric-2012.02.28.tar.gz"
}
]
}