{"id":19622206,"url":"https://github.com/commercetools/mongo-metrics-reporter","last_synced_at":"2025-04-28T03:32:27.750Z","repository":{"id":20158999,"uuid":"23429583","full_name":"commercetools/mongo-metrics-reporter","owner":"commercetools","description":"Sends mongodb db.serverStatus() to the graphite.","archived":false,"fork":false,"pushed_at":"2017-04-27T15:11:30.000Z","size":64,"stargazers_count":3,"open_issues_count":3,"forks_count":3,"subscribers_count":69,"default_branch":"master","last_synced_at":"2025-04-20T15:17:58.539Z","etag":null,"topics":["audit-backend"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/commercetools.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-28T13:49:38.000Z","updated_at":"2021-03-05T12:44:54.000Z","dependencies_parsed_at":"2022-07-25T12:33:09.240Z","dependency_job_id":null,"html_url":"https://github.com/commercetools/mongo-metrics-reporter","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fmongo-metrics-reporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fmongo-metrics-reporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fmongo-metrics-reporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fmongo-metrics-reporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/commercetools","download_url":"https://codeload.github.com/commercetools/mongo-metrics-reporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251246393,"owners_count":21558762,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audit-backend"],"created_at":"2024-11-11T11:26:37.926Z","updated_at":"2025-04-28T03:32:27.023Z","avatar_url":"https://github.com/commercetools.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"## mongo-metrics-reporter\n\n[![Join the chat at https://gitter.im/commercetools/mongo-metrics-reporter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/commercetools/mongo-metrics-reporter?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nSends mongodb `db.serverStatus()` to the Graphite and InfluxDb.\n\n### Run\n\nApplication is distributed as a docker container, which can be found here:\n\nhttps://registry.hub.docker.com/u/tenshi/mongo-metrics-reporter/\n\nSo you just need to pull it:\n\n    docker pull tenshi/mongo-metrics-reporter\n     \nand then run it:\n\n    docker run -d tenshi/mongo-metrics-reporter\n    \n### Configure\n\nThe docker container accept following environment variables:\n\n* **REPORT_INTERVAL** - the reporting interval. You can write human-readable interval representation like \"1 minute\" or \"23 seconds\". By default \"1 minute\"\n* **REPORTER** - either \"influxDb\" or \"graphite\" (by default \"influxDb\")\n\n#### InfluxDB\n\n* **INFLUX_DB_URL** - default \"http://localhost:8086\"\n* **INFLUX_DB_USERNAME** - default \"root\"\n* **INFLUX_DB_PASSWORD** - default \"root\"\n* **INFLUX_DB_DATABASE_NAME** - default \"test\"\n* **INFLUX_DB_EXTRACT_HOST** - Normally host tag will contain a mongod port. This option excludes the port information. default false\n\n#### MongoDB\n\n* **MONGO_HOST** - default \"localhost\"\n* **MONGO_PORT** - default 27017\n* **MONGO_HOSTS** - An alternative to **MONGO_HOST**/**MONGO_PORT**. Allows you to provide comma-separated list of mongod URLS (e.g. `foo:1234,bar:3456`. mongos is not supported) \n* **MONGO_DISCOVER_MEMBERS** - Will use mongod hosts to discover all member of the replicaset and report metrics for them. default false\n* **MONGO_PRIMARY_ONLY** - **MONGO_DISCOVER_MEMBERS** will report metrics only for primary nodes. default false\n\n#### Graphite\n\n* **GRAPHITE_HOST** - default \"localhost\"\n* **GRAPHITE_PORT** - default 2003\n* **GRAPHITE_PREFIX** - default \"mongo_lock_stats\"\n\nSo if your carbon-cache is running on 192.168.10.105:8111, mongo is on host 192.168.10.105 and you would like to report status every 2 seconds, then you can use this config:\n\n    docker run -d \\\n      -e MONGO_HOST=192.168.10.105 \\\n      -e GRAPHITE_PORT=8111 \\\n      -e GRAPHITE_HOST=192.168.10.105 \\\n      -e \"REPORT_INTERVAL=2 seconds\" \\\n      tenshi/mongo-metrics-reporter","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommercetools%2Fmongo-metrics-reporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommercetools%2Fmongo-metrics-reporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommercetools%2Fmongo-metrics-reporter/lists"}