{ "info": { "author": "aodj", "author_email": "alexander@dohop.com", "bugtrack_url": null, "classifiers": [], "description": "|Build Status| |Coveralls Status|\n\nThis is a port of the\n`Supervisor-logging `__\nproject. Along with capturing loglines, as Supervisor-logging does, it's\nalso intended to capture the\n`PROCESS_STATE `__\nevents that Supervisor emits.\n\nsupervisor-logstash-notifier\n============================\n\nA `supervisor `__ plugin to stream events & logs to a\nLogstash instance.\n\nInstallation\n------------\n\nPython 2.7 or Python 3.4+ is required.\n\n::\n\n pip install supervisor-logstash-notifier\n\nNote that Supervisor itself does not yet work on Python 3, though it can\nbe installed in a separate environment (because\nsupervisor-logstash-notifier is a separate process).\n\nUsage\n-----\n\nThe Logstash instance to send the events to is configured with the\nenvironment variables:\n\n- ``LOGSTASH_SERVER``\n- ``LOGSTASH_PORT``\n- ``LOGSTASH_PROTO``\n\nAdd the plugin as an event listener:\n\n::\n\n # Capture state changes\n [eventlistener:logging]\n command = logstash_notifier\n events = PROCESS_STATE\n\n # Capture stdout/stderr\n [eventlistener:logging]\n command = logstash_notifier --capture-output\n events = PROCESS_LOG\n\n # Capture state changes and stdout/stderr\n [eventlistener:logging]\n command = logstash_notifier --capture-output\n events = PROCESS_STATE,PROCESS_LOG\n\nIf you don't wish to define the environment variables for the entire\nshell, you can pass them in via Supervisor's configuration:\n\n::\n\n [eventlistener:logging]\n environment=LOGSTASH_SERVER=\"127.0.0.1\",LOGSTASH_PORT=\"12201\",LOGSTASH_PROTO=\"tcp\"\n command=logstash_notifier\n events=PROCESS_STATE\n\nEnable the log events in your program:\n\n::\n\n [program:yourprogram]\n stdout_events_enabled = true\n stderr_events_enabled = true\n\nAdvanced Usage\n--------------\n\nIt is also possible to include environment variables in the event messages,\nby specifying the name of the environment variables to include:\n\n::\n\n [eventlistener:logging]\n command=export IPV4=`ec2metadata --local-ipv4`; logstash_notifier --include IPV4\n events=PROCESS_STATE\n\nOr alternatively, by specifying arbitrary keyvals of data to log:\n\n::\n\n [eventlistener:logging]\n command=logstash_notifier --include bears=\"polar,brown,black\" notbears=\"unicorn,griffin,sphinx,otter\"\n events=PROCESS_STATE\n\nThese two forms of arbitrary user data inclusion can be combined, and used together\nif necessary.\n\nRunning with Logstash\n---------------------\n\nLogstash can be simply configured to receive events:\n\n::\n\n input {\n tcp {\n port => 12201\n codec => json\n }\n }\n\n output {\n stdout {\n codec => rubydebug\n }\n }\n\nThe JSON produced by the events and log output will look like this:\n\n::\n\n # State changes\n {\n \"@timestamp\": \"2016-03-28T23:58:03.469Z\",\n \"@version\": \"1\",\n \"eventname\": \"PROCESS_STATE_STOPPED\",\n \"from_state\": \"STOPPING\",\n \"groupname\": \"myprocess\",\n \"host\": \"ip-10-93-130-24\",\n \"level\": \"INFO\",\n \"logger_name\": \"supervisor\",\n \"message\": \"PROCESS_STATE_STOPPED collectd\",\n \"path\": \"/path/to/supervisor-logstash-notifier/logstash_notifier/__init__.py\",\n \"pid\": \"1234\",\n \"processname\": \"myprocess\",\n \"tags\": [],\n \"type\": \"logstash\"\n }\n\n # Log output\n {\n \"@timestamp\": \"2016-03-28T23:58:03.741Z\",\n \"@version\": \"1\",\n \"channel\": \"stdout\"\n \"eventname\": \"PROCESS_LOG_STDOUT\",\n \"groupname\": \"myprocess\",\n \"host\": \"localhost\",\n \"level\": \"INFO\",\n \"logger_name\": \"supervisor\",\n \"message\": \"myprocess output #1\\n\",\n \"path\": \"/path/to/supervisor-logstash-notifier/logstash_notifier/__init__.py\",\n \"pid\": \"1234\",\n \"processname\": \"myprocess\",\n \"tags\": [],\n \"type\": \"logstash\",\n }\n\n.. |Build Status| image:: https://travis-ci.org/dohop/supervisor-logstash-notifier.svg?branch=master\n :target: https://travis-ci.org/dohop/supervisor-logstash-notifier\n.. |Coveralls Status| image:: https://coveralls.io/repos/github/dohop/supervisor-logstash-notifier/badge.svg?branch=master\n :target: https://coveralls.io/github/dohop/supervisor-logstash-notifier?branch=master\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dohop/supervisor-logstash-notifier", "keywords": "", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "supervisor-logstash-notifier", "package_url": "https://pypi.org/project/supervisor-logstash-notifier/", "platform": "", "project_url": "https://pypi.org/project/supervisor-logstash-notifier/", "project_urls": { "Homepage": "https://github.com/dohop/supervisor-logstash-notifier" }, "release_url": "https://pypi.org/project/supervisor-logstash-notifier/0.2.5/", "requires_dist": [ "python-logstash (==0.4.6)", "six (>=1.10.0)", "argparse" ], "requires_python": "", "summary": "Stream supervisor events to a logstash instance", "version": "0.2.5" }, "last_serial": 3768840, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "32715e8d4766ee62ad77c33223f21300", "sha256": "40d10813fb546cca8856482fe906b22592c7e905e86b894dfae9d30e90d7bdff" }, "downloads": -1, "filename": "supervisor_logstash_notifier-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "32715e8d4766ee62ad77c33223f21300", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12778, "upload_time": "2016-03-30T23:23:43", "url": "https://files.pythonhosted.org/packages/aa/01/f419baea145a3246d3a4ae32aeb07f935dbb602d0a9eb6112b98ab246e22/supervisor_logstash_notifier-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0bf4318c80cadd8502cf65c79c19a3fb", "sha256": "484fcd836f45ace9a0c25685b3b7ee048652c9b7324f74e42e1359b9c047203b" }, "downloads": -1, "filename": "supervisor-logstash-notifier-0.2.0.tar.gz", "has_sig": false, "md5_digest": "0bf4318c80cadd8502cf65c79c19a3fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8778, "upload_time": "2016-03-30T23:23:52", "url": "https://files.pythonhosted.org/packages/13/39/55dc9e87e1b41e87bced70287a93ada08b6afaba672fad7b08e24e69c212/supervisor-logstash-notifier-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "2419304f01e3d82e8876d8cfb8b208ba", "sha256": "465a2e49a5a4a5b125f9d20dfd2ba53e7691363490e8d5cd725bf11f18dba92d" }, "downloads": -1, "filename": "supervisor-logstash-notifier-0.2.1.tar.gz", "has_sig": false, "md5_digest": "2419304f01e3d82e8876d8cfb8b208ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8907, "upload_time": "2016-04-06T21:57:02", "url": "https://files.pythonhosted.org/packages/df/b0/082dc7f1f7e7949514a1ab768f02bfd22a953c06739289348933bd839874/supervisor-logstash-notifier-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "3674c3e660a2e7c851763c8d594b6f97", "sha256": "b8b7977eb3b2fa31c551994b037ee1ffe5d7fe16ceceb189f41c0a45fe065905" }, "downloads": -1, "filename": "supervisor-logstash-notifier-0.2.2.tar.gz", "has_sig": false, "md5_digest": "3674c3e660a2e7c851763c8d594b6f97", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10642, "upload_time": "2016-04-23T20:18:01", "url": "https://files.pythonhosted.org/packages/0e/09/2e57bb46063d94d4a8a2c431c7036e5b2232651547efd9a2b8aa431dabb5/supervisor-logstash-notifier-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "024832235b8d0005b771b85449bf99ae", "sha256": "f6bc0872496f078025b35a2d0dd6920518f74315433eb441ef725f8254056c6e" }, "downloads": -1, "filename": "supervisor_logstash_notifier-0.2.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "024832235b8d0005b771b85449bf99ae", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8583, "upload_time": "2016-09-22T14:39:36", "url": "https://files.pythonhosted.org/packages/bb/d2/07e3eb5baf22e4a80762f809fc488a32dc0d93305b8a37a1b3d19f0e54a3/supervisor_logstash_notifier-0.2.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9706bb469d5e5c49bfacc155c7211ca4", "sha256": "6414d44ce3be9f0da1f45de8f9abb1da0b03ad66856306b6b127eb4df3918da5" }, "downloads": -1, "filename": "supervisor-logstash-notifier-0.2.3.tar.gz", "has_sig": false, "md5_digest": "9706bb469d5e5c49bfacc155c7211ca4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6100, "upload_time": "2016-06-01T10:59:51", "url": "https://files.pythonhosted.org/packages/88/0d/d03013b3ea7491bcb11a9705f66980021e1780a43f5dd58683def916b600/supervisor-logstash-notifier-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "cade282befe12efc589b1725ece76703", "sha256": "97c9d7103e09d4efd6f43471b5ffce3b265791746de683acc412c68b30bed5a2" }, "downloads": -1, "filename": "supervisor_logstash_notifier-0.2.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cade282befe12efc589b1725ece76703", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8582, "upload_time": "2016-09-22T14:48:02", "url": "https://files.pythonhosted.org/packages/e4/88/4a7e808e6249d7d8a18d7878144f4224f8a42851d2007ec38bb9459a699e/supervisor_logstash_notifier-0.2.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e76f87c8c8dded86d47c9c2ed9141c49", "sha256": "3ae50b369c953ed133b2fe7564076bd56101586cadc9fa30f0a916487f80b301" }, "downloads": -1, "filename": "supervisor-logstash-notifier-0.2.4.tar.gz", "has_sig": false, "md5_digest": "e76f87c8c8dded86d47c9c2ed9141c49", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6096, "upload_time": "2016-09-22T14:48:04", "url": "https://files.pythonhosted.org/packages/ef/92/6507821f29925a2a67de73d1087075aeaac6c19172e35554158a3d852677/supervisor-logstash-notifier-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "6e519b8e6f9fd5120e80e5a3348788aa", "sha256": "cfa045f28ce169eaff26796feb87003696cc9c10ad04b9a81c51371ed4b8eeab" }, "downloads": -1, "filename": "supervisor_logstash_notifier-0.2.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6e519b8e6f9fd5120e80e5a3348788aa", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7603, "upload_time": "2018-04-16T11:12:03", "url": "https://files.pythonhosted.org/packages/c8/63/e703968c79614cc47e5716c0bdc02365ac609af3237813c5c625eb85bdef/supervisor_logstash_notifier-0.2.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3434de6daa3c01f02f6aa209be302288", "sha256": "f8db8781c1877ddcb234e7b34c68f0d589cf1db941d89f2bc97101078b2c6356" }, "downloads": -1, "filename": "supervisor-logstash-notifier-0.2.5.tar.gz", "has_sig": false, "md5_digest": "3434de6daa3c01f02f6aa209be302288", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6488, "upload_time": "2018-04-16T11:12:04", "url": "https://files.pythonhosted.org/packages/e4/b2/3cd80677014c65e640063e576a2e38b5e017494424724c0f80eb653f1d86/supervisor-logstash-notifier-0.2.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6e519b8e6f9fd5120e80e5a3348788aa", "sha256": "cfa045f28ce169eaff26796feb87003696cc9c10ad04b9a81c51371ed4b8eeab" }, "downloads": -1, "filename": "supervisor_logstash_notifier-0.2.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6e519b8e6f9fd5120e80e5a3348788aa", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7603, "upload_time": "2018-04-16T11:12:03", "url": "https://files.pythonhosted.org/packages/c8/63/e703968c79614cc47e5716c0bdc02365ac609af3237813c5c625eb85bdef/supervisor_logstash_notifier-0.2.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3434de6daa3c01f02f6aa209be302288", "sha256": "f8db8781c1877ddcb234e7b34c68f0d589cf1db941d89f2bc97101078b2c6356" }, "downloads": -1, "filename": "supervisor-logstash-notifier-0.2.5.tar.gz", "has_sig": false, "md5_digest": "3434de6daa3c01f02f6aa209be302288", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6488, "upload_time": "2018-04-16T11:12:04", "url": "https://files.pythonhosted.org/packages/e4/b2/3cd80677014c65e640063e576a2e38b5e017494424724c0f80eb653f1d86/supervisor-logstash-notifier-0.2.5.tar.gz" } ] }