{ "info": { "author": "Dmitriy Olshevskiy", "author_email": "olshevskiy87@bk.ru", "bugtrack_url": null, "classifiers": [], "description": "#############\nmongostat_fdw\n#############\n\nMongo database and collection statistics foreign data wrapper for PostgreSQL written in python.\n\n************\ndependencies\n************\n\n* `pymongo `__\n* `multicorn `__\n\n************\ninstallation\n************\n\n1. install python module\n\n * from sources (bitbucket)\n\n ::\n\n $ git clone https://bitbucket.org/olshevskiy87/mongostat_fdw.git\n $ cd mongostat_fdw\n $ python setup.py install\n\n * using pip\n\n ::\n\n $ pip install mongostat_fdw\n\n2. create extension \"multicorn\" in postgresql (e.g. using psql)\n\n ::\n\n $$ create extension multicorn;\n\n3. create foreign servers\n\n ::\n\n $$ CREATE SERVER mongostat_fdw_db\n FOREIGN DATA WRAPPER multicorn\n OPTIONS (\n wrapper 'mongostat_fdw.MongoDBStatFDW'\n );\n\n ::\n\n $$ CREATE SERVER mongostat_fdw_coll\n FOREIGN DATA WRAPPER multicorn\n OPTIONS (\n wrapper 'mongostat_fdw.MongoCollStatFDW'\n );\n\n4. create foreign tables\n\n ::\n\n $$ CREATE FOREIGN TABLE mongo_db_stat (\n \"avgObjSize\" NUMERIC,\n collections INT,\n \"dataFileVersion\" JSONB, -- for Postgres 9.4+ or JSON, or (at least) TEXT\n \"extentFreeList\" JSONB, -- Mongo 3.0.0+\n \"dataSize\" NUMERIC,\n db TEXT,\n \"fileSize\" NUMERIC,\n \"indexSize\" NUMERIC,\n indexes INT,\n \"nsSizeMB\" BIGINT,\n \"numExtents\" INT,\n objects INT,\n ok NUMERIC,\n \"storageSize\" NUMERIC,\n \"extentFreeList\" JSONB -- for Postgres 9.4+ or JSON, or (at least) TEXT\n ) SERVER mongostat_fdw_db OPTIONS (\n -- uri 'mongodb://127.0.0.1:27017',\n host '127.0.0.1',\n port '27017',\n db 'test'\n );\n\n ::\n\n $$ CREATE FOREIGN TABLE mongo_coll_stat (\n \"avgObjSize\" NUMERIC,\n count INT,\n \"indexSize\" JSONB,\n \"lastExtentSize\" NUMERIC,\n nindexes INT,\n ns TEXT,\n \"numExtents\" INT,\n ok NUMERIC,\n \"paddingFactor\" NUMERIC,\n size NUMERIC,\n \"storageSize\" NUMERIC,\n \"systemFlags\" INT,\n \"totalIndexSize\" NUMERIC,\n \"userFlags\" INT\n ) SERVER mongostat_fdw_coll OPTIONS (\n db 'test'\n );\n\n*****\nusage\n*****\n\n* get \"test\" database statistics\n\n::\n\n $$ select db, \"fileSize\", \"dataSize\", \"avgObjSize\", indexes, \"dataFileVersion\"\n from mongo_db_stat;\n\n db | fileSize | dataSize | avgObjSize | indexes | dataFileVersion\n -------+----------+----------+---------------+---------+--------------------------\n local | 67108864 | 2840 | 405.714285714 | 1 | {\"major\": 4, \"minor\": 5}\n admin | 0 | 0 | 0.0 | 0 | {}\n (2 rows)\n\n* get \"test\" database collections statistics\n\n::\n\n $$ select ns as tbl_name, size, \"storageSize\", count\n from mongo_coll_stat;\n\n tbl_name | size | storageSize | count\n ---------------------+------+-------------+-------\n test.system.indexes | 72 | 4096 | 1\n test.test_coll | 344 | 4096 | 7\n (2 rows)\n\n**************\nexternal links\n**************\n\n* `PostgreSQL foreign data wrappers `__\n* `Multicorn `__ - Postgres extension that allows to make FDW with python language\n* `MongoDB `__ - a high performance document-oriented DBMS with automatic scaling\n* `MongoDB dbStats command `__\n* `pymongo `__ - python distribution for working with MongoDB\n\n*******\nlicense\n*******\n\nCopyright (c) 2016 Dmitriy Olshevskiy. MIT LICENSE.\n\nSee LICENSE.txt for details.\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/olshevskiy87/mongostat_fdw", "keywords": "mongo mongodb stat statistics collection fdw wrapper postgresql", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "mongostat-fdw", "package_url": "https://pypi.org/project/mongostat-fdw/", "platform": "", "project_url": "https://pypi.org/project/mongostat-fdw/", "project_urls": { "Homepage": "https://bitbucket.org/olshevskiy87/mongostat_fdw" }, "release_url": "https://pypi.org/project/mongostat-fdw/0.0.1/", "requires_dist": [ "pymongo" ], "requires_python": "", "summary": "mongo databases and collections statistics fdw for postgresql", "version": "0.0.1" }, "last_serial": 2431318, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "3e7fed72f08af602ca41b5a98bbc4b61", "sha256": "08085b3ff6c9c6041f5230dfda044428682c2415c62322c102ef4cb031ae77bb" }, "downloads": -1, "filename": "mongostat_fdw-0.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "3e7fed72f08af602ca41b5a98bbc4b61", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 5953, "upload_time": "2016-10-30T10:18:36", "url": "https://files.pythonhosted.org/packages/98/88/898c4196c652624a9417293fc8d08b9bbe7d0e77b7f8e505d701679ff508/mongostat_fdw-0.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "67962f9ea18b2fadf40f8a0b4196d601", "sha256": "bd2826f5f8d64d54f5fa106965fea6994947aa075662e841903c2ff6da84b783" }, "downloads": -1, "filename": "mongostat_fdw-0.0.1.tar.gz", "has_sig": false, "md5_digest": "67962f9ea18b2fadf40f8a0b4196d601", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3615, "upload_time": "2016-10-30T10:18:40", "url": "https://files.pythonhosted.org/packages/48/7a/6b4bdd38f6b8cfba42acd2ea9a48615a74a7e9f64eb51adbf990f52e7bf7/mongostat_fdw-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3e7fed72f08af602ca41b5a98bbc4b61", "sha256": "08085b3ff6c9c6041f5230dfda044428682c2415c62322c102ef4cb031ae77bb" }, "downloads": -1, "filename": "mongostat_fdw-0.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "3e7fed72f08af602ca41b5a98bbc4b61", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 5953, "upload_time": "2016-10-30T10:18:36", "url": "https://files.pythonhosted.org/packages/98/88/898c4196c652624a9417293fc8d08b9bbe7d0e77b7f8e505d701679ff508/mongostat_fdw-0.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "67962f9ea18b2fadf40f8a0b4196d601", "sha256": "bd2826f5f8d64d54f5fa106965fea6994947aa075662e841903c2ff6da84b783" }, "downloads": -1, "filename": "mongostat_fdw-0.0.1.tar.gz", "has_sig": false, "md5_digest": "67962f9ea18b2fadf40f8a0b4196d601", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3615, "upload_time": "2016-10-30T10:18:40", "url": "https://files.pythonhosted.org/packages/48/7a/6b4bdd38f6b8cfba42acd2ea9a48615a74a7e9f64eb51adbf990f52e7bf7/mongostat_fdw-0.0.1.tar.gz" } ] }