{ "info": { "author": "Jia Mengchi", "author_email": "jiam@garena.com", "bugtrack_url": null, "classifiers": [], "description": "# Garena Metrics Collector\n\nA system monitoring daemon for recording server statistics in [InfluxDB](http://influxdb.com/).\n\n## Installation\n\nYou can install this via PyPI, like so:\n\n```sh\nsudo pip install garena_metrics_collector.zip\n```\n\nAnd then all you have to do is go to **/etc/garena_metrics_collector/** and edit the **config.ini** file there and you should be ready to log.\n\nAssuming that you renamed the config file to **config.ini**, you can go ahead and run this:\n\n```sh\ngarena_metrics_collector start\n```\n\nAnd the daemon will start logging everything to the InfluxDB server you specified.\n\n## Included Collectors\n\nThis is a list of some of the default packaged collectors that are enabled:\n\n### **cpu** - `system.cpu`\n#### Returns percentages of CPU allocation\n\n|Key|Type|Description|\n|---|----|-----------|\n|**usage**|*int*|Percent used by user processes|\n\n\n### **disk** - `system.disk`\n#### Returns information about disk usage\n\n|Key|Type|Description|\n|---|----|-----------|\n|**total**|*long*|Total available space *in bytes*|\n|**used**|*long*|Space used *in bytes*|\n|**free**|*long*|Free space *in bytes*|\n\n **Note**: This plugin also returns a combined total available under the `system.disk.total` series.\n\n### **load** - `system.load`\n#### Returns system load information\n\n|Key|Type|Description|\n|---|----|-----------|\n|**1m**|*int*|1 minute load average|\n|**5m**|*int*|5 minute load average|\n|**15m**|*int*|15 minute load average|\n\n\n### **memory** - `system.memory`\n#### Returns system memory allocations and usage\n\nAll of these values are calculated in *bytes*.\n\n|Key|Type|Description|\n|---|----|-----------|\n|**total**|*long*|Total memory|\n|**available**|*long*|Total uncached memory|\n|**used**|*long*|Total cached memory|\n\n\n### **net** - `system.net.*`\n#### Returns network information seperated by interface\n\n|Key|Type|Description|\n|---|----|-----------|\n|**bytes_tx**|*long*|Total bytes sent|\n|**bytes_rx**|*long*|Total bytes received|\n|**packets_rx**|*long*|Total packets received|\n|**packets_tx**|*long*|Total packets sent|\n|**errors_in**|*long*|Total incoming packet errors|\n|**errors_out**|*long*|Total outgoing packet errors|\n|**dropped_in**|*long*|Total incoming dropped packets|\n|**dropped_out**|*long*|Total outgoing dropped packets|\n\n## Custom Collectors\nYou can go ahead and add collectors to the **/etc/garena_metrics_collector/collectors/** and we will automatically run them in the cycles and report their values.\n\nHere's some examples:\n**collectors/example.py**:\n\n```python\nimport rand\n\nclass ExampleCollector(CollectorThread):\n identifier = 'example' # This is required!\n\n def collect(self, cache):\n # Stateful cache (across collections)\n if last not in cache:\n reutrn []\n\n return [{\n\t\t\t\"measurement\": \"your_measurement\",\n\t\t\t\"fields\": {\n\t\t\t\t'point': rand.randint(0, 100) - cache['last']\n\t\t\t}\n\t\t}]\n```\nTags are auto added, including server public IP and hostname(configurable in hostname).\n\n## License\n\nMIT license, see the **LICENSE** file.\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://git.garena.com/core-services/metrics_collector", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "metrics-collector", "package_url": "https://pypi.org/project/metrics-collector/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/metrics-collector/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://git.garena.com/core-services/metrics_collector" }, "release_url": "https://pypi.org/project/metrics-collector/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "System monitoring daemon that logs to InfluxDB", "version": "0.2.0" }, "last_serial": 1712194, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "c36e9be67109bc41ff8836c956c66d77", "sha256": "0b6b768075faecb2b5606882daf253e991d0f2c4dc830095f0db1c10a979ecd1" }, "downloads": -1, "filename": "metrics-collector-0.2.0.tar.gz", "has_sig": false, "md5_digest": "c36e9be67109bc41ff8836c956c66d77", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17795, "upload_time": "2015-09-07T19:47:55", "url": "https://files.pythonhosted.org/packages/a1/30/bcda458ea076bc30cac0539eb85e01853aee72dbdb36f4201a24a3a70fed/metrics-collector-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c36e9be67109bc41ff8836c956c66d77", "sha256": "0b6b768075faecb2b5606882daf253e991d0f2c4dc830095f0db1c10a979ecd1" }, "downloads": -1, "filename": "metrics-collector-0.2.0.tar.gz", "has_sig": false, "md5_digest": "c36e9be67109bc41ff8836c956c66d77", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17795, "upload_time": "2015-09-07T19:47:55", "url": "https://files.pythonhosted.org/packages/a1/30/bcda458ea076bc30cac0539eb85e01853aee72dbdb36f4201a24a3a70fed/metrics-collector-0.2.0.tar.gz" } ] }