{ "info": { "author": "Tomasz Jaskowski", "author_email": "tadeck@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Financial and Insurance Industry", "Intended Audience :: Healthcare Industry", "Intended Audience :: Information Technology", "Intended Audience :: Legal Industry", "Intended Audience :: System Administrators", "Intended Audience :: Telecommunications Industry", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Internet :: WWW/HTTP :: Site Management", "Topic :: Software Development :: Bug Tracking", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Logging", "Topic :: System :: Monitoring" ], "description": "================\n``pagerdutyapi``\n================\n\nVery basic wrapper for PagerDuty API\n\nCurrent functionality:\n\n- create trigger for known service key, with incident key,\n- handle all documented errors,\n- attach context (links, images) to trigger,\n- logging functionality to send alerts to PagerDuty facilities,\n- ability to add logging handler configurable from config dict,\n\nTODO:\n\n- write tests for the above,\n- write examples on how it is done,\n\nPossible further features:\n\n- other functionality (not only sending alerts, but also reading/changing other\n resources),\n- convenience shortcuts for various frameworks,\n- make ``pagerdutyapi`` do not have dependencies except ``six``,\n\n---------------------\nLogging configuration\n---------------------\n\nLogging configuration can make use of this module. Sample dict config could\nlook like this::\n\n {\n 'version': 1,\n 'handlers': {\n 'pagerduty': {\n 'class': 'pagerdutyapi.handlers.PagerDutyHandler',\n 'service_id': 'YOUR_SERVICE_ID',\n 'level': 'ERROR', # process only errors\n },\n },\n 'loggers': {\n 'pd_logger': {\n 'propagate': True, # call other loggers\n 'handlers': ['pagerduty'],\n },\n },\n }\n\nAnd then you could use it like this::\n\n import logging\n\n logger = logging.getLogger('pd_logger')\n logger.error(\n 'Error level on instance %s above threshold: %s',\n instance_id,\n current_level,\n )\n\nwhere ``instance_id`` and ``current_level`` are some variables.\n\nBy default the incident will be created based on the template message (in this\ncase \"``Error level on instance %s above threshold: %s``\"), so it is important\nto pass variable parts as positional arguments to logging method.\n\nAlternatively you could pass ``incident_key`` specifically as part of ``extra``\nparam during logging call::\n\n logger.error(\n 'Error level on instance %s above threshold: %s',\n instance_id,\n current_level,\n extra={\n 'incident_key': 'THRESHOLD_ALERTS_INSTANCE_{}'.format(instance_id),\n },\n )\n\nYou can also override incident key during handler configuration::\n\n {\n ...\n 'handlers': {\n 'pagerduty': {\n 'class': 'pagerdutyapi.handlers.PagerDutyHandler',\n 'service_id': 'YOUR_SERVICE_ID',\n 'incident_key': 'YOUR_INCIDENT_KEY', # override incident keys\n 'level': 'ERROR', # process only errors\n },\n },\n ...\n }\n\nThis way, incident keys will be overwritten for all logging calls.\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/tirasu/pagerdutyapi/archive/v0.2.0.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tirasu/pagerdutyapi/", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "pagerdutyapi", "package_url": "https://pypi.org/project/pagerdutyapi/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pagerdutyapi/", "project_urls": { "Download": "https://github.com/tirasu/pagerdutyapi/archive/v0.2.0.tar.gz", "Homepage": "https://github.com/tirasu/pagerdutyapi/" }, "release_url": "https://pypi.org/project/pagerdutyapi/0.4.1/", "requires_dist": null, "requires_python": null, "summary": "PagerDuty support, mostly reporting alerts", "version": "0.4.1" }, "last_serial": 2021147, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "522987903c0f32fd35aab8cf9cbd13af", "sha256": "6b005cfdab111c9e5087e42a74db8ca6c8d6bfc898f82367e01029954a8a42f5" }, "downloads": -1, "filename": "pagerdutyapi-0.1.0.tar.gz", "has_sig": false, "md5_digest": "522987903c0f32fd35aab8cf9cbd13af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4674, "upload_time": "2016-03-17T12:16:33", "url": "https://files.pythonhosted.org/packages/e7/1a/19cba5b9696ab33fe2d1d196f906601b4d8328478e65dcd7ea7e75f4b9d4/pagerdutyapi-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "8e4f6415754a6772159af8de72836c94", "sha256": "8c69cd85a8882de2d023eb41e06a8ff91b85dbc6ce25d85607d6710d3c82124d" }, "downloads": -1, "filename": "pagerdutyapi-0.1.1.tar.gz", "has_sig": false, "md5_digest": "8e4f6415754a6772159af8de72836c94", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4631, "upload_time": "2016-03-17T12:29:18", "url": "https://files.pythonhosted.org/packages/7c/73/d532bab5b28da4de522b0f69eb1968c5c1cc1e64d8a3bc650996ec1f7c4a/pagerdutyapi-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "ac1aa726f1ff814abfcc1293bec11cf3", "sha256": "32c372c05e8bbc35ab9541870332b7ac2a22f1acac85423026a0dfa34280f89e" }, "downloads": -1, "filename": "pagerdutyapi-0.2.0.tar.gz", "has_sig": false, "md5_digest": "ac1aa726f1ff814abfcc1293bec11cf3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5817, "upload_time": "2016-03-17T23:49:28", "url": "https://files.pythonhosted.org/packages/bd/58/8697813117a9a236c96ee392e25c6a3da25cc4e4b788cd2ddb97d849fc8e/pagerdutyapi-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "b16721a1e57e40e62ec518bfa2ffc8ca", "sha256": "c49f82a6729cfe83f3244ca4a8a4378e248cbe50b14e86dec11c8ed67f4b9ca5" }, "downloads": -1, "filename": "pagerdutyapi-0.3.0.tar.gz", "has_sig": false, "md5_digest": "b16721a1e57e40e62ec518bfa2ffc8ca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5911, "upload_time": "2016-03-18T00:21:12", "url": "https://files.pythonhosted.org/packages/c7/d7/1ac45cb0e189a0d18793dee4be2b6087d319dd73a109db155b2a615d2e8f/pagerdutyapi-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "8ac4f145051fe7f79a2666feaf4ff1de", "sha256": "c1c6448649591b6d6c30ccbcdab1945a95a9c222ea1cece92a635f759d2117ef" }, "downloads": -1, "filename": "pagerdutyapi-0.4.0.tar.gz", "has_sig": false, "md5_digest": "8ac4f145051fe7f79a2666feaf4ff1de", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5910, "upload_time": "2016-03-22T18:04:21", "url": "https://files.pythonhosted.org/packages/07/83/3761f5fc5506112fce83f4418faa78fc856b1d4513a47b9851ce1383bf1e/pagerdutyapi-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "9beb4eb7cdda7e0311c47ff45070dd22", "sha256": "17495e0d85a7abd7bdf54eb228216809fe12911498054c67a44f687683e5681e" }, "downloads": -1, "filename": "pagerdutyapi-0.4.1.tar.gz", "has_sig": false, "md5_digest": "9beb4eb7cdda7e0311c47ff45070dd22", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5943, "upload_time": "2016-03-22T18:24:04", "url": "https://files.pythonhosted.org/packages/a9/d4/b846b2b2ec5597e4fdfa53117f20523058232f658251d7c60aab6fa3970b/pagerdutyapi-0.4.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9beb4eb7cdda7e0311c47ff45070dd22", "sha256": "17495e0d85a7abd7bdf54eb228216809fe12911498054c67a44f687683e5681e" }, "downloads": -1, "filename": "pagerdutyapi-0.4.1.tar.gz", "has_sig": false, "md5_digest": "9beb4eb7cdda7e0311c47ff45070dd22", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5943, "upload_time": "2016-03-22T18:24:04", "url": "https://files.pythonhosted.org/packages/a9/d4/b846b2b2ec5597e4fdfa53117f20523058232f658251d7c60aab6fa3970b/pagerdutyapi-0.4.1.tar.gz" } ] }