{ "info": { "author": "S\u00f6ren Berger", "author_email": "soeren.berger@u1337.de", "bugtrack_url": null, "classifiers": [ "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)" ], "description": "# django-nagios-cache\n\n## Overview\nThis Django package provide Models for syncing data fom a Icinga/Nagios instance.\nThis may useful if you want to make queries to you monitoring system without\ndirectly connect to it for each lookup.\n\nIt is currently tested with Icinga 1.10.3.\n\n\nThe package consist of 2 main parts\n\n### Django Models\nThis is the datastruructure. I directly correlates with the Nagios/Icinga Services,\nServicegroups, Hosts and Hostgroups.\n\n### Management Command\nThe package provides a Management Command to sync the Data from the Nagios/Icinga Server.\nYou may also sync only parts of monitoring data e.g. only specific Hostgroups or Servicegroups\n## Installation\nTo install simply fetch it from pypi.\n```python\npip install django-nagios-cache\n```\nAfter that you have to add ```nagios_cache``` to your ```INSTALLED_APPS``` and\nrun\n```\npython manage.py migrate nagios_cache\n```\nThis will add the 4 Models to your database.\n\n## Configuration\ndjango-nagios-cache reads 4 configuration variables from your settings.py:\n```python\nNAGIOS_CACHE_URL = \"https://monitoring.example.org/cgi-bin/icinga/status.cgi\"\nNAGIOS_CACHE_USER' = \"nagios_user\",\nNAGIOS_CACHE_PASSWORD' = \"password_4_nagios_123\",\nNAGIOS_CACHE_AUTOCLEAN = False\nNAGIOS_CACHE_AUTOCLEAN_DAYS = 5\n```\nYou MUST specify ```NAGIOS_CACHE_URLNAGIOS_CACHE_URL```, while the other 2 are optional.\nIf there are no authentication details, ```django-nagios-cache``` will fetch the\ndata without authentication.\nIf you set ```NAGIOS_CACHE_AUTOCLEAN = True``` every query will automatically\nclean up the last ```NAGIOS_CACHE_AUTOCLEAN_DAYS``` unsynced entries.\n\n## Usage\nAt the first run you may want to execute\n```\npython manage.py nagios_sync\n```\n\nThis will sync everything. Note this could take some time. On my machine 20000 checks, 1500 hosts, 200 hostgroups and 10 servicegroups this take about 4 minutes.\n\nLater you may chose only to sync specific parts. Have a look at\n```\n./manage.py nagios_sync --help\n...\n --hostgroups [HOSTGROUPS [HOSTGROUPS ...]]\n Only sync the given hostgroups\n --servicegroups [SERVICEGROUPS [SERVICEGROUPS ...]]\n Only sync the given servicegroups\n --sync-hosts Sync hosts\n --sync-services Sync services\n --sync-hostgroups Sync hostgroups\n --sync-servicegroups Sync servicegroups\n --clean Cleanup database entries that are old than 1 day\n```\nYou can add this script to a crontab or use the API for a celery task. Have a\nlook at ```nagios_cache/management/commands/nagios_sync```. There are the calls for\nthe commandline options above.\n```python\nfrom django.utils import timezone\n\nt = timezone.now()\n\nNagiosHostStatus.clean_old(t)\nNagiosServiceStatus.import_all(t)\nNagiosHostgroup.import_all(t)\nNagiosServicegroup.import_single(t, 'dns')\n```", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/soerenbe/django-nagios-cache/tarball/0.2.0", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/soerenbe/django-nagios-cache", "keywords": "django,nagios,icinga", "license": "GPL-3", "maintainer": null, "maintainer_email": null, "name": "django-nagios-cache", "package_url": "https://pypi.org/project/django-nagios-cache/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-nagios-cache/", "project_urls": { "Download": "https://github.com/soerenbe/django-nagios-cache/tarball/0.2.0", "Homepage": "https://github.com/soerenbe/django-nagios-cache" }, "release_url": "https://pypi.org/project/django-nagios-cache/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "A Django library that sync data from a Nagios/Icinga server.", "version": "0.2.0" }, "last_serial": 3030807, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "9cb8b88cfd423e4e638c88fec3d9b82b", "sha256": "9d8211bc15d1e1abad01d11cc388e0f8bfc0c1dd660cddd72055a2b2fa4f47f8" }, "downloads": -1, "filename": "django-nagios-cache-0.1.tar.gz", "has_sig": false, "md5_digest": "9cb8b88cfd423e4e638c88fec3d9b82b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7934, "upload_time": "2016-08-30T21:20:50", "url": "https://files.pythonhosted.org/packages/25/ee/35af8774ca5a009bf543c2967bfe217f82a2f06c7bae90e0578ae5fbbe38/django-nagios-cache-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "f423816edd048fb10cb1ffa7b973e422", "sha256": "2a9a2f5dc70be494538030233cfd07c362ccdf6050c59bcad78e4b3ee671d7fb" }, "downloads": -1, "filename": "django-nagios-cache-0.1.1.tar.gz", "has_sig": false, "md5_digest": "f423816edd048fb10cb1ffa7b973e422", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7988, "upload_time": "2016-08-30T21:59:16", "url": "https://files.pythonhosted.org/packages/98/09/91074af70547060f1291e124d0487f0ca9c0c120cea311fe95db71fe1c7b/django-nagios-cache-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "7a759fdf0a621cf077a3960fb3b639c9", "sha256": "f6cd04240554e86f4087fbcb2873a5d9e1e6b76ee6e8bf09fcf1657ab193579b" }, "downloads": -1, "filename": "django-nagios-cache-0.1.2.tar.gz", "has_sig": false, "md5_digest": "7a759fdf0a621cf077a3960fb3b639c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7997, "upload_time": "2016-09-01T17:31:22", "url": "https://files.pythonhosted.org/packages/d6/c6/afc92ff33372e0c27996f15bfb350a55d5d55ee2d6bfd0cee9afb793441e/django-nagios-cache-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "b7d9f854e7d70f0ceaf03066ee37b257", "sha256": "f1d4f4ffbdbbbe65748a83c8b65485342c7d22dc92d4d222fd73f9778a95bbf5" }, "downloads": -1, "filename": "django-nagios-cache-0.1.3.tar.gz", "has_sig": false, "md5_digest": "b7d9f854e7d70f0ceaf03066ee37b257", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8110, "upload_time": "2016-09-12T18:05:14", "url": "https://files.pythonhosted.org/packages/5b/46/b712fdf4c7676d7a60a9be4e0cb74158be9e877f22ce0082cbf91325bf44/django-nagios-cache-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "6b026759bfc4ae8d443050ac638a28e8", "sha256": "a173c94167c06def8a63fd39bc4950793da20530be93f35dfd880593a60d8484" }, "downloads": -1, "filename": "django-nagios-cache-0.1.4.tar.gz", "has_sig": false, "md5_digest": "6b026759bfc4ae8d443050ac638a28e8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8127, "upload_time": "2016-09-13T17:26:57", "url": "https://files.pythonhosted.org/packages/3a/30/19591a92ce8ab5435d175a9e88949cff6b5b48666127fabad96e4b03fbdc/django-nagios-cache-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "093db686f928009c6542f38bb46bc71d", "sha256": "2ef125cdbf595f392134b53708e85af98eda6475c1797891bb136f876552aaf6" }, "downloads": -1, "filename": "django-nagios-cache-0.1.5.tar.gz", "has_sig": false, "md5_digest": "093db686f928009c6542f38bb46bc71d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8494, "upload_time": "2016-09-15T18:44:29", "url": "https://files.pythonhosted.org/packages/09/0b/88df63eae23104172f3f7023044dadaa8d798895c7fc1dfa43e6c3fe91be/django-nagios-cache-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "4d97bafba3d70388fcedef6f26b93d75", "sha256": "77434ba39fe0447c2c9f1ea6ad34f9d6a9b5f0a7fa20699c4cc1b33b5da1925c" }, "downloads": -1, "filename": "django-nagios-cache-0.1.6.tar.gz", "has_sig": false, "md5_digest": "4d97bafba3d70388fcedef6f26b93d75", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10199, "upload_time": "2017-07-18T09:18:02", "url": "https://files.pythonhosted.org/packages/de/a8/ee1851ab5d1a37f845c381f4b0538514c80c3ad3fa3f264ffdc111659d90/django-nagios-cache-0.1.6.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "6852bee8ad49fb8cffe0a610e0a9b1b2", "sha256": "22da9a27183291332c99234ef66d3f8260fb7551f148ffea56d5fdb563e04bf5" }, "downloads": -1, "filename": "django-nagios-cache-0.2.0.tar.gz", "has_sig": false, "md5_digest": "6852bee8ad49fb8cffe0a610e0a9b1b2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8445, "upload_time": "2017-03-20T21:44:43", "url": "https://files.pythonhosted.org/packages/a1/7a/ce7dbb1f2925e8ea1cdc37ed9364028b31279d74ef9ef15fc6368d4023f8/django-nagios-cache-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6852bee8ad49fb8cffe0a610e0a9b1b2", "sha256": "22da9a27183291332c99234ef66d3f8260fb7551f148ffea56d5fdb563e04bf5" }, "downloads": -1, "filename": "django-nagios-cache-0.2.0.tar.gz", "has_sig": false, "md5_digest": "6852bee8ad49fb8cffe0a610e0a9b1b2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8445, "upload_time": "2017-03-20T21:44:43", "url": "https://files.pythonhosted.org/packages/a1/7a/ce7dbb1f2925e8ea1cdc37ed9364028b31279d74ef9ef15fc6368d4023f8/django-nagios-cache-0.2.0.tar.gz" } ] }