{ "info": { "author": "Dominic LoBue", "author_email": "dominic.lobue@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "##############################################\n nagifo - Send nagios alerts via notifo\n##############################################\n\n:Version: 0.2.0\n\nIntroduction\n------------\n\nNagifo is a simple little package to send nagios alerts to your mobile phone\nvia `Notifo`_, and to allow you to acknowledge nagios alerts without having to\nlogin to nagios.\n\n\n\nInstallation\n------------\n\nYou can install nagifo off the cheeseshop using ``pip`` or ``easy_install``, or\nyou can install from source.\n\nTo install using ``easy_install``,::\n\n $ easy_install nagifo\n\nTo install using ``pip``,::\n\n $ pip install nagifo\n\nIf you've downloaded the source tarball off the cheeseshop, or cloned the\nnagifo repository, you can install nagifo like so::\n\n $ python2 setup.py install\n\n\nConfiguration\n-------------\n\nNotifo\n======\n\nAny further configuration requires a `Notifo`_ account, so go sign up if you\nhaven't already (accounts are free). You will also require your Notifo API key.\nYou can find your personal API key on the `Notifo user settings`_ page.\n\nSince the entire point of this (at least for me) is to get alerts on a mobile\nphone, you'll probably also want to install the `Notifo`_ client on your phone.\n\nNote, everybody in your organization who wants notifications via Notifo will\nrequire their own `Notifo`_ account.\n\n\nNagios Configuration\n====================\n\nSetting up nagios to use nagifo to send notifications is as simple as I could\nfigure out how to make it. \n\nYou will require a command definition, which is what actually runs the nagifo\ncommand (make sure nagifo is in your $PATH!). These are commonly located in\n``commands.cfg``. Here is the command definition to use::\n\n define command{\n command_name notify-by-notifo\n command_line nagifo \\\n \"$CONTACTADDRESS1$\" \"$CONTACTADDRESS2$\" \"$NOTIFICATIONTYPE$\" \"$HOSTNAME$\" \\\n \"$SERVICESTATE$\" \"$SERVICEDESC$\" \"$SERVICEOUTPUT$ $LONGDATETIME$\"\n }\n\n\nTo get Nagios to send you an alert over `Notifo`_, you need to tell Nagios to\nrun the ``notify-by-notifo`` command when sending an alert to you. This is done\nby adding the following line to your contact definition::\n\n service_notification_commands +notify-by-notifo\n\nAnd since the nagifo script requires the username and API key of the user that\nit will be alerting, these are also required in the contact definition. As I\nhave no idea if Nagios supports arbitrary fields in a contact definition,\nI've used the ``address1`` field for the notifo username, and the ``address2``\nfield for the notifo API key.::\n\n address1 \n address2 \n\nHere's what an example of what a complete contact definition looks like::\n\n define contact{\n contact_name jdoe\n use generic-contact\n alias John Doe\n email jdoe@company.com\n address1 jdoe\n address2 lkjsdf908234234kjndflkjsdf2342345439sdfsdf3\n service_notification_commands +notify-by-notifo\n }\n\n\nAcknowledging from Notifo\n=========================\n\nIncluded with this package is a little webapp that will allow you to\nacknowledge alerts from your phone, without needing to log in to nagios.\nConfiguration of this webapp is admittedly more involved.\n\nFor the sake of brevity, I'm going to assume you're using apache2 to serve\nnagios, and have mod_wsgi installed and already loaded. That said, the quickest\nway of getting the webapp working is to add the following to the apache2\nconfiguration file::\n\n WSGIScriptAliasMatch /nagifo /var/www/nagifo.wsgi\n\nThe contents of ``/var/www/nagifo.wsgi`` are simply::\n\n from nagifo.nagacknowledge import app as application\n\nIf your setup differs from my assumptions, or more details are required, take a\nlook at the `Flask deployment guide`_.\n\nThe final thing required is the nagifo configuration file. The nagifo config\nfile is located at ``/etc/nagifo.conf``, and looks like::\n\n [default]\n nagios_cmdfile = /usr/local/nagios/var/rw/nagios.cmd\n secret_key = some_long_random_string22\n external_url = nottaken.net:4444/nagifo\n\nYou'll need to find where your nagios install puts its nagios.cmd file, and\nset ``nagios_cmdfile`` to the path of that file.\n\nThe ``secret_key`` should be some long random string. The purpose of the string\nis to act like a password and prevent random strangers from acknowledging your\nalerts by simply guessing at the url.\n\nThe ``external_url`` setting should be the publicly-accessible hostname of the\nserver nagios is running on, the port (if required), and the path the wsgi\nscript is running on. Since in the apache configuration example I direct the\nrequest to nagifo only if the URI starts with ``/nagifo``, the ``external_url``\nmust include ``/nagifo``.\n\n\n.. _Notifo: http://notifo.com\n.. _Notifo user settings: http://notifo.com/user/settings\n.. _Flask deployment guide: http://flask.pocoo.org/docs/deploying/", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dlobue/nagifo", "keywords": "notifo flask nagios nagifo icinga", "license": "GPLv3", "maintainer": null, "maintainer_email": null, "name": "nagifo", "package_url": "https://pypi.org/project/nagifo/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/nagifo/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/dlobue/nagifo" }, "release_url": "https://pypi.org/project/nagifo/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "Nagios notifications through notifo", "version": "0.2.0" }, "last_serial": 795166, "releases": { "0.1.3": [ { "comment_text": "", "digests": { "md5": "2ac1c7b41100bed84c4f6fc796213dfe", "sha256": "770d22588d878c7ba6e8ec2f848c74efc28ce3ee3d3f0fbdabc1c941becf0040" }, "downloads": -1, "filename": "nagifo-0.1.3.tar.gz", "has_sig": false, "md5_digest": "2ac1c7b41100bed84c4f6fc796213dfe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2909, "upload_time": "2010-09-22T05:40:35", "url": "https://files.pythonhosted.org/packages/a0/89/e08bf8a367292b63693a5b770eb0202d7d988cc26b8acb89e5821a78ee9b/nagifo-0.1.3.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "23c00bf6035b214a7bfadf17bc1017df", "sha256": "f73d3eade2327a0293562b3200376ee4411277a9813342b03ab1a113c19ec2cc" }, "downloads": -1, "filename": "nagifo-0.2.0.tar.gz", "has_sig": false, "md5_digest": "23c00bf6035b214a7bfadf17bc1017df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5188, "upload_time": "2011-06-24T10:46:52", "url": "https://files.pythonhosted.org/packages/ae/ba/74c0bbf4a701120b502004924fb0ea6667bb2b1c85abec2b3583749e35c4/nagifo-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "23c00bf6035b214a7bfadf17bc1017df", "sha256": "f73d3eade2327a0293562b3200376ee4411277a9813342b03ab1a113c19ec2cc" }, "downloads": -1, "filename": "nagifo-0.2.0.tar.gz", "has_sig": false, "md5_digest": "23c00bf6035b214a7bfadf17bc1017df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5188, "upload_time": "2011-06-24T10:46:52", "url": "https://files.pythonhosted.org/packages/ae/ba/74c0bbf4a701120b502004924fb0ea6667bb2b1c85abec2b3583749e35c4/nagifo-0.2.0.tar.gz" } ] }