{ "info": { "author": "Claudio Benfatto", "author_email": "claudio.benfatto@springer.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Topic :: System :: Systems Administration" ], "description": "# newrelic-alerts-manager\n\n`newrelic-alerts-manager` is a simple utility which allows to dynamically update the newrelic server alerting\npolicies based on the value of some specific tags added to them.\n\nThe code is compatible with Python 3\n\nDocumentation of the APIs used:\n\n* https://docs.newrelic.com/docs/apis\n\n#INSTALLATION\n\n## Example\n\nInstall via pip: `pip install newrelic-alerts-manager`\n\n## Upload to PyPI\n\n1. Create a `.pypirc` configuration file. This file holds your information for authenticating with PyPI.\n\n ```\n [distutils]\n index-servers = pypi\n\n [pypi]\n repository=https://pypi.python.org/pypi\n username=your_username\n password=your_password\n ```\n2. Login and upload it to PyPI\n\n ```\n python setup.py register -r pypi\n python setup.py sdist upload -r pypi\n ```\n\n#USAGE\n\n##ALERT_CONFIG configuration\n\n\n#####example configuration:\n```\n\nalert_policies:\n - name: \"Alert Policy LIVE\"\n tags:\n - live-web\n - live-backend\n - name: \"Alert Policy DEV\"\n tags:\n - dev-web\n - dev-database\n\n```\n\nthe `ALERT_CONFIG` configuration is a `yaml` formatted document, containing an array of `alert_policies`. \nEach alert policy is identified by its newrelic name and contains a list of server tags \n([newrelic labels](https://docs.newrelic.com/docs/data-analysis/user-interface-functions/organize-your-data/labels-categories-organize-apps-servers-monitors)) listing the servers\nassociated with it (with all its conditions).\n\nThe only supported server label is currently `Deployment`. Therefore ie., according to the configuration above,\nthe only servers associated with the `Alert Policy LIVE` would be those labelled in newrelic with one or both of the \n`Deployment:live-web` and `Deployment:live-backend` server labels.\n\n##Running as a web app\n\n\n\n##Running on Cloudfoundry\n\nWhen running on Cloudfoundry you will need a properly formatted application manifest. One example manifest can\nbe found below, as well as in the `manifest-example.yml` file:\n```\napplications:\n- name: newrelic-alerts-manager\n memory: 128M\n instances: 1\n env:\n NEWRELIC_API_KEY: \n ALERT_CONFIG: |\n ---\n alert_policies:\n - name: \"Alert Policy LIVE\"\n tags:\n - live-web\n - live-backend\n - name: \"Alert Policy DEV\"\n tags:\n - dev-web\n - dev-database\n\n```\n\nin this case the alert configuration is passed to the app in the form of an online yaml document.\n\nThe `NEWRELIC_API_KEY` variable can be either specified in the manifest itself or binding your app to a\nnewrelic service, created via a service broker ie. using [newrelic-cf](https://github.com/newrelic/newrelic-cf).\n\nIn this case the key is expected to be found under the `VCAP_SERVICES[\"newrelic\"][0][\"credentials\"][\"licenseKey\"]`\ndictionary key.\n\n##Running as a script\n\nAn alert config file named `alert_config.yml` should be present in the execution directory. An example can be found\nat the root of this project in the `alert_config.example.yml` file.\n\nYou can specify an alternative configuration file path via the `-c` flag\n\nYou can run the utility by executing the run script:\n\n```\n./run -k \n```\n\nor after installing the pip package\n\n```\npython setup.py install\n```\n\nby running\n\n```\nnewrelic-alerts-manager -k \n```\n\n## Author\n\nSpringer Nature Platform Engineering, Claudio Benfatto (claudio.benfatto@springer.com)\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/SpringerPE/newrelic-alerts-manager/releases/tag/v0.0.10", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/SpringerPE/newrelic-alerts-manager", "keywords": "newrelic alerts alerting", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "newrelic-alerts-manager", "package_url": "https://pypi.org/project/newrelic-alerts-manager/", "platform": "", "project_url": "https://pypi.org/project/newrelic-alerts-manager/", "project_urls": { "Download": "https://github.com/SpringerPE/newrelic-alerts-manager/releases/tag/v0.0.10", "Homepage": "https://github.com/SpringerPE/newrelic-alerts-manager" }, "release_url": "https://pypi.org/project/newrelic-alerts-manager/0.0.10/", "requires_dist": null, "requires_python": "", "summary": "Utility to keep newrelic server policies update via a configuration manifest", "version": "0.0.10" }, "last_serial": 3747917, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "82ca5ca2c92628ba80c3d8ec792b1a2e", "sha256": "9b3e4b267c2d4452457018ca1be736360514a0b8294907eb303a6c6e4d4a793e" }, "downloads": -1, "filename": "newrelic-alerts-manager-0.0.1.tar.gz", "has_sig": false, "md5_digest": "82ca5ca2c92628ba80c3d8ec792b1a2e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9365, "upload_time": "2017-10-30T16:03:44", "url": "https://files.pythonhosted.org/packages/8d/f8/faf263bc19dc9bf2d268a0354506c3dfac1b6896c017b2608454c3fa2aac/newrelic-alerts-manager-0.0.1.tar.gz" } ], "0.0.10": [ { "comment_text": "", "digests": { "md5": "201b44f311d556fc48777cf00cd48f6a", "sha256": "e3fff8d51edc61adacc4597ec05f22f7b19aa9c4a0be401cc548747dee5f5ba9" }, "downloads": -1, "filename": "newrelic-alerts-manager-0.0.10.tar.gz", "has_sig": false, "md5_digest": "201b44f311d556fc48777cf00cd48f6a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10542, "upload_time": "2017-11-22T10:34:46", "url": "https://files.pythonhosted.org/packages/b4/35/dab42adabc27afa0fb04eb4fa63a61827fe14b1f843ad7fe2398fe8b8532/newrelic-alerts-manager-0.0.10.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "8dc4a5f896e5ee6030f3bdaadfbfdf70", "sha256": "d30f6826be7ef7216b81a51f216b21116d52b67f74a7a88172a0d12cf0bfa645" }, "downloads": -1, "filename": "newrelic-alerts-manager-0.0.2.tar.gz", "has_sig": false, "md5_digest": "8dc4a5f896e5ee6030f3bdaadfbfdf70", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9649, "upload_time": "2017-10-30T16:17:40", "url": "https://files.pythonhosted.org/packages/9f/df/22bead551a8eab48edb191a6171ceb2401500e18dcf2a70c961119d2eb80/newrelic-alerts-manager-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "4451e875d9d6c1aaf9d83e91b4691991", "sha256": "905407c672e5592aaddb646889b11b4280d8e1c5749e20f9f77183afeaaea3f9" }, "downloads": -1, "filename": "newrelic-alerts-manager-0.0.3.tar.gz", "has_sig": false, "md5_digest": "4451e875d9d6c1aaf9d83e91b4691991", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9661, "upload_time": "2017-10-30T16:22:54", "url": "https://files.pythonhosted.org/packages/b4/a4/957c6d83932f3180e8fb8a9a92f1a8a70784a5cf1b828af3b6f61de60978/newrelic-alerts-manager-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "8309b3db48ee6b8d744ab252a5861ea4", "sha256": "4088333335f5de8530e3c11bbc58a27d1a56f6916529ce9e6f60001a78dd4ed7" }, "downloads": -1, "filename": "newrelic-alerts-manager-0.0.4.tar.gz", "has_sig": false, "md5_digest": "8309b3db48ee6b8d744ab252a5861ea4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9876, "upload_time": "2017-10-30T17:26:46", "url": "https://files.pythonhosted.org/packages/d8/66/5fd06abf098a75c2a05d057f6ae1236b8043f7aaa1927ea999fc05ab077c/newrelic-alerts-manager-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "07f37b5bc00b885789d7c7ccce4acd4a", "sha256": "0588656a09060781a78b43292ded842f95ea743012e15a752b68ca16a6ae15d2" }, "downloads": -1, "filename": "newrelic-alerts-manager-0.0.5.tar.gz", "has_sig": false, "md5_digest": "07f37b5bc00b885789d7c7ccce4acd4a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9803, "upload_time": "2017-10-30T19:38:52", "url": "https://files.pythonhosted.org/packages/65/b2/7f73b131e1838b2b961cebf8b63cb07757fc798d6d582f0cba7cc8263f9e/newrelic-alerts-manager-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "d5999c1649aedb5d587c9d8df77dcb3d", "sha256": "63a2dca3175da648dfec7a5ab209188ea395bbe34f219996413788383439bb5d" }, "downloads": -1, "filename": "newrelic-alerts-manager-0.0.6.tar.gz", "has_sig": false, "md5_digest": "d5999c1649aedb5d587c9d8df77dcb3d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9814, "upload_time": "2017-10-30T19:43:15", "url": "https://files.pythonhosted.org/packages/40/f8/940170463e24ef1c75df91eb444a48a3fdd4817052c39fd63c3658e4b113/newrelic-alerts-manager-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "d930f403e902851c4964b4e145127b7e", "sha256": "1923b08657252faec79a07f2967cf9876f676abbe8ad66d5992d5c42db1d178d" }, "downloads": -1, "filename": "newrelic-alerts-manager-0.0.7.tar.gz", "has_sig": false, "md5_digest": "d930f403e902851c4964b4e145127b7e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9702, "upload_time": "2017-10-30T21:03:45", "url": "https://files.pythonhosted.org/packages/99/15/339b66cf24bebc7072ff1954f218dee1f5e1af57787fdf96bb5df3f4128a/newrelic-alerts-manager-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "2c790f596f17a538d6528f2adecbcdd4", "sha256": "cc2b223eff55c5e6a52ba6cb8db93ce7ec44ae500bcc92c8d9988438523c1082" }, "downloads": -1, "filename": "newrelic-alerts-manager-0.0.8.tar.gz", "has_sig": false, "md5_digest": "2c790f596f17a538d6528f2adecbcdd4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10554, "upload_time": "2017-10-30T21:29:05", "url": "https://files.pythonhosted.org/packages/32/a3/c4bb9dcc7c8ad48bcf61bee3864894f3851f9f052b95058b3230a9ab7113/newrelic-alerts-manager-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "95ef9c0a0d1d6222e57c919ffffb58fc", "sha256": "3b33938afeb6476f402c2cd7e664eb8f3ff0adf16dbec3b6d4bba57dfffed358" }, "downloads": -1, "filename": "newrelic-alerts-manager-0.0.9.tar.gz", "has_sig": false, "md5_digest": "95ef9c0a0d1d6222e57c919ffffb58fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10549, "upload_time": "2017-11-22T10:31:34", "url": "https://files.pythonhosted.org/packages/fb/6a/87e623f8c6313184aeaf04d570c56ac67edf66d97325a4fa1c66042e9f48/newrelic-alerts-manager-0.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "201b44f311d556fc48777cf00cd48f6a", "sha256": "e3fff8d51edc61adacc4597ec05f22f7b19aa9c4a0be401cc548747dee5f5ba9" }, "downloads": -1, "filename": "newrelic-alerts-manager-0.0.10.tar.gz", "has_sig": false, "md5_digest": "201b44f311d556fc48777cf00cd48f6a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10542, "upload_time": "2017-11-22T10:34:46", "url": "https://files.pythonhosted.org/packages/b4/35/dab42adabc27afa0fb04eb4fa63a61827fe14b1f843ad7fe2398fe8b8532/newrelic-alerts-manager-0.0.10.tar.gz" } ] }